Dropbox
Ned Abell (394) 24 posts |
I started a thread on acorn.networking wondering if anyone was looking at integrating this into RISC OS as its very cross platform? |
Dave Higton (281) 668 posts |
There’s an interesting article on a security aspect of Dropbox here |
nemo (145) 2529 posts |
I have to admit that as my usage of RO has become increasingly virtual and distributed, the concept of having different files in different places is becoming increasingly irritating. I was thinking of a hypothetical CloudFS, but I haven’t yet tried using DropBox on a machine running an emulator to see if it would be viable! I suspect a Google-style Sync would be more sensible than a copy to the cloud every time a file got changed. |
Jeffrey Lee (213) 6048 posts |
This. A dropbox (or similar) client for RISC OS would be a very interesting thing to have, and is totally within the realm of possibility. |
andym (447) 472 posts |
I tried to make a “mini-app” that was just a link to a URL file to access my Dropbox, but to no avail. NetSurf cannot process it at all, it just hangs on a blank screen with “fetching, processing, fetching” at the bottom. This is with JS on. It does even less with JS off. I, too, agree that a DropBox app for RISC OS would be a MAJOR boon to the platform. I believe the API for DropBox is available, but alas, my coding skills, being negligible, do not enable me to help! A financial contribution, on the other hand… |
Jeffrey Lee (213) 6048 posts |
Yes, I had a quick look at it last night and it looks like it’s all there. It’ll be a bit fiddly from a RISC OS perspective since using HTTP + SSL from a module isn’t very straightforward, but if you can get past that hurdle then getting and putting files looks pretty straightforward. The sources to the Linux client are also available, which is nice. Using that as a starting point may be easier than starting from scratch (their official SDKs cover a bunch of programming languages/platforms but not plain C or C++). I also have a feeling there’s a secret API they use to allow the server to notify the client immediately when something changes, instead of the client having to poll – but whether that would be in the Linux client sources, and whether they’d allow other apps to use it, I’m not sure. |
Nick Brown (1717) 13 posts |
Am I right in thinking that the RISC OS port of curl has SSL support built into it? If so, whilst it might not be a good long term solution, in the shorter term could it be reused as to get something up and working with minimal effort? |
Chris Gransden (337) 1202 posts |
I’ve been using the dropbox Python SDK to access my Dropbox folder. There’s an example cli client included with the SDK which I use to download and upload files. I can do some instructions if anyone wants to try it. |
andym (447) 472 posts |
Ooh, yes please, that would be marvellous! |
nemo (145) 2529 posts |
I’m now using Google Drive on my PCs. Placing emulator ‘drives’ in the Google Drive directory ensures that not only are the emulated drives always backed up, they are instantly synced from machine to machine, like having a pan-internet ShareFS. |
Dave Higton (1515) 3497 posts |
Chris: what commands does the Python SDK provide? Would they lend themselves to being called from a RISC OS GUI? If so, I might even volunteer to write the GUI. |
Chris Gransden (337) 1202 posts |
The easiest thing to do to find out is download the RISC OS python port. Then you can do, import client This will give you the details of the api.
I think it depends what language you use to do the GUI. If you use C you can use the libpython library. |
Chris Gransden (337) 1202 posts |
I’ve uploaded some brief instructions on using the ‘cli_client.py’ from the Dropbox Python SDK here. |
Dave Higton (1515) 3497 posts |
No, it’s impossible. The client isn’t free-standing – you have to have a browser to log in with every time, and of course this can’t be a RISC OS browser, at least not now. On each error you get chucked out of the client. Log in all over again with the browser and a new token. |
Rick Murray (539) 13806 posts |
Is this every client? Even Android and such? I notice that the process works using OAuth, so it is a tad more complex than a series of send/fetch. Additionally, it looks like you only get access to a specific folder unless you have a damn good reason (that Dropbox approves) plus it looks like each app needs a specific developer/app key – which would make it “troublesome” in an open source context. Hmmm… |
andym (447) 472 posts |
In a bizarre twist, whilst messing about, I discovered that you can use (of a fashion) DropBox at www.dropbox.com/m using Fresco! Who’d have thought… not sure it helps anything though. |
Chris Gransden (337) 1202 posts |
You only need to authorise it once. Once you login the file ‘token_store/txt’ is created. I just took these values and hard coded them in the script. Run the script again and it is automatically logged in. |
Chris Gransden (337) 1202 posts |
All you do is create one app in your account pointing to your dropbox folders. Then just keep it as a developer app. No need to get it approved. |
Garry (87) 184 posts |
Not relating to Dropbox, but Google Drive. I looked into a Dropbox client for another platform (IBM AS/400), and the OAuth requirement is a bit of a show stopper, as it requires a modern web browser with all bells and whistles. However, Google Drive has an option for authorising on basic devices: https://developers.google.com/accounts/docs/OAuth2ForDevices So I use that cycle on the AS/400, and it works great. That means I can upload to Google Drive from a device with no GUI at all, let alone a web browser. I would imagine this would work very well on RISC OS. The code I did for the AS/400 is C, so portable, but it was for a commercial job, and I can’t just open source it, but I’d be happy to help anyone out giving this a try. I know I’d love a Google Drive client on my Raspberry Pi. |
nemo (145) 2529 posts |
I’m still (touch wood) very happy using Google Drive as my virtual RISC OS backup/sync system. Can’t fault it. Except for its faults. |