Hi!
I have a question regarding Automator and BBEdit.
Context:
On a daily basis I get an XML file. This file contains information about some dossiers. I need to extract two elements from each dossier: (1) a URL to download associated images, and (2) the dossier's name.
Information in the file is in Spanish.
What I currently do:
I open the XML file on BBEdit and use Grep search to extract the information. My Grep patterns are:
To extract the URLs:
<clave><!\[CDATA\[Imagen\]\]></clave>\n\s+<valor><!\[CDATA\[(.+?)\]
To extract the dossier's name:
<clave><!\[CDATA\[Denominación\]\]></clave>\n\s+<valor><!\[CDATA\[(.+?)\]
I "replace" this Grep patterns with \1 to extract everything and works like a charm.
Both pieces of information get saved in their own plain text files.
Then I download the images using some wget magic:
wget -E -H -k -K -p -e robots=off -P /users/USERNAME/TARGETFOLDER -i /users/USERNAME/URLSLIST.txt
As a final touch to my workflow, I run a batch rename on all files to add the filetype *.GIF on all images and I'm ready to work.
What I want to do:
I want to further automate the process.
Using Automator I created a Service (Quick action) that uses files as input in Finder.
What I have in mind is:
➤ Run the service on the XML file
➤ Read the contents of the file
➤ Use BBEdit's Automator action called "Extract lines containing" in Grep mode to extract the URLs
➤ Use a shell script to download all images
➤ Use a batch rename action to add the *.GIF filetype
For the love of me I can't get "Extract lines containing" to work. I'm using BBEdit 13.5.6 and Big Sur 11.3.1.
Any ideas?
Does anybody know if BBEdit's Automator actions still work?