Dropbox Filemanager

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

Dropbox Filemanager

#1 Post by mikeb »

For those who tend to use dropbox as a file host as they want a simple reliable life, I made a gui around the excellent bash dropboxuploader script. Its not meant to be a substitute for full file syncing but provides a fast , light and simple way to manipulate your files.
http://www.andreafabrizi.it/?dropbox_uploader
Basically you have dropbox control without the need for python so light and fluffy and should work on pretty much anything. All this needs is curl (I modified it to make it less fussy of the version but still handles url encoding) and gtkdialog3...think that covers most puppies.


Ok user manual time...!!!!!great visual HOW TO later on :)
When first run you will need to make a profile.
Choose a name in the account box and hit new profile...a terminal will pop up ... follow the instructions.
Once done that account can be accessed by the name in account. The profile can be changed at any time ...just hit rescan. You can have multiple accounts. Don't leave the profile in root/home if you remaster and distribute...that would be silly :D

Once you have a profile it is similar to a 2 pane file manager...hopefully usage should be fairly obvious.
Folder creation involves adding the name in the address bar and hitting the new button/icon next to it...
'Share Url' gets you the download link with a note on how to get the direct file/zip. ..its very useful for example I stream flash movies and it avoids any intermediate webpage.

That's it... quick and simple hopefully..I find it quicker than using the webpage and at a 24.3k pet who can complain.


Update 0.3.0
Dropbox dropped their version 1 api support recently so had to update to the script for version 2 but the result seems to have benefits. One is that now a folder can be uploaded and downloaded.

Update 0.3.1
Ok some bugfixes and tweaks to make more bomb proof...in other words what happens before there is a profile created was unpredictable...thanks Dave

Update 0.3.2
Fixed spaces in folder names bug - thanks Fred
Improved help dialog - thanks Dave
Made icons more likely to work across Puppy versions - Thanks Barry.

Update 0.3.3
A merge of various improvements and the odd fix - Thanks Fred.
Yad support for multiple files..ignored if no yad installed.
Single window for 'Add All' activity.
Fixed share url generation.
Minor tweaks.

Update 0.4.0.
Ok Fred discovered that gtkdialog 4 has multiple file select option so this releases uses that. If only gtkdialog is available then it simply ignores the option. I did build gtkdialog4 to work on puppy 4. Have left the yad varient too.

Update 0.4.1
Bugfixes. Updated script to handle server responses with newer distros.
Handling of spaces in names uploading one or more files. Cheers Fred.

TODO
renaming
language support
Attachments
Dropbox_GUI-0.4.1.pet
(23.91 KiB) Downloaded 341 times
dropbox.gui.png
(65.04 KiB) Downloaded 876 times
Dropbox_GUI-0.3.3.pet
(24.3 KiB) Downloaded 469 times
Last edited by mikeb on Mon 18 Mar 2019, 17:19, edited 13 times in total.

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

#2 Post by mikeb »

Beans on toast.....

User avatar
josejp2424
Posts: 556
Joined: Sun 01 Aug 2010, 22:35
Contact:

dropbox

#3 Post by josejp2424 »

Excellent , approve

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

#4 Post by mikeb »

I recently had to update my curl certificates. I have attached a recent bundle if anyone findes this a problem. You can disable the need in the dropbox_uploader script but that seemed a little lame.

they usually live in \usr\share\curl\

mike
Attachments
curl-ca-bundle.zip
(131.04 KiB) Downloaded 821 times

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

#5 Post by 666philb »

been using this for a while ......

cheers mikeb
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

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

#6 Post by mikeb »

I think short feedback is a good sign :)

Glad its useful... I find it handy for files I post here.

Mike

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

#7 Post by 666philb »

hi mikeb,

i use this for managing part of quickpet

one thing i've found though is that it occasionally loses my login information and i have to re-enter it. any ideas?
(i maybe using an earlier version than the one posted here.... have you tweaked it?)

cheers

phil
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

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

#8 Post by mikeb »

Hm not changed anything since uploading here.

Only thing I have had to do was update the curl certificate bundle.

The profile is created at droppox as part of their user api facilities and a local file is created in root with the details to log on with ...not much more to it than that.

from command line it would be something like
dropbox_uploader.sh mike list

assuming there was already a .dropbox_uploader-mike in root.

perhaps if it happens again see if the command line gives any clues.

mike

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

#9 Post by mikeb »

Ok openSSL farce has hit our humble dropbox uploader script...or more precisely curl.

