[Tracker] Tomboy note extractor



I created a small tomboy note extractor (attached)... It should run on any system with a Python installation - I think the XML parser I use is bundled with Python.

Anyway there is one "problem" . I want to extract a Note.Content field that contains the exact markup and note contents that you see in Tomboy (because I want to use that as storage in Daze).

For Example:
================
Note.Content=ImportantMathNote

Hey I just proved that 2+2=4; ain't that great?
I wrote a paper about it - I placed it here:
<link:url>~/Projects/RocketScience/bigstuff.pdf</link:url>

Never forget!
================

I read somewhere in tracker-extract.c that "=" and ";" where used for delimiters, so I guess I need to escape them somehow...? While we're at it why not use some non-printing ascii chars for delimiters and avoid escaping?

Sample output - NOTE that the first line "Unable to..." is printed to stderr:

mikkel crystal:~/Projects/TomboyExtractor$ ./tb-extract /home/mikkel/.tomboy/7126db26-8765-492d-9b58-df494d0cceb4.note
Unable to retrieve tag create-time
Note.X=12
Note.Y=67
Note.Width=450
Note.Content=GlassPool

What about maximized windows?
Note.MTime=2006-06-04T12:57:00.6185720+02:00
Note.Height=360
Note.Title=GlassPool
Note.CursorPosition=39

I hope this is close to how it is supposed to look :-)

Cheers,
Mikkel

Attachment: tb-extract
Description: Binary data



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]