Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

auto-find-date-pdf

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

auto-find-date-pdf

A simple lib to find dates from any txt/ pdf/ docx/ rtf source. For documentation see

  • 0.2.22
  • PyPI
  • Socket score

Maintainers
1

Simple use Date and text parsing from pdf rtf and images (with use of call back function)

This is a simple package provided by Marvsai healthcare LTD. It can find any format regular dates in a str as python Datetime objects.

Easy to use method

def find_dates(file_contents: str):

  Find any dates in a large python string usually taken from a file or pdf

  Args:
      file_contents (str): The string in which to find any format of dates


  Returns:
      List[datetime.datetime]: A list of datetime objects the latest can be found using max()

Optimised replacement of multiple strings in a string

replace_multiple_strings(input_string, replacements_dict)

Replace multiple strings in the input string using a dictionary of replacement pairs.

Args:
    input_string (str): The string in which to replace the substrings.
    replacements_dict (dict): A dictionary of replacement pairs, where the keys are the
        substrings to be replaced and the values are the replacement strings.

Returns:
    str: The input string with all instances of the substrings replaced with their
        corresponding replacement strings.
"""

Easy to use extraction of text from PDF or RTF files:

def extract_rtf_pdf(name: str, get_ai_text:Callable=None)->str:

  Find text from pdf and rtf

  Args:
      name (str): The string in which to find any format of dates
      get_ai_text: call back function that can call google vision api or AWS or Azure equivalents for text extraction
      Called for images and image PDFs.

  Returns:
      List[datetime.datetime]: A list of datetime objects the latest can be found using max()
  """

FAQs


Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc