View Single Post
Marshall Banana's Avatar
Posts: 94 | Thanked: 209 times | Joined on Oct 2009 @ Germany
#443
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
  • updated dropn900.0.2.1.tar.gz
  • Added a context menu for the tree view:
  • Added Dropbox V1 API share functionality:
  • Pressing the "share" menu entry will create a share and copy a link to the shared file/folder to the clipboard
  • Removed the "create public link" and "open public link" buttons (old, disfunct Dropbox V0 API)

05-05-13
Version 0.2.0
03-05-13
  • I found the "button with no text bug"!
  • If you used DropN900 with the old api, make sure that the sync path is /, not /dropn900, or sync will fail. Save settings before sync.
  • Updated the two tar archives attached to this post
  • Buffer size for https requests in dropbox api increased from 1KB to 16KB.

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:



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:



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.
Attached Files
File Type: gz dp_api_v1.tar.gz (26.4 KB, 881 views)
File Type: gz dropn900.0.2.1.tar.gz (45.6 KB, 443 views)
File Type: gz dropn900.0.2.2.tar.gz (45.7 KB, 580 views)

Last edited by Marshall Banana; 2013-06-30 at 21:04. Reason: Update
 

The Following 39 Users Say Thank You to Marshall Banana For This Useful Post: