maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Applications (https://talk.maemo.org/forumdisplay.php?f=41)
-   -   [Announce] DropN900 - the maemo 5 DropBox client (https://talk.maemo.org/showthread.php?t=58882)

carbonjha 2013-03-22 22:38

Re: [Announce] DropN900 - the maemo 5 DropBox client
 
I dont have any issue right now. My app was authorized long ago.
But there's some changes in authentication API. New user might have problems. If I can manage some time I'll research on it.

Anyone interested can check these links I thought useful.

Core API version 0 migration guide
REST API

sonofabit 2013-04-23 19:56

Re: [Announce] DropN900 - the maemo 5 DropBox client
 
Anyone know how to migrate dropn900 to api 1? I tried tinkering with py files, but it's too much for me ;) And i'd really like to be able to use dropbox on my n900... Yes, yes, i know... I should've installed it earlier, but only recently i've got a need to use it... So... Anyone has any ideas?

Marshall Banana 2013-05-01 13:15

DropN900 for new dropbox API
 
3 Attachment(s)
Over the last few weeks i ported DropN900 to the new dropbox API

Warning


This may destroy your dropbox or mess up your N900 root file system. Use it at your own risk, make a backup if you want to be safe.
I didn't destroy my dropbox or N900 root filesystem with it so far.

Update

30-06-13
Version 0.2.2
  • Fixed bug: Syncing was not possible when dropbox contains empty files (thx to new_guy)
  • Filenames with non-ascii characters are now supported, old dropbox api did only allow ascii-chars

20-05-13
Version 0.2.1
05-05-13
Version 0.2.0
03-05-13
Installing
  • Install the old DropN900 from the repos/application manager
  • Make sure you have this 2 packages installed: python-setuptools, python-openssl
  • Download the attached files dropn900.0.2.2.tar.gz and dp_api_v1.tar.gz to /home/user/MyDocs
  • You will need dp_api_v1.tar.gz even if you already have installed the files from the Dropbox Python SDK because i had to modifiy the API. Ancient N900 python has no ssl module, so I ported the API to use OpenSSL.
  • start xterm and do sudo gainroot
  • Untar dropn900.0.2.2.tar.gz into /opt/dropn900:
    Code:

    tar -xvzf MyDocs/dropn900.0.2.2.tar.gz -C /opt/dropn900
  • Untar dp_api_v1.tar.gz into /opt/pymaemo/usr/lib/python2.5/site-packages/dropbox:
    Code:

    tar -xvzf MyDocs/dp_api_v1.tar.gz -C /opt/pymaemo/usr/lib/python2.5/site-packages/dropbox

Authentication

The new dropbox API uses a different approach for authentication. You have to grant DropN900 access to your dropbox via the dropbox website.
When you start DropN900 you will see the following window:

https://dl.dropboxusercontent.com/s/...501-132720.png

The "Take me to authentication page" button is grayed out until DropN900 has generated a request token with the dropbox api. Press the button and log into your dropbox account in the browser and give DropN900 access to your dropbox.
After closing the browser window, press the "Request auth token" button:

https://dl.dropboxusercontent.com/s/...501-133024.png

After that DropN900 receives an access token and logs into your dropbox account. That access token is stored until you press the "Reset Current Authentication" button in the settings window.

Bugs
  • Deleting the root folder does not work. Did this work with the old DropN900?
  • (The button in the settings menu for choosing the synchronization folder does not show any text for me. Did it show the folder path in the old DropN900?) <-Solved
  • Files in deleted and recreated folders can not be downloaded, removed or renamed
  • Please report any bugs you find. I never used DropN900 with the old api, so please report anything that doesn't work as in the old version.

nokiabot 2013-05-01 14:22

Re: [Announce] DropN900 - the maemo 5 DropBox client
 
Finally we have it up and running.:)
to the dev repo pls

memeces 2013-05-02 19:55

Re: DropN900 for new dropbox API
 
1 Attachment(s)
Quote:

Originally Posted by Marshall Banana (Post 1340431)
Over the last few weeks i ported DropN900 to the new dropbox API

Warning

  • The button in the settings menu for choosing the synchronization folder does not show any text for me. Did it show the folder path in the old DropN900?

Today I noticed that my DropN900 was not connecting to the DropBox server. Thankfully I found your posts. I will try to follow your indications to keep my DropBox going in my beloved N900. Answering your question I am sending you a screenshot of the Settings window of my DropN900 application before installing your upgrading.

Marshall Banana 2013-05-02 20:34

Re: DropN900 for new dropbox API
 
memeces: Thx for your screenshot. But i mean the button for choosing the remote folder. Have a look at the first post of this thread, third picture.
I'll have a look at this issue on weekend. Hopefully i'll get ready to put a new version of dropn900 into extras/devel on weekend, too.

memeces 2013-05-03 10:48

Re: DropN900 for new dropbox API
 
Marshall Banana. All right. I was not getting any text on that button. But I cannot send you a screenshot because I have already installed your upgrading. Now it connects to the DropBox server and reads the files there but the synchronization is not working. It never ends. Looking at the log file I get a never ending list of errors, always with the dollowing message:

[SYNC ERROR]: Error parsing path in SyncResult.check_local_path()

Does anybody have a suggestion?

As an alternative for DropBox I have tried Ubuntu One, but the programs for the N900 do not allow for synchronization, as far as I know.

Marshall Banana 2013-05-03 13:18

Re: DropN900 for new dropbox API
 
memeces: thx for testing.

Please try the following:
Check the file /home/user/.dropn900/settings.ini, it should be something like this:

[download]
default-folder = /home/user/MyDocs/DropN900/
no-dialog = true

[automated-sync]
only-sync-on-wlan = false
update-interval = 10
sync-path = /
enabled = false

[authentication]
store-auth = true

Next: Start DropN900 and open the settings window. Set a local path, e. g. /home/user/MyDocs/DropN900. Under synchronizing press the button with no text, which we already talked about, and select the root folder /. Store the settings and check the settings.ini file again.

If your settings are correct and you still cannot sync plz report back and i'll make a dropn900 version with extended logging.

Viqsi 2013-05-03 18:20

Re: [Announce] DropN900 - the maemo 5 DropBox client
 
I needed to install two additional packages to make this work:
python-setuptools
python-openssl

After that, though, it worked just fine.

memeces 2013-05-04 11:19

Re: [Announce] DropN900 - the maemo 5 DropBox client
 
Quote:

Originally Posted by Viqsi (Post 1340976)
I needed to install two additional packages to make this work:
python-setuptools
python-openssl

After that, though, it worked just fine.


I did not succeed installing the two python packages. I am not very familiar with Linux commands. With what I tried I got the following error messages:

Code:

~ $ sudo gainroot
Root shell enabled

BusyBox v1.10.2 (Debian 3:1.10.2.legal-1osso30+0m5) built-in shell (ash)
Enter 'help' for a list of built-in commands.

/home/user # apt-get install python-setuptools
Reading package lists... Error!
E: Problem parsing dependency Depends
E: Error occurred while processing libqtm-12 (NewVersion1)
E: Problem with MergeList /var/lib/apt/lists/repository.maemo.org_extras-devel_dists_fremantle_free_binary-armel_Packages
E: The package lists or status file could not be parsed or opened.
/home/user #
/home/user # apt-get install python-openssl 
Reading package lists... Error!
E: Problem parsing dependency Depends
E: Error occurred while processing libqtm-12 (NewVersion1)
E: Problem with MergeList /var/lib/apt/lists/repository.maemo.org_extras-devel_dists_fremantle_free_binary-armel_Packages
E: The package lists or status file could not be parsed or opened.
/home/user #

Could somebody tell me what I am doing wrong? Many thanks in advance.

Marshall Banana 2013-05-04 18:49

Re: [Announce] DropN900 - the maemo 5 DropBox client
 
memeces: Your package lists may be broken. You can rebuild them like described here

memeces 2013-05-05 10:44

Re: [Announce] DropN900 - the maemo 5 DropBox client
 
Quote:

Originally Posted by Marshall Banana (Post 1341244)
memeces: Your package lists may be broken. You can rebuild them like described here

Many thanks, Marshall Banana. With your indications I solved the problem and I was able to install the python apps. Now DropN900 connects to the DropBox server, solves the differences between the remote and the local file trees but fails at sync. The program never ends the synchronization. In fact it seems that it finds a problem with the connection. Could it be that there are many files and the time elapsed is above the limit? The log files says this:

Code:

10:21:52 [NETWORK]: Starting network connection monitoring...
10:21:53 -[CONFIG]: Found existing access token
10:21:53 [NETWORK]: Requesting for a network connection...
10:21:53 [NETWORK]: Device online: connected with WLAN_INFRA
10:21:53 [NETWORK]: Network connection established, fetching root metadata
10:21:55 ---[AUTH]: Account data received for *****

10:28:06 ---[SYNC]: Downloading 913 files from 17 folders, total of 51.9 MB
10:28:07 ---[SYNC]: Uploading 81 files and 0 folders, total of 27.6 MB
10:31:15 [TRANSFER ERROR]: Download of download failed, no connection?
10:31:15 [TRANSFER ERROR]: >>Error connecting to "api-content.dropbox.com": (110, 'Connection timed out')


Marshall Banana 2013-05-05 13:09

Re: [Announce] DropN900 - the maemo 5 DropBox client
 
memeces: Please try to manually download and upload files with the "DOWNLOAD" and "UPLOAD FILE" buttons. If manual download and uploads work, try to download the biggest file you have on your dropbox. I think this could be another buffer size problem

memeces 2013-05-05 17:22

Re: [Announce] DropN900 - the maemo 5 DropBox client
 
Quote:

Originally Posted by Marshall Banana (Post 1341460)
memees: Please try to manually download and upload files with the "DOWNLOAD" and "UPLOAD FILE" buttons. If manual download and uploads work, try to download the biggest file you have on your dropbox. I think this could be another buffer size problem

Marshall Banana, I followed your instructions. Uploading of files is working fine. But download is not working. DropN900 does apparently follow the orders and says that the download is complete but the file is nowhere in the local directory. If I go to the Transfers window the file appears as downloaded and it points to the folder where I should find the file, but it is not there.

Marshall Banana 2013-05-05 22:17

Re: [Announce] DropN900 - the maemo 5 DropBox client
 
Quote:

Originally Posted by memeces (Post 1341498)
Marshall Banana, I followed your instructions. Uploading of files is working fine. But download is not working. DropN900 does apparently follow the orders and says that the download is complete but the file is nowhere in the local directory. If I go to the Transfers window the file appears as downloaded and it points to the folder where I should find the file, but it is not there.

After solving the "button with no text" bug i did some code cleanup and broke the download functionallity with it. I've no idea why i didn't see this when testing after the cleanup. I made a new version here. Please redownload dropn900.tar.gz and untar it into /opt/dropn900. Afterwards syncing should work for you.

nimble 2013-05-08 00:23

Re: [Announce] DropN900 - the maemo 5 DropBox client
 
I just use the Dropbox app for uploading my photos and your update worked perfectly for that purpose. Thanks very much for writing and sharing this code!

memeces 2013-05-08 15:04

Re: [Announce] DropN900 - the maemo 5 DropBox client
 
Quote:

Originally Posted by Marshall Banana (Post 1341544)
After solving the "button with no text" bug i did some code cleanup and broke the download functionallity with it. I've no idea why i didn't see this when testing after the cleanup. I made a new version here. Please redownload dropn900.tar.gz and untar it into /opt/dropn900. Afterwards syncing should work for you.

Marshall Banana, thank you very much for your new version. I have been doing some checking after installing it. Today I got the first total succesful synchronization. I have many files in DropBox and up to now the sync did never finish completely. First of all DropN900 did have to download again all files to the phone. It did not recognize that many of the files were still identical. Second, the sync did stop at some files. I do not know the reason but fortunately these were not critical and some of them were auxiliary files. After cleaning them in my desktop DropBox folder the sync was able to continue next time. Afterwards the sync seems to be working as expected. I still miss the possibility in the original version of synchronizing only a folder and its subfolders, so that I can avoid syncing all my DropBox files to my mobile devices. Otherwise the program is working perfectly with the new DropBox API. Thank you very much again for your nice work.

Marshall Banana 2013-05-08 17:30

Re: [Announce] DropN900 - the maemo 5 DropBox client
 
Quote:

Originally Posted by memeces (Post 1342113)
Marshall Banana, thank you very much for your new version. I have been doing some checking after installing it. Today I got the first total succesful synchronization. I have many files in DropBox and up to now the sync did never finish completely. First of all DropN900 did have to download again all files to the phone. It did not recognize that many of the files were still identical. Second, the sync did stop at some files. I do not know the reason but fortunately these were not critical and some of them were auxiliary files. After cleaning them in my desktop DropBox folder the sync was able to continue next time. Afterwards the sync seems to be working as expected. I still miss the possibility in the original version of synchronizing only a folder and its subfolders, so that I can avoid syncing all my DropBox files to my mobile devices. Otherwise the program is working perfectly with the new DropBox API. Thank you very much again for your nice work.

I'm glad that it's working for you now. Syncing only a subfolder should work if you select it as sync path in the settings. I just tried it with one of the subfolders of my dropbox. I just told you to select the root folder / as sync path because the handling with the root folder changed with the new API and i presumed you wanted to sync your whole dropbox.

Raimu 2013-05-08 20:29

Re: [Announce] DropN900 - the maemo 5 DropBox client
 
Terrific job Marshall! I can confirm upload and download functionality working - that's what I use.

getnani 2013-05-11 11:38

Re: [Announce] DropN900 - the maemo 5 DropBox client
 
i am unable to authenticate the issue started today. anybody else in my boat??!!! please help!!!!!

r2zt 2013-05-11 15:36

Re: [Announce] DropN900 - the maemo 5 DropBox client
 
Same here, unable to authenticate. It shows "Email and/or password invalid".. re-installed package..same error

log shows,
[CONFIG] : No stored access token found
__________________________________________________ ____
Edited:

Problem solved. Many thanks to Marshall Banana :)

