Dropbox Filemanager

Browsers, email, chat, etc.
Message
Author
User avatar
mikeb
Posts: 11297
Joined: Thu 23 Nov 2006, 13:56

#41 Post by mikeb »

Ok inspired by your post here is a test version....
it uses the official api for obtaining the url and I simply added a note about the dl=1 since the behaviour for a file and folder link are quite different...for the latter it zips the folder contents...so left it for a user to change as desired.

I also tested a direct file link in a flash video player and it works perfectly in which case the pupblic folder becomes obsolete (unless they change this behaviour :D )

I slipped in a delete confirmation box as I felt I should :)

If it tests out ok i will update the pet. I also wonder about the value of the ssl check since I now have it permanently disabled.

mike
Attachments
Url_link_test.tar.gz
test version for evaluating link generation plus delete confirmation box.
(40 KiB) Downloaded 368 times

Scooby
Posts: 599
Joined: Sat 03 Mar 2012, 09:04

#42 Post by Scooby »

mikeb wrote:...for the latter it zips the folder contents...
Maybe I could use this somehow to zip all of my dropbox account and download
for backup

Any idea how the link is built i.e. how to simulate a link to /

I could create a top dir and put evrything in it but then I would have to edit
a hundred links in different posts on forums :cry:
mikeb wrote:I slipped in a delete confirmation box as I felt I should :)
I agree it should be there allthough I may confess to probably comment it out meself

mikeb wrote: I also wonder about the value of the ssl check since I now have it permanently disabled.
Is that the ca-certificates? I use arch version of it and probably would leave it in


You still use old version of dropbox_uploader.sh
0.11.3 why not upgrade to latest 0.14?
Last edited by Scooby on Wed 08 Oct 2014, 16:16, edited 1 time in total.

Scooby
Posts: 599
Joined: Sat 03 Mar 2012, 09:04

#43 Post by Scooby »

double post

User avatar
mikeb
Posts: 11297
Joined: Thu 23 Nov 2006, 13:56

#44 Post by mikeb »

0.11.3 why not upgrade to latest 0.14?
cos I am lazy and would have to modify it to match the gui and I have not come across any functionaily gain apart from this link one I just did. Plus sometimes he takes out functions that then have to be re-added...like the url encode stuff which by the way I do using sed so its not dependant on the curl version...another difference. I suppose its become a fork now.

zipping '/'..... well my test script is
dropbox_uploader.sh {profile name} url /
to grab the link...only tested quickly so not sure if it includes subfolders or not when zipping. As you can see the gui does not have the '/' selection option as life gets fiddly that way and up to now was not relevant.

mike

Scooby
Posts: 599
Joined: Sat 03 Mar 2012, 09:04

#45 Post by Scooby »

mikeb wrote: zipping '/'..... well my test script is
dropbox_uploader.sh {profile name} url /
to grab the link...only tested quickly so not sure if it includes subfolders or not when zipping. As you can see the gui does not have the '/' selection option as life gets fiddly that way and up to now was not relevant.
I tried it using your versions and get

Code: Select all

[21:35 root@alphaos]> dropbox_uploader.sh scooby url /
 > Obtaining URL "/"... 
FAILED

[21:35 root@alphaos] > dropbox_uploader.sh scooby url /public
 > Obtaining URL "/public"... 

Url:	https://www.dropbox.com/sh/zjilzj7n3ecf5nn/AADYblZkR-575khx-bNs25mKa?dl=0
Did you get a link from "/" ?

User avatar
mikeb
Posts: 11297
Joined: Thu 23 Nov 2006, 13:56

#46 Post by mikeb »

Yep your right ... '/' is rejected...I assume the dropbox api sees this as a perverse request :D

I was in a bit a rush last time as was preparing for a trip out.

Apart from that are you getting happy download links and think that a note about dl=1 is sufficient?

mike

Scooby
Posts: 599
Joined: Sat 03 Mar 2012, 09:04

#47 Post by Scooby »

mikeb wrote: Apart from that are you getting happy download links and think that a note about dl=1 is sufficient?
Yep getting happy download links

about dl=1:

If I would get free hands I would probably introduce an option to control
behaviour for folder as an example I use a a variable called FOLDER_BEHAVIOUR
if it contains "zip" change last char to 1 also for folders

for files always change to 1

Code: Select all

	URL=`dropbox_uploader.sh "$PROFILE" url "$REMOTE_DIR$REMOTE" | grep Url | cut -f 2`

	[[ $REMOTE != */  || $FOLDER_BEHAVIOUR == zip ]] && URL="${URL/%0/1}"
	
	gxmessage "$URL"
But maybe that sorts under your "cos I am lazy" clause? :D


After thinking about it I would put up both links in gxmessage with description for folder
but always dl=1 for files

If lazyness was not a factor how would you do it?

I did a test but I'm using yad instead of gxmessage

Image


BTW

If I have a empty folder on dropbox I get a folder in it called "/" in dropbox_gui
Is this something that I have accidently hacked in or do you get the same?

I think maybe this is due to me using the newest version of dropbox_uploader.sh
If I reqeust an empty dir then the result would be only "[D]" so to fix I added
a check for length in build_remote_list

[ "${#I}" -le 3 ] && continue

User avatar
mikeb
Posts: 11297
Joined: Thu 23 Nov 2006, 13:56

#48 Post by mikeb »

If I have a empty folder on dropbox I get a folder in it called "/" in dropbox_gui
Is this something that I have accidently hacked in or do you get the same?
hmm ..i create an empty folder and it drops into it and shows...nothing
If I go up and back into it still nothing.
If I add a file...delete it ...go up and back into the empty folder...still nothing....
I think that's what you mean and no there is no '/' folder and the expected path in the address bar.

Ok for the download link its really just a case of what is most clear and simple for a user.
I considered giving both links but is that messy...either in code terms or user information ? Since the change is one digit it seemed borderline as to automate the whole thing or not.
Another thought is is this option an officially 'approved' one or something that might disappear some day?

My jury is out on this one.....

mike

User avatar
mikeb
Posts: 11297
Joined: Thu 23 Nov 2006, 13:56

#49 Post by mikeb »

Ok something is better than nothing.... update in the first post to 0.2 ..the improved link grabber, confirmation for delete and an info box to check quota...

test and enjoy.

mike

User avatar
trapster
Posts: 2117
Joined: Mon 28 Nov 2005, 23:14
Location: Maine, USA
Contact:

#50 Post by trapster »

Could this be made into a simple gui for uploads/downloads to local servers?

ip - 192.168.1.xxx
user - xxxx
password - xxxx


I've been playing with html and php for something to move multiple files but not much luck (yet).
trapster
Maine, USA

Asus eeepc 1005HA PU1X-BK
Frugal install: Slacko
Currently using full install: DebianDog

User avatar
mikeb
Posts: 11297
Joined: Thu 23 Nov 2006, 13:56

#51 Post by mikeb »

Could this be made into a simple gui for uploads/downloads to local servers?

well its a frontend for a script made specifically to use the dropbox apis so not really suitable.

Unless its an NFS share I use gftp and ftp or sshfs for LAN transfers.

mike

User avatar
mikeb
Posts: 11297
Joined: Thu 23 Nov 2006, 13:56

#52 Post by mikeb »

Ok minor update...

Now shows local and remote file sizes...sort of useful really.
The code around there got a quick tidy.
This includes a modification to the script too though does not really change its basic function , just adds the size to the end of the results.

before anyone asks local sizes are in KB simply because it gets messy otherwise.

enjoy

mike

User avatar
mikeb
Posts: 11297
Joined: Thu 23 Nov 2006, 13:56

#53 Post by mikeb »

Minor fix due to the address for api cration changing.....

I need to add a help/instructions dialog but the profile bug was a bit of a show stopper unless you manually edit the address in the browser :) so wanted to post it straight away.

mike

User avatar
mikeb
Posts: 11297
Joined: Thu 23 Nov 2006, 13:56

#54 Post by mikeb »

Ok did the help dialog boogie and updated to 0.2.3... see first post.

A bit of script tidying too.

Still light and breezy .... enjoy

mike

User avatar
mikeb
Posts: 11297
Joined: Thu 23 Nov 2006, 13:56

#55 Post by mikeb »

I see dropbox have blocked older versions of their Linux software and now you need a huge pile of qt5 to login with. Apart from the ridiculous size it also locks out older systems. Have they not heard that plain gtk2 can do the job? command line use requires additional separate python software install so hardly neat either.
Apart from the gross stupidity of the design I must mention that this here tiny script is still working just fine as the api's used are independent of their software or appear to be. :)

happy boxing...makes a nice file host.

by the way palemoon is choking on links...so the direct =1 might be a good idea for such as this forum.

slavvo67
Posts: 1610
Joined: Sat 13 Oct 2012, 02:07
Location: The other Mr. 305

#56 Post by slavvo67 »

This is a fine app. Thanks Mikeb

User avatar
mikeb
Posts: 11297
Joined: Thu 23 Nov 2006, 13:56

#57 Post by mikeb »

Why thank you sir..... :)

It does seem to cut through the junk nicely ....

mike

Mr.Spenalzo
Posts: 6
Joined: Thu 28 Sep 2017, 17:29

Dropbox_GUI-0.2.3 - no token produced

#58 Post by Mr.Spenalzo »

Hi. I'm trying to get Dropbox_GUI-0.2.3 to work on TahrPup 6.0.5 32bit. Downloaded the pet, and ran from menu, created the web app which generated key and secret; all that went fine. After final acceptance w/ 'y' terminal window closes, GUI window remains unchanged w/ no dropbox directory loading on right side. I can can see 'token' flash quickly in terminal before close. Can't locate a profile so I don't know if any is created. Any help/suggestions much appreciated. Thank you.

PS: for what it's worth GUI window icons don't render. Thanks again.

User avatar
mikeb
Posts: 11297
Joined: Thu 23 Nov 2006, 13:56

#59 Post by mikeb »

Thank you for the information.
It seems dropbox have fully moved to their new apis so the old script no longer works.
The update version 0.3.0 is on the first post and seems to be doing the job nicely.
Existing users will find the need to create an new app and profile but thats sort of handled by the script.
Mike

User avatar
666philb
Posts: 3615
Joined: Sun 07 Feb 2010, 12:27
Location: wales ... by the sea

#60 Post by 666philb »

welcome back mikeb 8)
Bionicpup64 built with bionic beaver packages http://murga-linux.com/puppy/viewtopic.php?t=114311
Xenialpup64, built with xenial xerus packages http://murga-linux.com/puppy/viewtopic.php?t=107331

Post Reply