PDF Searching Programmes

I am trying to write some programmes to search PDFs from directories.

I am hoping to use:

I have done the first two, and am timing them now (from ~/Desktop/Study/.../2018/Tri\ 2/, searching for allport):

BashPython
49.80 seconds119.56 seconds
42.87 seconds118.58 seconds
43.82 seconds124.00 seconds
Average:45.50 seconds120.71 seconds

 

Note that I did Bash → Py → Bash..., not Bash × 3 → Py × 3.

On average, my Bash script was 2.65 times faster than my python one.


A note from the future: once I figured out the logic required to do such a task as this, this was my first good practice with different languages, learning the syntax of these different languages.


More notes on different languages, from mid-October 2019

I want to write more PDF-searchers, for my own edification more than for their functionality. Here are some notes on the strengths of different languages, and my method for PDF-searches.

Why use Perl?

Why use Ruby?

Why use LISP?

Why use Elixir?

Why use Rust?

Why use Lua?

How I am writing PDF-searches:

  1. PDF → text with set file and search string
  2. Search file for search string
  3. Print whether or not found
  4. Make search string arg
  5. Make loop in walk dirs + subdirs
  6. Print all PDFs for which found; count and print times found on x PDFs
  7. Time script
  8. Print help output.
Top