Kossuth 2013-05-15 06:12

Re: [Announce] DropN900 - the maemo 5 DropBox client
 
How did you solve the login problem? I'm having it too.

Edit: Found out that you have to manually install some stuff and authenticate the new client in dropbox website

http://talk.maemo.org/showpost.php?p...&postcount=443

jonnenau 2013-05-15 19:33

Re: [Announce] DropN900 - the maemo 5 DropBox client
 
Hello everyone!

Noticed people have been messaging me that DropN900 does not work anymore. This is because afaik Dropbox deprecated the API version this app it using.

I posted a short update to the gihub readme here https://github.com/jonnenauha/DropN900#readme

However now that I came here I noticed someone has picked up the code and updated to the new API :) That is great, at least me sharing my code in the first place now has some value.

Sometimes I still think I should one day make a better dropbox client with C++ and a proper usable UI but I don't have time :(

Ken-Young 2013-05-15 21:02

Re: [Announce] DropN900 - the maemo 5 DropBox client
 
Quote:

Originally Posted by jonnenau (Post 1343886)
Hello everyone!
[...]
Sometimes I still think I should one day make a better dropbox client with C++ and a proper usable UI but I don't have time :(

Well, even though it has a few rough edges, DropN900 is very valuable. I use it a LOT.

Raimu 2013-05-16 21:55