If you are trying to be proper and use ssl and certificates it may no longer work since dropbox have changed their ssl handling .

dropbox_uploader.sh line 30 uncomment

CURL_ACCEPT_CERTIFICATES="-k"

and accept that security ain't what its cracked up to be,

You still need correct credentials to access so its not exactly risking any necks.

mike

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

ported DropboxGUI

#10 Post by Scooby »

I use dropbox alot and like this gui.

I am mainly on alphaOS so I ported it to alphaos and updated dropbox_uploader.sh to
latest version 0.13 (arguments have changed a bit)

Had to change a little bit to get it to work with alphaos see this
http://alphaos.tuxfamily.org/forum/viewtopic.php?f=8&t=1098

also changed "get link" to new behaviour of dropbox i.e. not using public folder
but share link

However there is something I cannot get right.

When I start dropbox_gui the local folder on the left side does not get displayed correctly.
Some files or dirs are not displayed all though they are there since I can click on them
although I can only see white background.

And what the H***, now that I wanted to take a screenshot it worked all the time :(

But I have seen it many times. I just wanted to ask if it is something you've come across?

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

#11 Post by mikeb »

Hi scooby

glad its useful to you and you were ok updating the script... i have not got around to adapting to the shared link method but thats just laziness on my part.

As for the folder contents...its always behaved for me but someone else did mention a problem ... from the description it sounded it had started off in something like a ./ folder rather than / but on the other hand his problem was more the paths were no right.

Not seen any loss of folders/files though is it possible were are dealing with a unicode issue and there is a problem with certain characters. As you will have seen find is used in a similar fashion to pburn's file browser.
/tmp/dbox-ls is the generated file list...might be worth looking in that if it happens again.

By the way have you had any curl/certificate/authentication problems?

mike

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

#12 Post by Scooby »

mikeb wrote: Not seen any loss of folders/files though is it possible were are dealing with a unicode issue and there is a problem with certain characters. As you will have seen find is used in a similar fashion to pburn's file browser.
/tmp/dbox-ls is the generated file list...might be worth looking in that if it happens again.
I'm not sure if it is a unicode problem. It only occurs at startup.
If I then go up one dir and down again everything is displayed fine.

I did check /tmp/dbox-ls, it looked OK.
mikeb wrote: By the way have you had any curl/certificate/authentication problems?
I did.

In alphaos there is a script called update-ca-certificates, I guess it is from arch.
I added a call to it in DropboxGUI for automagic handling.

*edit*
see below for view at startup
Image

Code: Select all

> cat /tmp/dbox-ls 
gtk-directory|Desktop/
gtk-directory|Downloads/
gtk-file|markup
gtk-file|markup.tar.gz
gtk-file|start_wifi
and after up and down ( now there was one extra file for the scrrentshot above )


Image

Suggests something is happening in the code run at startup but I cannot find anything
strange about it.

seems to work OK for dirs other than /root/

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

#13 Post by mikeb »

Hmm oddness.... it does look like the output from find is ok.

I notice the left pane is half missing so might be a gtkdialog issue,,, I use gtkdialog3 though 4 seems ok...not sure what arrangement you have. (3 symlinked to 4 perhaps)

All that happens is that text file populates the list pane... once you browse a refresh is performed on that list box.

One of those things that needs reproducing..
A config is made saving the last folder you were in...just curious if you exit when in say /mnt/sda1 for example.

mike

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

#14 Post by Scooby »

mikeb wrote: I notice the left pane is half missing so might be a gtkdialog issue,,, I use gtkdialog3 though 4 seems ok...not sure what arrangement you have. (3 symlinked to 4 perhaps)

Code: Select all

> gtkdialog --version
gtkdialog version 0.8.4 release (C) 2003-2007 Laszlo Pere, 2011-2012 Thunor
Built with support for: GTK+ 3.
mikeb wrote: .. once you browse a refresh is performed on that list box.
Can you perform a refresh from bash or only via <action> tags?

mikeb wrote: A config is made saving the last folder you were in...just curious if you exit when in say /mnt/sda1 for example.
/mnt/sda1 works OK

Code: Select all

 > ls -l /
total 0
lrwxrwxrwx   1 root root    7 Apr 16 15:33 bin -> usr/bin/
drwxrwxrwx   3 root root   27 Feb 25 12:22 boot/
drwxr-xr-x  15 root root 5.3K May  8 17:56 dev/
drwxrwxrwx  81 root root  160 May  8 17:59 etc/
drwxr-xr-x   3 root root   28 Apr 16 22:42 home/
lrwxrwxrwx   1 root root    7 Apr 16 15:33 lib -> usr/lib/
lrwxrwxrwx   1 root root    7 Apr 16 15:33 lib64 -> usr/lib/
drwxrwxrwx   5 root root  100 May  8 17:56 mnt/
drwxr-xr-x   3 root root   37 Apr 17 21:52 opt/
dr-xr-xr-x 205 root root    0 May  8 17:55 proc/
drwxrwxrwx  17 root root  260 May  8 17:59 root/
drwxr-xr-x   8 root root  140 May  8 17:56 run/
lrwxrwxrwx   1 root root    7 Apr 16 15:33 sbin -> usr/bin/
dr-xr-xr-x  13 root root    0 May  8 18:03 sys/
lrwxrwxrwx   1 root root   12 Apr 16 15:33 tmp -> mnt/live/tmp/
drwxrwxrwx 124 root root   80 May  8 17:56 usr/
drwxr-xr-x  52 root root  140 May  8 17:58 var/
All works except
/boot
/home
/mnt
/opt
/root
/run
/tmp
/usr

It seems if there are enough files to fill window and get scrollbar it works?
Can you see any other connections?

I tried to fill up /root with enough files and then it worked.

Do you have any input on this?

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

#15 Post by mikeb »

lol ..oh this sounds like fun

Looks like gtkdialog4 and do you have gtk3?

I have gtkdialog4 built for for older systems to test with.

The pattern you suggest is that less than a full pane causes the problem..that smacks of a gtkdialog bug OR version 4 wants an extra parameter.... but perhaps a workaround would be to pad out with blank lines.....

tested with nearly empty directory and still ok.... but I'll see if I can reproduce it.

mike

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

#16 Post by Scooby »

Code: Select all

extra/gtk3 3.12.1-1 [installed]
    GObject-based multi-platform GUI toolkit (v3)
extra/gtk2 2.24.23-1 [installed]
    GTK+ is a multi-platform toolkit (v2)
looks like I have both gtk2 and gtk3 installed.

did a fast dirty check with your hack "padding with blanklines" - it seems to work

added

Code: Select all

for (( c=`wc -l < /tmp/dbox-ls`; c<=11; c++ )); do echo >> /tmp/dbox-ls; done
to end of function build_chooser_list()

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

#17 Post by mikeb »

Hmm ok well perhaps it may be a bug with a workaround for now.... see if anyone else reports it...GTK is a mysterious beastie...

As for the hack I see no harm in simply bunging in several blank lines and not bothering with the test apart from affecting the scroll bar size.

A nosy around has not shed any other light on this one so far... thanks for the feedback

mike

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

#18 Post by Scooby »

mikeb wrote: As for the hack I see no harm in simply bunging in several blank lines and not bothering with the test apart from affecting the scroll bar size.
so something like

Code: Select all

printf '\n%.0s' {1..11} >> /tmp/dbox-ls
Do you think the other way is slow or why did you suggest to
do it without test?


Maybe I'm petty but I didn't like those extra newlines at the end and sonce I only need it at startup I solved it this way

Code: Select all

# At the top of script
export IS_STARTUP=true

...

build_chooser_list () {
...
	if $IS_STARTUP; then
		for (( c=`wc -l < /tmp/dbox-ls`; c<=11; c++ )); do echo >> /tmp/dbox-ls; done
	        IS_STARTUP=false
	fi
}
which would only output extra lines at startup and then just do fast boolean check

which way is best do you think?

User avatar
technosaurus
Posts: 4853
Joined: Mon 19 May 2008, 01:24
Location: Blue Springs, MO
Contact:

#19 Post by technosaurus »

here is my post with a previous dropbox client:
http://www.murga-linux.com/puppy/viewto ... 711#597711
don't know if it will be useful, but there it is.
Check out my [url=https://github.com/technosaurus]github repositories[/url]. I may eventually get around to updating my [url=http://bashismal.blogspot.com]blogspot[/url].

User avatar
rufwoof
Posts: 3690
Joined: Mon 24 Feb 2014, 17:47

#20 Post by rufwoof »

Never used dropbox (nor the pet) before.

Created a DB account. Tried the pet and couldn't figure it out in < 20 mins ..... so both zapped.

Asked about 'app secrets' and gave two lots of choices of apps to create etc. I was typing in long textual (no copy/paste) sequences etc (soon lost interest).

Sorry for the negative feedback Mike - but perhaps best to be aware of what fools/noobs like me see.

Post Reply