I am using sticky notes in ubuntu . And was wondering if it would be possible to read the text written in sticky notes using any scripting language .
views:
69answers:
3I am not sure whether you can do it using the sticky notes, but assuming if you use Tomboy, you can do it.
You need tomboycli
, a Python script which provides access to Tomboy through d-bus.
The project is hosted on Google Code here. Maybe you can study this to make your own implementation if you are interested.
The tomboy notes are saved as xml files so you could write a xml parser.
If you meant the "Sticky Notes" applet you can add to your panel then yes you can read that notes too.
The XML file containing all notes typically is located at ~/.gnome2/stickynotes_applet
.
You just have to parse the information you need out of it. The structure should look like this.
<?xml version="1.0"?>
<stickynotes version="2.30.0">
<note title="10/31/2010" x="658" y="176" w="477" h="418">Some text</note>
</stickynotes>
Where x
stands for the notes position on the x-axis, y
for its position on the y-axis, w
stands for the width and h
stands for the height.
It should be pretty simple to build a parser for it using Perl for example.