Using dbus api to sync tomboy

View: New views
7 Messages — Rating Filter:   Alert me  

Using dbus api to sync tomboy

by matt-108 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Howdy. My first post to this list!

I am playing with an experiment that can sync tomboy notes to a server
(It will also use dbus to sync rhythmbox, pidgin, and firefox). I am
using a process on the client that talks to tomboy via dbus, and the
server via the python active resource library (pyactiveresource).

Anyway. The only real problem I am having so far, is having a way to
uniquely identify notes across multiple machines. Obviously the best way
to do that would be to use the guid used in the note files names (like
00e9ce26-fc14-46cc-bcad-5a8184cf65ae.note). But the problem is that I
cannon manually specify the guid that a note will have upon creation.

Can I create a patch for a new dbus method to do this? The best way
would be to create a new dbus method like:
tomboy.CreateNamedNoteWithUri(String uri, String like_title) -> (String ret)

Is that something you want added to tomboy? or is there another way to
do it?

If you want to get a better idea of what I am doing. The project I am
working is here: https://launchpad.net/spacepony. Caution! it is uber
experimental. And will nuke your notes all the time. So back them up
before trying.
_______________________________________________
Tomboy-list mailing list
Tomboy-list@...
http://lists.beatniksoftware.com/listinfo.cgi/tomboy-list-beatniksoftware.com

Re: Using dbus api to sync tomboy

by Sandy Armstrong :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Mon, Apr 27, 2009 at 12:58 AM, Matt Jones <mattjones@...> wrote:

> Howdy. My first post to this list!
>
> I am playing with an experiment that can sync tomboy notes to a server (It
> will also use dbus to sync rhythmbox, pidgin, and firefox). I am using a
> process on the client that talks to tomboy via dbus, and the server via the
> python active resource library (pyactiveresource).
>
> Anyway. The only real problem I am having so far, is having a way to
> uniquely identify notes across multiple machines. Obviously the best way to
> do that would be to use the guid used in the note files names (like
> 00e9ce26-fc14-46cc-bcad-5a8184cf65ae.note). But the problem is that I cannon
> manually specify the guid that a note will have upon creation.
>
> Can I create a patch for a new dbus method to do this? The best way would be
> to create a new dbus method like:
> tomboy.CreateNamedNoteWithUri(String uri, String like_title) -> (String ret)
>
> Is that something you want added to tomboy? or is there another way to do
> it?

Well, normally I would recommend using the existing sync
infrastructure, or perhaps conduit, to avoid duplication of work.  But
that being said, I don't see any problem with adding that method, as
long as it errors-out in the case of guid conflicts or a malformed
guid.

Please file an enhancement bug with a patch in bugzilla.

Good luck with your project,
Sandy
_______________________________________________
Tomboy-list mailing list
Tomboy-list@...
http://lists.beatniksoftware.com/listinfo.cgi/tomboy-list-beatniksoftware.com

Parent Message unknown Re: Using dbus api to sync tomboy

by matt-108 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Yo Doug,

Cool project you have there. I just read through the source code. But
that seems to be more of something for a single user having a way to
backup their notes, with syncing done with the command line auctions (no
offense if it is not. It just looks that way in the code). It seems to
be using the note title(in lower case) as the unique way of identifying
the notes.

What I am trying to do is automatic, real-time syncing. That would work
even if multiple users on different machines were using the notes at the
same time.

