Skip to content

MatthiasEbner2002/pdf_search

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

43 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

pds_search

CodeQL

Table of content

1. How to start

1.1. Short Version

git clone https://github.com/MatthiasEbner2002/pdf_search.git
cd pdf_search
make
chmod +x pdf_search
sudo ln -s "$(pwd)/pdf_search" /usr/local/bin/pdf_search # change pdf_search to prefered command name

1.2. Long Version

1.2.1. Download the repo

git clone https://github.com/MatthiasEbner2002/pdf_search.git

1.2.2. Switch to folder

cd pdf_search

1.2.3. Compile

make

Note

Add execution right if needed

chmod +x pdf_search

1.3. Command to make a link

Tip

change the pdf_search in /usr/local/bin/pdf_search to a command name of your choice, for later use.

sudo ln -s "$(pwd)/pdf_search" /usr/local/bin/pdf_search

1.4. TO KNOW

Dont move the files into a other location, there is a softlink to these files, into '/usr/local/bin/'. So i can change the files if I want and dont have to change the links.

1.5. Command to delete the link again

sudo rm /usr/local/bin/pdf_search

2. Usage

pdf_search <word_to_search> [-s] [-r] [-l] [-h/--help]

2.1. Options

  • <word_to_search>: The word to search for within PDF files.
  • -s: Enable case-sensitive search.
  • -r: Recursively search subdirectories.
  • -l: Print all the lines, with a occurence.
  • -h/--help: Display this usage information.

3. Example

Search for "example" in all PDF files in the current directory:

pdfs example

Search for "example of this" in all PDF files in the current directory:

pdfs "example of this"

Search for "example" in all PDF files in the current directory and subdirectories:

pdfs example -r

Search for "example" in all PDF files in the current directory with case sensitivity:

pdfs example -s

Search for "example" in all PDF files in the current directory and subdirectories, with case sensitivity:

pdfs example -s -r

Search for "example" in all PDF files in the current directory and print all lines with a occurence:

pdfs example -l