[Gimp-docs] Where have all my pictures gone?
Ulf-D. Ehlert
ude88 at web.de
Thu May 28 13:24:07 PDT 2009
Kolbjørn Stuestøl (Mittwoch, 27. Mai 2009, 23:33):
[...]
> but the images coded as
> <imageobject>
> <imagedata fileref="images/filters/options-logo-3d-outline.png"
> format="PNG"/>
> </imageobject>
> returned
> ls: cannot access JPG: No such file or directory
> …
The sed script was just a quick-and-dirty solution which worked for
whats-new.xml.
sed reads the specified input file (e.g. whats-new.xml) and applies the
two commands to every line:
1) /fileref/!d
removes every line not containing "fileref",
2) s/.*"\(.*\)".*/\1/
replaces the line with the string between the last two quote (") chars.
This worked fine for lines like
fileref="images/using/gimp-curves-tool-2-4-vs-2-6.png"/>
and does not work for lines like
... fileref="images/.../options-logo-3d-outline.png" format="JPG"/>
and you get 'JPG' as "filename".
You'll have to replace the (second) sed command:
s/.*fileref="\([^"]*\)".*/\1/
(and this will fail it there are single quotes (') ...)
Bye,
Ulf
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: This is a digitally signed message part.
Url : /lists/gimp-docs/attachments/20090528/21d661de/attachment.bin
More information about the Gimp-docs
mailing list