Skip to main content

A simple tool to search for strings or list PDF files within a directory.

Project description

PDFSearcher

PDFSearcher is a simple Python tool for searching a specific string within PDF files located in a specified directory and its subdirectories. It outputs the file paths where the string is found.

Features

  • Recursively searches for a given string in all PDF files within a folder and its subfolders.
  • Prints out the paths of the PDF files where the search string is found.
  • Easy to install and use.

Installation

You can install the package via pip after uploading it to PyPI:

pip install find-in-pdf

Or, you can install it locally by cloning the repository and using:

pip install .

Usage

To use pdfsearcher in your Python code, you can simply import it and call the search_pdfs_in_folder function.

from pdfsearcher import search_pdfs_in_folder, list_products

# Example usage
folder_path = "/path/to/folder"
search_string = "your search string"
search_pdfs_in_folder(folder_path, search_string)
list_products(folder_path)

You can also use it as a command-line tool:

pdfutil search /path/to/folder "search_string"
pdfutil list /path/to/folder

Local dev usage

python search.py search /path/to/folder "your_search_string"
python search.py list /path/to/folder

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

find_in_pdf-0.2.2.tar.gz (4.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

find_in_pdf-0.2.2-py3-none-any.whl (4.9 kB view details)

Uploaded Python 3

File details

Details for the file find_in_pdf-0.2.2.tar.gz.

File metadata

  • Download URL: find_in_pdf-0.2.2.tar.gz
  • Upload date:
  • Size: 4.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.4

File hashes

Hashes for find_in_pdf-0.2.2.tar.gz
Algorithm Hash digest
SHA256 f4343994b6202c6309913fa534a62ce41c66d7e0f802e862b8b0fba5b80c6ad5
MD5 5f724d93f6650d5dde551edcf8a03ebd
BLAKE2b-256 2922fa21208d6c971cbc3972c05cd02b3dc528d7259a4c5407357b38f1d8aa48

See more details on using hashes here.

File details

Details for the file find_in_pdf-0.2.2-py3-none-any.whl.

File metadata

  • Download URL: find_in_pdf-0.2.2-py3-none-any.whl
  • Upload date:
  • Size: 4.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.4

File hashes

Hashes for find_in_pdf-0.2.2-py3-none-any.whl
Algorithm Hash digest
SHA256 6125e6437380c0d1ea573ebfe096422aa8d8fa2c54be44671e7443a8edec3535
MD5 4bf6bffd896c9b4d1b9cd298f5435963
BLAKE2b-256 f3712311bd7b3f30eea721f5abbe22041be823a8e55b9c9f22bebf3609073cae

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page