-1

I want to create an Automate Task to hourly download a PDF from a specific URL and then search for certain text like "6256896" and then if there was the text inside the PDF,notifies me for example with an email.

Is it possible to do this without programming? and If yes How?

1 Answer 1

0

You can use shell scripting to achieve this task but you will need to write some minimal lines of code, actually it is scripting so it is more like copy/paste commands that you will normally type on terminal. To download your file, you can use wget. Then assuming your pdf was "cleanly generated" (from .tex source file for instance) you will be able to extract almost all text with util likes pdftotext (from poppler-utils package on ubuntu) then you can easily send mails with mail command. To execute it every hour, you can then set your script as a cron job.

#!/bin/sh

wget http://some_url.com/file.pdf
if [ pdftotext file.pdf - | grep 'pattern' ]
then
    mail -u your_user@localhost -s "pattern found inside file.pdf!"
fi

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .