开发者

is it possible to read the text written in a sticky note using a script in linux?

I am using sticky notes in ubuntu . And was wonder开发者_运维百科ing if it would be possible to read the text written in sticky notes using any scripting language .


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 xstands for the notes position on the x-axis, yfor 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.


I 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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