Re: [Announce] DropN900 - the maemo 5 DropBox client
 
Great avatar by the way, Marshall!

Marshall Banana 2013-05-20 20:36

Re: [Announce] DropN900 - the maemo 5 DropBox client
 
New version available. I updated my original post

Version 0.2.1
Atm there is no (documentated) way to remove a share with the Dropbox API. The only way to remove a share is with the dropbox webinterface.

Btw: I still can't upload to extras-devel :(, but eventually i'll get that fixed too.

nokiabot 2013-05-20 20:41

Re: [Announce] DropN900 - the maemo 5 DropBox client
 
Quote:

Originally Posted by Marshall Banana (Post 1345402)
New version available. I updated my original post

Version 0.2.1
Atm there is no (documentated) way to remove a share with the Dropbox API. The only way to remove a share is with the dropbox webinterface.

Btw: I still can't upload to extras-devel :(, but eventually i'll get that fixed too.

good job:)
why not push to extras or extras testing:)

Marshall Banana 2013-05-20 20:54

Re: [Announce] DropN900 - the maemo 5 DropBox client
 
Quote:

Originally Posted by nokiabot (Post 1345404)
good job:)
why not push to extras or extras testing:)

You need an invitation to upload to extras and extras-devel. It seems that i'm the frist new "developer" since the migration of the infrastructure from nokia to the community. It looks like my request for invitation goes to /dev/null or nobody reads it.

