Thread
:
[Announce] DropN900 - the maemo 5 DropBox client
View Single Post
sm8ps
2011-09-16 , 23:50
Posts: 15 | Thanked: 11 times | Joined on Jun 2010 @ Switzerland
#
372
[Updated 20111025, see below]
Dear all
I have been using Jonnenau's Dropn900 for several months now(*). I especially like the "sync media" feature as it perfectly fits into my work flow. During a work day I take several pictures that need to be downloaded from the device, re-formatted and then put onto some web site. Dropn900 spares me from hooking up the device to my computer for pulling the images over. Instead it pushes the image files right into a location on my Dropbox folder from where I can access them.
The only thing that really bugged me was the fact that deleting pictures from my Dropbox folder made Dropn900 prompt for uploading them again at the next media synchronization. Thus my image folder was getting filled with obsolete pictures that I could not get rid of in any other way than manually deleting them from the N900.
(*) I must admit that I have not been using the true Dropbox features of the app much. Mainly because I access those files from my laptop. Yet also because the regular synchronization suffers from similar issues as the media synchronization.
Having just recently acquired a copy of the Python Pocket Reference by O'Reilly Media, I decided it was time to step into action. Having had no prior experience with Python and being by no means an expert programmer of any kind, I could not help but admire Jonnenau's clean programming style. It was very easy to find an entry point for my endeavor. Equally so to study his way of handling the comparison of local and remote files.
Within less than about an hour I had understood enough of the code to add the "Purge Media" option to the "Sync Media" menu which will delete all local camera files that are not already present on the remote Dropbox. The names of the purged files are logged.
ˇWARNING: this option will also
erase
any files that have not been up-loaded to Dropbox yet!
An adapted work flow will prevent data-loss.
1.) Synchronize all camera media from N900 to Dropbox.
2.) Delete obsolete camera media files from Dropbox.
3.) Only then purge camera media files from N900.
I hope to have chosen a drastic enough expression by "purge" -- evocating the proverbial purgatory -- to make everybody think twice before light-heartedly pushing the button.
Be aware that this does not apply to the regular synchronization of files and folders. The rationale is that camera media usually is not modified locally and therefore does not need to be truly synchronized but in fact only be up-loaded from the N900 to Dropbox.
ˇ If your own personal work flow makes you modify camera media on the N900 [after up-loading to Dropbox] then DO NOT follow these instructions!
Find attached a patch to update the file '/opt/dropn900/transfers.py'. If you are ignorant about how to work with patches (like myself half an hour ago) then let me give you some advice. From the terminal as root:
1.) mv transfers.py.patch.txt /opt/dropn900/ [changed 20111025: new patch file]
2.) cd /opt/dropn900/
2.a) cp transfers.py transfers.py.bak [added 20111025]
3.) patch -i transfers.py.patch.txt [20111025: option '-b' removed]
This will apply the patch to the file '/opt/dropn900/transfers.py'. If need be, you can easily revert to Jonnenau's original version.
I would like to express how thankful I am towards Jonnenau for providing the community with his great work. Furthermore this whole episode makes me feel very proud of not only being part of an open source community but finally contributing some (albeit small) share to our overall progress. Now I can join the exclusive club of Linux hacker savants -- simply hoping I did not mess up anything!
Sincerely,
Stefan Mueller
Switzerland
Update 20111025: I must have done the patching on my laptop computer but I do not remember. For I encountered the same difficulties as user noetus. So I adapted the instructions as well as the patch file. Sorry again for any trouble caused! -- Hope I got it right this time!
Attached Files
transfers.py.patch.txt
(2.1 KB, 110 views)
Last edited by sm8ps; 2011-10-25 at
18:54
. Reason: Original instructions did not work and needed correction; ditto for patch file.
Quote & Reply
|
The Following 7 Users Say Thank You to sm8ps For This Useful Post:
demolition
,
ejasmudar
,
JamesBond@ge
,
JimKnopf
,
marxian
,
Pigro
,
slender
sm8ps
View Public Profile
Send a private message to sm8ps
Find all posts by sm8ps