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
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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
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
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8ae248777c3087c0c2455cfffef0b7de5f770a3a54449fb54351911728121f72 |
|
MD5 | 3769dec2a37b941f52350947bf677910 |
|
BLAKE2b-256 | b4aa563c803b9cf9edce44093a2cd821c25d9bc6ba8926adcac0d36fb75cad4e |
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
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1305f302855364658f4cbd675030f9c355c95ca37e248747f1cd60e46665ab78 |
|
MD5 | c9f212cb31bcdff3589ab7017364730b |
|
BLAKE2b-256 | fd69e58df710fcb435e9156f3aa99d403960cc618d8822a71c68e65dce6e3fa3 |