Search For Specific Text in a PDF File

Why not?

It gives me back an error, it's not a supported format.
Here's the ZIP:

Serie_Prima_Divisione.pdf.zip (14.5 KB)

Right – that's why you zipped the original PDF sample.  :sunglasses:

-Chris

Hey Chris,

Is your shell script wrote in perl using RegEx, right? Because I'm trying different kind of codes but I'm stuck on the same problem. Sometimes it gives me an error message about code, sometimes no error message but it prints out nothing.

-Rick

Hey Rick,

It took me a while to get back to this.

Yes, I'm using regular expressions in Perl.

You didn't post your macro, so it's impossible to comment.

In any case – here's a working macro.

Note – this can be done with Keyboard Maestro native actions.

-Chris


Extract Divisions from the Selected PDF File in the Finder v1.00.kmmacros (13 KB)

Ehi Chris,

The Macro works but the new txt file's names should be in this form:

At the moment I should also append at the beginning of every new text file a blank space at the fist line and 2021 at the second line.

(space)
2021
TEAM NAME
TEAM NAME
TEAM NAME

It would be more convenient for me to create a new macro or to modify this?

Hey Rick,

Okay, try this one (v1.01).

-Chris


Extract Divisions from the Selected PDF File in the Finder v1.01.kmmacros (14 KB)

Macro-Image

Hey Rick,

Here's a quick lesson on doing this job with Keyboard Maestro native actions.

I'm only extracting the desired lines to a variable and displaying them, and not showing you how to split them up and write them to files.

I don't have time to do more, but this will give you an idea of what's possible without having to know Perl.

-Chris