nokiabot 2013-05-29 09:23

Re: [Announce] DropN900 - the maemo 5 DropBox client
 
Whats up ! :)

thedead1440 2013-05-29 11:34

Re: [Announce] DropN900 - the maemo 5 DropBox client
 
Quote:

Originally Posted by Marshall Banana (Post 1345406)
You need an invitation to upload to extras and extras-devel. It seems that i'm the frist new "developer" since the migration of the infrastructure from nokia to the community. It looks like my request for invitation goes to /dev/null or nobody reads it.

Hi could you try sending an email requesting for upload rights to garage@maemo.org with your maemo.org username.

Marshall Banana 2013-05-29 17:37

Re: [Announce] DropN900 - the maemo 5 DropBox client
 
Quote:

Originally Posted by thedead1440 (Post 1347702)
Hi could you try sending an email requesting for upload rights to garage@maemo.org with your maemo.org username.

Done.

Let's see what happens now :)

nokiabot 2013-06-14 09:29

Re: [Announce] DropN900 - the maemo 5 DropBox client
 
Damm garage ,, ? Why so late to invite banana to the repo party ! :)

new_guy 2013-06-22 07:53

Re: [Announce] DropN900 - the maemo 5 DropBox client
 
Thanks for the good work. Unfortunately I have noticed a (hopefully minor) bug:

