In message <slrnrkvkv8....@ProMini.lan> Lewis <g.k...@gmail.com.dontsendmecopies> wrote:
> So, getting ALL the attachments will require a lot more work.
Maybe not so much work.
Here is what I did.
Get all the pluginPayloadAttachment files and there type into a file
$ for file in **/*pluginPayloadAttachment; do file $file >> ~/Desktop/Attachments.txt; done
Open the file in BBEdit (I believe this all works in the free version)
$ bbedit ~/Desktop/Attachments.txt
Then, in BBEdit I first added a line number to each line (about 20,000)
using Text menu => Add/reove line numbers.
I used the text menu "Process lines containing" and removed all the
lines that matched ": empty " or ": MS " (note the spaces) as I did not
care about MS icon files.
Then, I ran a search and replace:
Find: ^ *([^ ]+) ([^:]*): ([^ ]+) (.*)$
replace with: cp -a \2 ~/desktop/Attachments/\1.\3 # \4
The find first captures the line number with any optional leading spaces
from the strart of the line this is \1
^ *([^ ]+)
Followed by a space, and then captures the name of the file (everything
up to the first : character) followed by the colon and a space. This is
\2
([^:]*):
Then, it captures the next set of non space characters (JPEG, ISO, PNG,
etc) this i s \3
([^ ]+)
And then it finally captures the rest of the line (this part is
optional). this is \4
(.*)$
Now, Replace with cp -a <filename> <path/to/folder><linenumber><the
JPEG, ISO, PNG, etc string), a # character, and the rest of the line.
Finally, I search for ISO and change it to mp4 and MS and cahnge iot to
ico.
the lines end up looking like this:
cp -a 02/02/BC1F8714-91D6-48AA-8753-251AB0198389/06F44D03-2DF9-4E81-89BA-E08948F369A7.pluginPayloadAttachment ~/desktop/Attachments/253.PNG # image data, 1024 x 465, 8-bit/color RGBA, non-interlaced
The # is a comment character in bash or zsh, so the rest of the line
after that is ignored by the shell, but it seemed worth keeping around
at least for now.
I can save the file and source it from the commandline, or I can use the
paid BBEdit feature of using a shell worksheet. This has proved to be
useful as there were a very few (less than 20) gif files, a couple fo
"PC" files ("PC bitmap 15x16x24" that I do not care about).
The vast majority of these files are tiny tiny files, and scanning
trough all of them is not worth it for me, so I an starting at the top
and scanning down. I doubt I will look at anything under 100K (90% of
mine). Most of the small ones appear to be favicon files from websites
and glyohs that are renderd as images instead of proper utf-8
characters. Probably stuff I go from Android users?
I may be a tad bit bored and have a wee bit of a problem,. Who can say.
--
Friction can be a real drag.