Skip to content

Latest commit

 

History

History
19 lines (16 loc) · 1.2 KB

README.md

File metadata and controls

19 lines (16 loc) · 1.2 KB

pdf-search

Script for pulling each line in a set of PDFs that contains a matching string from a list of specified strings. Initial use case was to enable being able to quickly pull out rows in tables that contain a match. See example/.

How to use

Note: These instructions are written for MacOS (>= Sierra) and assumes basic command line familiarity

Requirements

Assuming you have homebrew installed, install pdfgrep:

brew install pdfgrep

This make take a minute or two.

Running the script

  1. Download search_pdfs.sh and put it into the same directory as the PDFs you want to search.
  2. cd into that directory and run chmod u+x search-pdfs.sh to make it executable.
  3. Create a text file in the directory called search_strings.txt. It should contain all the strings you want to search, one string per line. See the example search_strings.txt.
  4. Run ./search-pdfs.sh.
  5. Once it completes, there should be a new file called results.txt in the directory containing all the matched lines. See the example results.txt.