tomboy-notes / tomdroid

Tomboy notes on Android
https://play.google.com/store/apps/details?id=org.tomdroid
GNU Lesser General Public License v2.1
18 stars 14 forks source link

sd card sync method doesn't recursively scan directories #94

Open obilodeau opened 8 years ago

obilodeau commented 8 years ago

One way to get the sync behaviour between the linux client and the android client you are working on is to use a dropbox folder and the dropsync app for android to keep the .note files synchronised across machines and mobile devices. However the folder structure for these backup files often fracture for reasons unknown to me into a folder structure such as this

RootTomboyBackupDir: /0/0/.note /0/1/.note /0/2/*.note etc

Which would be fine if the android client could recursively scan the RootTomboyBackupDir to find notes in all subsequent folders, but as it is at the time of writing this, it requires you to pick which subdirectory 0/0/ or 0/1/ or 0/2/ you wish to use with the android apps synchronisation method, thus ignoring files in any other folder that may exist alongside the one you select.

Additionally... and this may not be within your abilities to change, but the notes that are successfully amended via the dropbox sync method back to the shared backup folder; these changed files are not read back into the desktop program when it is told to synchronise. I do not know if that is a manifest.xml issue or a .note meta data issue, but if you can affect that issue it would complete the final rudiment for making this pipeline work as far as I have seen so far.

thanks


Imported from Launchpad using lp2gh.

obilodeau commented 8 years ago

(by dan-u) oh and I am using android 4.1.2 and just installed the most recent version of tomdroid i could find a half hour ago which is 0.7.2.

obilodeau commented 8 years ago

(by marin-diamante) same problem, using tomdroid 0.6.1 on android 2.3

obilodeau commented 8 years ago

(by bill-4) I seem to have the same problem.

I configure tomdroid to sync to /tomboy, and it syncs new files (*.note + manifest.xml) into /tomboy/0

I configure tomboy 1.12.2 to also sync (through dropbox) into that same /tomboy dir, and it syncs new files into /tomboy/0/0 (and above, i.e. /tomboy/0/[0-9]). likewise, it syncs *.note + manifest.xml files there.

tomboy won't see tomdroid's syncs, and neither will tomdroid see tomboy's.

If I configure tomdroid to use /tomboy/0/0, it will successfully find the tomboy files from there, but not others in peer directories. If I create a new file with tomdroid, it will be uploaded into /tomboy/0/0, but tomboy doesn't see it.

Awesome looking app; really hope you can work this out. Syncing is really critical, and the server sync seems to be a dead end :( ubuntu/note seems to be gone and the diy servers rely on nasty frameworks. Ideal would be if tomboy and tomdroid could sync by something more standard like dropbox or even a common folder via ssh. I know syncing is really hard, especially with no locking. Hope something useful can be done.

Thanks!

obilodeau commented 8 years ago

(by bill-4) should have mentioned: this is tomdroid 0.7.2

obilodeau commented 8 years ago

(by j-4) Hi!

Thanks for you bugreports! This issue is tricky, as we do not maintain a manifest.xml file and the paths are created depending on the notes revision number, which is again stored in the manifest.xml

So if we want to get the notes into the same valid folder structure, we also have to create a manifest.xml file upon sync.

In principal this means, we have to port some code from here: https://git.gnome.org/browse/tomboy/tree/Tomboy/Synchronization/FileSystemSyncServer.cs

I will have a look asap, but please be patient as this probably won't be included that fast (we are in feature freeze at the moment.)

However, there will be a public sync server soon as Rainy makes a lot of progress lately (Timo is working on it during google summer of code!): http://exceptionrethrown.wordpress.com/2013/07/09/gsoc-2013-first-progress-report/

obilodeau commented 8 years ago

(by fred-nijdam) Hi, I'm still suffering this problem - is it already solved. Using Tomdroid 0.7.5 asus Android & Tomboy 1.15.2 Ubuntu 13.10 & dropbox latest version dropbox. Or is there an alternative. THX already.

obilodeau commented 8 years ago

(by fayadmf) Hi Fred, this is much awaited and is targeted to feature in 0.8 release as said in this bug report. For the time being root level sync or a single folder sync is what is possible I think.

obilodeau commented 8 years ago

(by mchelen) Just to be clear, currently there is no way to sync Tomdroid with Tomboy desktop using the filesystem? Definitely looking forward to having this option, thanks for letting us know it is a planned feature.

obilodeau commented 8 years ago

(by clauderwerner) I actually found a bit of a "hack". Using SSH from Ubuntu I copy everything inside Tomdroid's folder into /Tomboy/0/0 and then copy the manifest.xml also to the two outside folder i.e. /Tomboy/0 and /Tomboy.

For the reverse procedure you just need to copy from /Tomboy/0/0 to the Tomdroid folder. Pain im the a\ if you ask me...

obilodeau commented 8 years ago

(by clauderwerner) Oh no! My apologies. You also have to add to the manifest any note created by Tomdroid. I don't understand why it doesn't do it on its own.

obilodeau commented 8 years ago

(by georg-selbstbestimmt) Same here, with latest Tomdroid from the Playstore, on a Android 5.0.1 and 4.4.1 device, resp., to be synced via Dropbox and FolderSync with my Ubuntu Tomboy folder. Had a small stage win by syncing with the original Tomboy folder in /.local/share/, since this one does not have the subfolder structure with manifests. But again, new notes from the desktop do not show up in Tomdroid. Is it because I use different notebooks on the desktop?

obilodeau commented 8 years ago

(by pledisque) I used the following workaround : instead of using Sync option, I defined on Tomboy side (Ubuntu desktop) the TOMBOY_PATH variable to move the default notes folder (always flat structure here) to the "Cloud sync" folder. Doing so, there is no more issues with TomDroid. (see my french post http://pled.fr/?p=9590 for more details)

Hope that helps !

obilodeau commented 8 years ago

(by rogmar) thanks pled y folow your post and problem solve! it works fine! defining the TOMBOY_PATH variable to one new Tomboy folder in to my Dropbox .

sesom42 commented 7 years ago

Here is a problem: if new messages are synchronized to the internal storage of Tomboy, they are not automatically displayed in Tomboy. Tomboy must first be closed and reopened. This is inefficient and error-prone.

The Tomboy sync function to a local directory creates subdirectories depending on the revision of the note. Unfortunately, Tomdroid can not handle this directory structure. Tomdroid sync function expects only a flat structure in the synchronized directory.

Both programs have the possibility to synchronize the notices with a folder. However, the folder structure is incompatible. Can this be made compatible?

sesom42 commented 7 years ago

Found a temporary solution: after enabling the Note Directory Watcher plugin Tomboy recognize synchronized notes.

alex-ter commented 7 years ago

@sesom42, thanks for sharing. In such setup Note Directory Watcher is actually a proper way to go and not just a workaround. Tomboy by design doesn't dynamically recognize notes added by some external process to notes dir and Watcher plugin was created for that.

joshp23 commented 6 years ago

This bug is nearly 5 years old now, how close is this to being fixed? How is progress going?

My work around has been to just have Syncthing keep the root directory of Tomdroid in sync with the roots of Tomboy or Gnote, respectively, on my laptop and desktop. I also sync this to my server for super-redundant backups and web access via the Gnoted script I threw together, which I am beginning work on for editing notes. It has come to my attention that the "sync to folder" option in Gnote/Tomboy is preferable, partly due the revision system used, so having an idea of when Tomdroid will work with this would be great.

obilodeau commented 6 years ago

Tomdroid has no maintainer nor active developers. Nothing will happen before someone steps up to take any of these roles.

On Sat, Nov 11, 2017, 5:31 PM Josh Panter, notifications@github.com wrote:

This bug is nearly 5 years https://bugs.launchpad.net/tomdroid/+bug/1159329 old now, how close is this to being fixed? How is progress going?

My work around has been to just have Syncthing https://syncthing.net/ keep the root directory of Tomdroid in sync with the roots of Tomboy or Gnote, respectively, on my laptop and desktop. I also sync this to my server for super-redundant backups and web access via the Gnoted https://github.com/joshp23/Gnoted script I threw together, which I am beginning work on for editing notes. It has come to my attention that the "sync to folder" option in Gnote/Tomboy is preferable, partly due the revision system used, so having an idea of when Tomdroid will work with this would be great.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/tomboy-notes/tomdroid/issues/94#issuecomment-343698486, or mute the thread https://github.com/notifications/unsubscribe-auth/AAhWFfRv-Ynq_7J99-ARQR3vnfK7Iuf_ks5s1h-0gaJpZM4Jqhco .