Tomboy note format question: why HTML?

46 views
Skip to first unread message

Roman Yepishev

unread,
Dec 31, 2009, 6:49:03 PM12/31/09
to desktop...@googlegroups.com
Welcome to 2010!

I see that UbuntuOne stores Tomboy notes as HTML inside couchdb[1].

Is there any particular reason why notes are stored as "rendered"
variant?

As I understand, during the sync tomboy sends notes in its own format,
UbuntuOne service converts the note to HTML, stores it into couchdb as
HTML. All subsequent synchronizations result in HTML presentation being
converted to Tomboy format.

In case notes are stored in Tomboy format, then it is easy to switch the
storage engine to couchdb entirely, eliminating the need of extra
synchronization code for Tomboy and GNote.

Additionally, such conversion creates questionable mapping for Tomboy to
HTML format - e.g. <code/> for highlighted items, <strong /> for bold
(no semantic meaning in tomboy, actually). Moreover, if plugins are
used, then we will loose all the extra info and server-side parser will
need to be updated with all kinds of extra info.
In case native format is used the parser will need to be updated anyway,
for read/write support, but at least this will not break things for
people who synchronize 2 tomboy instances and have never edited a note
in the web UI.

So, I guess that we might want to specify content as Tomboy format and
perform various conversions when needed, w/o modifying the original
data.

Btw, tomboy already contains the XSLT file required to produce a pretty
HTML out of its internal format.

[1] http://www.freedesktop.org/wiki/Specifications/desktopcouch/note

--
Roman Yepishev <roman.y...@gmail.com>

signature.asc

Stuart Langridge

unread,
Jan 1, 2010, 1:42:14 AM1/1/10
to desktop...@googlegroups.com
On 12/31/2009 11:49 PM, Roman Yepishev wrote:
> Welcome to 2010!
>
> I see that UbuntuOne stores Tomboy notes as HTML inside couchdb[1].
>
> Is there any particular reason why notes are stored as "rendered"
> variant?

Because I made a wrong decision, early on.

My thought was: we need to store notes in the database in Some Format.
We need to translate from Some Format to HTML and back to Some Format
again (for the web UI) and also translate from Some Format to Tomboy XML
and back (for Tomboy). It would obviously make sense if Some Format
actually *was* one of those two, minimising the translation work
required. And I chose the wrong one.

We're currently fixing this, which is what's caused some of the
problems. Mea culpa, etc.

sil

Roman Yepishev

unread,
Jan 2, 2010, 1:38:50 PM1/2/10
to desktop...@googlegroups.com
On Fri, 2010-01-01 at 06:42 +0000, Stuart Langridge wrote:
> On 12/31/2009 11:49 PM, Roman Yepishev wrote:
> > I see that UbuntuOne stores Tomboy notes as HTML inside couchdb[1].
> >
> > Is there any particular reason why notes are stored as "rendered"
> > variant?
> We're currently fixing this, which is what's caused some of the
> problems. Mea culpa, etc.

Is there any format description now? I.e. whether the note will be
completely put into "content" field, or only <note-content /> contents.

I am creating a local sync script that will parse notes, and put them
into the local couchdb instance, so I'd like to know how to handle
linefeeds, tags, etc, just to be somehow future-compatible.

--
Roman Yepishev <roman.y...@gmail.com>

Rodrigo Moya

unread,
Jan 4, 2010, 5:50:46 AM1/4/10
to desktop...@googlegroups.com
On Sat, 2010-01-02 at 20:38 +0200, Roman Yepishev wrote:
> On Fri, 2010-01-01 at 06:42 +0000, Stuart Langridge wrote:
> > On 12/31/2009 11:49 PM, Roman Yepishev wrote:
> > > I see that UbuntuOne stores Tomboy notes as HTML inside couchdb[1].
> > >
> > > Is there any particular reason why notes are stored as "rendered"
> > > variant?
> > We're currently fixing this, which is what's caused some of the
> > problems. Mea culpa, etc.
>
> Is there any format description now? I.e. whether the note will be
> completely put into "content" field, or only <note-content /> contents.
>
only <note-content> contents, the rest of the fields in the Tomboy XML
format are stored as fields on the couchdb database

> I am creating a local sync script that will parse notes, and put them
> into the local couchdb instance, so I'd like to know how to handle
> linefeeds, tags, etc, just to be somehow future-compatible.
>

for now, you'd need to store HTML, so best thing would be for you to
wait until we change it to store Tomboy's XML, and then, just follow
that XML format to store the notes

Reply all
Reply to author
Forward
0 new messages