Right now I am using the create-date from the xml as the unique
identifier (very scary). Even though the titles are unique, they won't
work because it can be changed. What I want to do is use the note id
(note://tomboy/blah-blah-blah-blah) as the id. But in order to do that,
I will need to specify the note id when creating a note.

If anyone has any better idea, or can help with the dbus stuff, that
would be great.

Doug Johnston wrote:

> Hi Matt,
>
> You seem to be pretty far along in this and know what you're doing,
> but I thought I'd point out another tomboy/dbus-python interface just
> fyi:
> http://tomboycli.googlecode.com
> That script uploads notes to an experimental tomboy website at
> tomboyweb.appspot.com, as well as exposing the rest of the d-bus
> functionality to locally edit notes.
>
> Best,
> Doug
>
> On Mon, Apr 27, 2009 at 12:58 AM, Matt Jones <mattjones@...> wrote:
>  
>> Howdy. My first post to this list!
>>
>> I am playing with an experiment that can sync tomboy notes to a server (It will also use dbus to sync rhythmbox, pidgin, and firefox). I am using a process on the client that talks to tomboy via dbus, and the server via the python active resource library (pyactiveresource).
>>
>> Anyway. The only real problem I am having so far, is having a way to uniquely identify notes across multiple machines. Obviously the best way to do that would be to use the guid used in the note files names (like 00e9ce26-fc14-46cc-bcad-5a8184cf65ae.note). But the problem is that I cannon manually specify the guid that a note will have upon creation.
>>
>> Can I create a patch for a new dbus method to do this? The best way would be to create a new dbus method like:
>> tomboy.CreateNamedNoteWithUri(String uri, String like_title) -> (String ret)
>>
>> Is that something you want added to tomboy? or is there another way to do it?
>>
>> If you want to get a better idea of what I am doing. The project I am working is here: https://launchpad.net/spacepony. Caution! it is uber experimental. And will nuke your notes all the time. So back them up before trying.
>> _______________________________________________
>> Tomboy-list mailing list
>> Tomboy-list@...
>> http://lists.beatniksoftware.com/listinfo.cgi/tomboy-list-beatniksoftware.com
>>    

_______________________________________________
Tomboy-list mailing list
Tomboy-list@...
http://lists.beatniksoftware.com/listinfo.cgi/tomboy-list-beatniksoftware.com

Re: Using dbus api to sync tomboy

by matt-108 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Cool. I'll see if I can do that.

And the reason why it cannot use the existing sync stuff (at least now),
is that it will sync all the desktop settings (pidgin, rhythmboy,
firefox, et cetera). So it would make more sense for that to be external
for those projects, rather than making changes to all of them.

Sandy Armstrong wrote:

> On Mon, Apr 27, 2009 at 12:58 AM, Matt Jones <mattjones@...> wrote:
>  
>> Howdy. My first post to this list!
>>
>> I am playing with an experiment that can sync tomboy notes to a server (It
>> will also use dbus to sync rhythmbox, pidgin, and firefox). I am using a
>> process on the client that talks to tomboy via dbus, and the server via the
>> python active resource library (pyactiveresource).
>>
>> Anyway. The only real problem I am having so far, is having a way to
>> uniquely identify notes across multiple machines. Obviously the best way to
>> do that would be to use the guid used in the note files names (like
>> 00e9ce26-fc14-46cc-bcad-5a8184cf65ae.note). But the problem is that I cannon
>> manually specify the guid that a note will have upon creation.
>>
>> Can I create a patch for a new dbus method to do this? The best way would be
>> to create a new dbus method like:
>> tomboy.CreateNamedNoteWithUri(String uri, String like_title) -> (String ret)
>>
>> Is that something you want added to tomboy? or is there another way to do
>> it?
>>    
>
> Well, normally I would recommend using the existing sync
> infrastructure, or perhaps conduit, to avoid duplication of work.  But
> that being said, I don't see any problem with adding that method, as
> long as it errors-out in the case of guid conflicts or a malformed
> guid.
>
> Please file an enhancement bug with a patch in bugzilla.
>
> Good luck with your project,
> Sandy
>  

_______________________________________________
Tomboy-list mailing list
Tomboy-list@...
http://lists.beatniksoftware.com/listinfo.cgi/tomboy-list-beatniksoftware.com

Re: Using dbus api to sync tomboy

by Doug Johnston :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

It wouldn't be a bad idea at all to put a guid inside the note itself,
just for purposes like this. That way we wouldn't be relying on
filenames.

On Mon, Apr 27, 2009 at 1:39 PM, Matt Jones <mattjones@...> wrote:

> Cool. I'll see if I can do that.
>
> And the reason why it cannot use the existing sync stuff (at least now), is
> that it will sync all the desktop settings (pidgin, rhythmboy, firefox, et
> cetera). So it would make more sense for that to be external for those
> projects, rather than making changes to all of them.
>
> Sandy Armstrong wrote:
>>
>> On Mon, Apr 27, 2009 at 12:58 AM, Matt Jones <mattjones@...>
>> wrote:
>>
>>>
>>> Howdy. My first post to this list!
>>>
>>> I am playing with an experiment that can sync tomboy notes to a server
>>> (It
>>> will also use dbus to sync rhythmbox, pidgin, and firefox). I am using a
>>> process on the client that talks to tomboy via dbus, and the server via
>>> the
>>> python active resource library (pyactiveresource).
>>>
>>> Anyway. The only real problem I am having so far, is having a way to
>>> uniquely identify notes across multiple machines. Obviously the best way
>>> to
>>> do that would be to use the guid used in the note files names (like
>>> 00e9ce26-fc14-46cc-bcad-5a8184cf65ae.note). But the problem is that I
>>> cannon
>>> manually specify the guid that a note will have upon creation.
>>>
>>> Can I create a patch for a new dbus method to do this? The best way would
>>> be
>>> to create a new dbus method like:
>>> tomboy.CreateNamedNoteWithUri(String uri, String like_title) -> (String
>>> ret)
>>>
>>> Is that something you want added to tomboy? or is there another way to do
>>> it?
>>>
>>
>> Well, normally I would recommend using the existing sync
>> infrastructure, or perhaps conduit, to avoid duplication of work.  But
>> that being said, I don't see any problem with adding that method, as
>> long as it errors-out in the case of guid conflicts or a malformed
>> guid.
>>
>> Please file an enhancement bug with a patch in bugzilla.
>>
>> Good luck with your project,
>> Sandy
>>
>
> _______________________________________________
> Tomboy-list mailing list
> Tomboy-list@...
> http://lists.beatniksoftware.com/listinfo.cgi/tomboy-list-beatniksoftware.com
>
_______________________________________________
Tomboy-list mailing list
Tomboy-list@...
http://lists.beatniksoftware.com/listinfo.cgi/tomboy-list-beatniksoftware.com

Re: Using dbus api to sync tomboy

by matt-108 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

I was thinking that when looking at the xml.

We also have the title in the xml twice. That is something to think
about when whoever makes the next note version (version 4 I think).


Doug Johnston wrote:

> It wouldn't be a bad idea at all to put a guid inside the note itself,
> just for purposes like this. That way we wouldn't be relying on
> filenames.
>
> On Mon, Apr 27, 2009 at 1:39 PM, Matt Jones <mattjones@...> wrote:
>  
>> Cool. I'll see if I can do that.
>>
>> And the reason why it cannot use the existing sync stuff (at least now), is
>> that it will sync all the desktop settings (pidgin, rhythmboy, firefox, et
>> cetera). So it would make more sense for that to be external for those
>> projects, rather than making changes to all of them.
>>
>> Sandy Armstrong wrote:
>>    
>>> On Mon, Apr 27, 2009 at 12:58 AM, Matt Jones <mattjones@...>
>>> wrote:
>>>
>>>      
>>>> Howdy. My first post to this list!
>>>>
>>>> I am playing with an experiment that can sync tomboy notes to a server
>>>> (It
>>>> will also use dbus to sync rhythmbox, pidgin, and firefox). I am using a
>>>> process on the client that talks to tomboy via dbus, and the server via
>>>> the
>>>> python active resource library (pyactiveresource).
>>>>
>>>> Anyway. The only real problem I am having so far, is having a way to
>>>> uniquely identify notes across multiple machines. Obviously the best way
>>>> to
>>>> do that would be to use the guid used in the note files names (like
>>>> 00e9ce26-fc14-46cc-bcad-5a8184cf65ae.note). But the problem is that I
>>>> cannon
>>>> manually specify the guid that a note will have upon creation.
>>>>
>>>> Can I create a patch for a new dbus method to do this? The best way would
>>>> be
>>>> to create a new dbus method like:
>>>> tomboy.CreateNamedNoteWithUri(String uri, String like_title) -> (String
>>>> ret)
>>>>
>>>> Is that something you want added to tomboy? or is there another way to do
>>>> it?
>>>>
>>>>        
>>> Well, normally I would recommend using the existing sync
>>> infrastructure, or perhaps conduit, to avoid duplication of work.  But
>>> that being said, I don't see any problem with adding that method, as
>>> long as it errors-out in the case of guid conflicts or a malformed
>>> guid.
>>>
>>> Please file an enhancement bug with a patch in bugzilla.
>>>
>>> Good luck with your project,
>>> Sandy
>>>
>>>      
>> _______________________________________________
>> Tomboy-list mailing list
>> Tomboy-list@...
>> http://lists.beatniksoftware.com/listinfo.cgi/tomboy-list-beatniksoftware.com
>>
>>    

_______________________________________________
Tomboy-list mailing list
Tomboy-list@...
http://lists.beatniksoftware.com/listinfo.cgi/tomboy-list-beatniksoftware.com

Re: Using dbus api to sync tomboy

by matt-108 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

plink:

Here is the bug with patch if anyone wants to see:
http://bugzilla.gnome.org/show_bug.cgi?id=580525

Hopefully my bugzilla fu is not too bad

Matt Jones wrote:

> Cool. I'll see if I can do that.
>
> And the reason why it cannot use the existing sync stuff (at least
> now), is that it will sync all the desktop settings (pidgin,
> rhythmboy, firefox, et cetera). So it would make more sense for that
> to be external for those projects, rather than making changes to all
> of them.
>
> Sandy Armstrong wrote:
>> On Mon, Apr 27, 2009 at 12:58 AM, Matt Jones
>> <mattjones@...> wrote:
>>> Howdy. My first post to this list!
>>>
>>> I am playing with an experiment that can sync tomboy notes to a
>>> server (It
>>> will also use dbus to sync rhythmbox, pidgin, and firefox). I am
>>> using a
>>> process on the client that talks to tomboy via dbus, and the server
>>> via the
>>> python active resource library (pyactiveresource).
>>>
>>> Anyway. The only real problem I am having so far, is having a way to
>>> uniquely identify notes across multiple machines. Obviously the best
>>> way to
>>> do that would be to use the guid used in the note files names (like
>>> 00e9ce26-fc14-46cc-bcad-5a8184cf65ae.note). But the problem is that
>>> I cannon
>>> manually specify the guid that a note will have upon creation.
>>>
>>> Can I create a patch for a new dbus method to do this? The best way
>>> would be
>>> to create a new dbus method like:
>>> tomboy.CreateNamedNoteWithUri(String uri, String like_title) ->
>>> (String ret)
>>>
>>> Is that something you want added to tomboy? or is there another way
>>> to do
>>> it?
>>
>> Well, normally I would recommend using the existing sync
>> infrastructure, or perhaps conduit, to avoid duplication of work. But
>> that being said, I don't see any problem with adding that method, as
>> long as it errors-out in the case of guid conflicts or a malformed
>> guid.
>>
>> Please file an enhancement bug with a patch in bugzilla.
>>
>> Good luck with your project,
>> Sandy
>
> _______________________________________________
> Tomboy-list mailing list
> Tomboy-list@...
> http://lists.beatniksoftware.com/listinfo.cgi/tomboy-list-beatniksoftware.com 
>

_______________________________________________
Tomboy-list mailing list
Tomboy-list@...
http://lists.beatniksoftware.com/listinfo.cgi/tomboy-list-beatniksoftware.com