Skip to main content

pdf - Search Tool, searches for a keyword in the filename ,the n first pages of the file or in the keyword section of the metadata.

Project description

python license

pdfsearch is a command line tool tha searches a directory for pdf files containing a specified keyword in the filename, the n first pages of the file, or in the keyword section of the metadata.

Installation

pdfsearch can be installed via pip

$ pip install pdfsearch

Examples

1) To search a keyword in the filenames in a specific directory use the -d option. The two following examples search ‘2020-04-06’ in the filenames (default) in the directory ‘~/Documents/bills’ and in the current directory (default):

$ pdfs.py -d ~/Documents/bills 2020-04-06
$ pdfs.py 2020-04-06

2) To search in the n first pages of the pdfs for the keyword in the directory use the -n [number] option. If you don’t specify a numer after -n make sure to put the option at the end of the line, in this case the default are the first 3 pages. Warning: if you choose [number] too big, the program gets slow. The first examples searchs the current folder for the keyword ‘Python’ in the first 2 pages of each pdf-file in the directory. The second line searchs the first 3 pages (default) of each pdf for the word ‘solidstate’ in the folder ‘~/Documents/articles’:

$ pdfs.py -n 2 Python
$ pdfs.py -d ~/Documents/articles solidstate -n

3) You can also search the keyword section of the meta data of the pdfs. To do that use the -k option. The next example searchs ‘Physics’ in the keyword metadata:

$ pdfs.py -k Physics

4) Finally you can combine every option. If you use one or more of the options -n or -k you have to specify -f if you also would like to search the filenames:

$ pdfs.py -d ~/Documents/articles -k -f -n 2 python

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

pdfsearch-0.0.1.tar.gz (3.2 kB view details)

Uploaded Source

Built Distribution

pdfsearch-0.0.1-py3-none-any.whl (5.8 kB view details)

Uploaded Python 3

File details

Details for the file pdfsearch-0.0.1.tar.gz.

File metadata

  • Download URL: pdfsearch-0.0.1.tar.gz
  • Upload date:
  • Size: 3.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.15.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.5.5

File hashes

Hashes for pdfsearch-0.0.1.tar.gz
Algorithm Hash digest
SHA256 8ae248777c3087c0c2455cfffef0b7de5f770a3a54449fb54351911728121f72
MD5 3769dec2a37b941f52350947bf677910
BLAKE2b-256 b4aa563c803b9cf9edce44093a2cd821c25d9bc6ba8926adcac0d36fb75cad4e

See more details on using hashes here.

File details

Details for the file pdfsearch-0.0.1-py3-none-any.whl.

File metadata

  • Download URL: pdfsearch-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 5.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.15.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.5.5

File hashes

Hashes for pdfsearch-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 1305f302855364658f4cbd675030f9c355c95ca37e248747f1cd60e46665ab78
MD5 c9f212cb31bcdff3589ab7017364730b
BLAKE2b-256 fd69e58df710fcb435e9156f3aa99d403960cc618d8822a71c68e65dce6e3fa3

See more details on using hashes here.

Supported by

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