Affraid it only works on txt files with Comments in, not on the ones without. I tried removing the end "$" again but it only reproduced the issue of not looking at "URL" and "Comments".
Thanks for trying.
Well, I thought I had it, I removed the "$" from the end of the following line:
if ($content =~ /Title:\n(.*?)\s+URL:\n(.*?)(\s+Comment:\n(.*?)\s+)?/) {
And the script processed all the files, but this time it only went as far as to convert the "Title" data only, nothing else. This...
I'm actually on OS X (10.6), the output is:
Title:$
Nezinscot Farm | Sustainable Packaging Design$
$
URL:$
http://ambalaj.se/2011/11/16/nezinscot-farm/$
$
Comment:$
Lindsay Perkins [http://www.lindsayperkins.com/] ?M-^@M-^]To design a brand and package line that reflected the farm?M-^@M-^Ys...
when I ran the code it didn't work and produced the "Unexpected format" error.
I'm typing:
perl xmlconvert.pl 1333350837348_1.png.txt
How did you get it to work?
Right, well, the script has been furthered since we last all spoke thanks much to the time and expertise of Phil Harvey (ExifTool: http://www.sno.phy.queensu.ca/~phil/exiftool/). So now the script will interrogate the files to spit out an XMP file with the data from the Text file in the right...
I found that loads of errors occurred, too many to list. The Terminal bit worked, but, for example I received many errors similar to this:
Backslash found where operator expected at /Users/zzz/Desktop/Test/xmlconvert.sh line 1, near "ansi\"
Backslash found where operator expected at...
This looks great, even though I don't really understand it. I've gone over it though and sort of get what's going on, I'll see what I can and get back to you.
Thanks for your help!
Ahh, you're right, I got it mixed up with another file, sorry, so it would be like this:
<?xpacket begin='' id=''?>
<x:xmpmeta xmlns:x='adobe:ns:meta/' x:xmptk='XMP toolkit 2.9-9, framework 1.6'>
<rdf:RDF xmlns:rdf='http://www.w3.org/1999/02/22-rdf-syntax-ns#'...
Hi, I heard that Perl is good for text manipulation, which should be useful for converting TXT file data to XML based files. I have text files which are somewhat structured, they contain data which I usually manually copy & paste into the image handling application Aperture (from Apple) to a...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.