When having zero-byte files (e. g. empty __init__.py-files) among those files which are synchronized the download process hangs and does not finish. Uploading zero-byte files and manually downloading works perfectly.

nomidi 2013-06-24 12:56

Re: [Announce] DropN900 - the maemo 5 DropBox client
 
I can't install python-openssl, code:

/home/user # apt-get install python-openssl
Reading package lists... Done
Building dependency tree
Reading state information... Done
Package python-openssl is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
E: Package python-openssl has no installation candidate

The python-setuptools installation went OK (I guess). Any ideas?

Garrett_PL 2013-06-24 14:48

Re: [Announce] DropN900 - the maemo 5 DropBox client
 
Quote:

Originally Posted by nomidi (Post 1354391)
I can't install python-openssl, code:

/home/user # apt-get install python-openssl
Reading package lists... Done
Building dependency tree
Reading state information... Done
Package python-openssl is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
E: Package python-openssl has no installation candidate

The python-setuptools installation went OK (I guess). Any ideas?

You might to enable catalogues in Aplication Menager, check in there which one of them You have. Or go and find the package in browser / download the .deb and install it with dpkg -i.

nomidi 2013-06-24 15:44

Re: [Announce] DropN900 - the maemo 5 DropBox client
 
Garrett_PL: I have enabled extras-devel and -testing. Can you point me to the right deb file, thanks. I'm not familiar with dpkg -i.

Garrett_PL 2013-06-24 16:47

Re: [Announce] DropN900 - the maemo 5 DropBox client
 
Quote:

Originally Posted by nomidi (Post 1354423)
Garrett_PL: I have enabled extras-devel and -testing. Can you point me to the right deb file, thanks. I'm not familiar with dpkg -i.

Check the repos, somethimes You have to disable and enable it to make it work. In app menager You will see red warning that it couldn't connect with choosen repository - maybe that's the case.
If You want to look for the package, that is version I've installed prior to DB:

Quote:

Python-openssl 0.7-2maemo2
So You'll find the .deb no problem. After saving in (for example .images) open xterm and as root execute:

Quote:

dpkg -i /home/user/MyDocs/.images/python-openssl 0.7-2maemo2.deb
That's it. But I was doing it (installing openssl) week or so ago, due to rolling back to CSSU T7.1 with BackUp menu (f.ed up ring tones) and I had no problems with that.

nomidi 2013-06-24 18:15

Re: [Announce] DropN900 - the maemo 5 DropBox client
 
I downloaded the package into MyDocs:

/home/user # dpkg -i /home/user/MyDocs/python-openssl 0.7-2maemo2.deb
dpkg: error processing /home/user/MyDocs/python-openssl (--install):
cannot access archive: No such file or directory
dpkg: error processing 0.7-2maemo2.deb (--install):
cannot access archive: No such file or directory
Errors were encountered while processing:
/home/user/MyDocs/python-openssl
0.7-2maemo2.deb

thedead1440 2013-06-24 18:21

Re: [Announce] DropN900 - the maemo 5 DropBox client
 
nomidi,

You have a space in your command between openssl and 0.7 so to simplify things just do:

Code:

dpkg -i /home/user/MyDocs/python-openssl*

nomidi 2013-06-24 18:39

Re: [Announce] DropN900 - the maemo 5 DropBox client
 
/home/user # dpkg -i /home/user/MyDocs/python-openssl*
Selecting previously deselected package python-openssl-dbg.
(Reading database ... 28258 files and directories currently installed.)
Unpacking python-openssl-dbg (from .../python-openssl-dbg_0.7-2maemo2_armel.deb) ...
dpkg: dependency problems prevent configuration of python-openssl-dbg:
python-openssl-dbg depends on python-openssl (= 0.7-2maemo2); however:
Package python-openssl is not installed.
python-openssl-dbg depends on python-dbg; however:
Package python-dbg is not installed.
dpkg: error processing python-openssl-dbg (--install):
dependency problems - leaving unconfigured
Errors were encountered while processing:
python-openssl-dbg


All times are GMT. The time now is 19:37.

vBulletin® Version 3.8.8