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.1.tar.gz (4.2 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.1-py3-none-any.whl (4.8 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for find_in_pdf-0.2.1.tar.gz
Algorithm Hash digest
SHA256 254fa583591be7f6876773db2fe64577bbe28f17ee2269e02ec88a54dd90785f
MD5 7529089aea9b8e1f77fee90276672e44
BLAKE2b-256 b881ebd3727d2c14baa3b0a7b3658752765003544f41a519b771f9f5a019a3f8

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for find_in_pdf-0.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 758f957d5d0fdfc6ad63cb7b8ad47cf45a0e0c0b0f6ee49f8f75dead1a359bfe
MD5 13eeddd40c89bdc0e2d4e0060134640f
BLAKE2b-256 38bb9d0c19c0aff0b9accbb39edcb9043c89332cb727b3efcc937ff0c7eba60c

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