dbxcli
dbxcli copied to clipboard
Implementing sharelink feature requested in #77
This is in response to #77.
Following the current command structure for dbxcli
, the new command can be found at dbxcli share getlink
.
If the file / folder already has a sharelink, that link is retrieved and printed. This follows the pre-existing printing format from the sharing functions. If it doesn't have a sharelink, the link is created and printed.
There is also support for getting links for files that haven't fully uploaded yet. I wanted to functionality to be precisely like if you right click on a file and use Copy Dropbox Link. The side effect of this is I had to use the partially deprecated create_shared_link
endpoint.
This is the first Go I've ever coded so I'm of course open to revisions.
I addressed all of the issues except those related to getDropboxFolder
.
Any ETA on when this feature can be live?
@coatless Just waiting on the go ahead from @diwakergupta, as well as perhaps a cleaner way to do the functionality provided by getDropboxFolder
.
@diwakergupta Think you could have another look at this?
@banool @diwakergupta it would be great to see headway on this feature as the ~/dropbox.py
script listed under Linux Installation appears to be at EOL given:
root@remote:~# ~/dropbox.py status
You're using an old version of Dropbox. Please update within the next 4 days to continue using Dropbox.
https://www.dropbox.com/downloading?from_client=True
Up to date
Sorry folks, will take a look right away!
@diwakergupta Any update on this PR? I'd love to use this command.
I installed dbxcli
only for this purpose because my current workflow is:
-
open -r myfile
- Right click on the file: copy shareable link
@banool is there a way to install your version to test it?
Bumping this, I would love to see this feature incorporated into the main branch.
I would love to have this PR merged too!
@diwakergupta any update on if this will get merged? It would be really nice to have.
I know this is super old and seems to not actually be maintained any more, but when I try to go build
your branch, I get this error:
./main.go:43:24: cannot use versionCmd (type *"github.com/banool/dbxcli/vendor/github.com/spf13/cobra".Command) as type *"github.com/dropbox/dbxcli/vendor/github.com/spf13/cobra".Command in argument to cmd.RootCmd.AddCommand
Sadly, I think this software is official dead. I wouldn't push forward more on this as it literally was a year and then some. Consider looking into Dropbox alternatives.
Unfortunately yes, I haven't looked into this PR for a long time. I don't intend to pick up the work again either since, as @coatless says, this appears to be entirely dead. Dropbox seems to be more interested in the designer / creative space than the technical space these days, so I don't expect to see any further development on this either. Given the recent price increase and worsening features relative to competitors, might be time to look elsewhere.
Yeah, I figured that'd be the case. Thanks for the responses.
If anyone finds this in the future, here's a Groovy script that I wrote to accomplish what I needed. https://gitlab.com/snippets/1915960
I wanted to give it a look and I manage to make it work!
I rebased the PR (otherwise I had a segmentation fault).
$ dbxcli share getlink ~/Dropbox/Flyers\ Lyon.jpg
2019/11/23 19:38:45 client.go:619: WARNING: API `CreateSharedLink` is deprecated
2019/11/23 19:38:45 client.go:620: Use API `CreateSharedLinkWithSettings` instead
Flyers Lyon.jpg https://www.dropbox.com/s/1mvz1bhiq7csq1l/Flyers%20Lyon.jpg?dl=0
As you can see, CreateSharedLink
is deprecated but it shouldn't be a problem to fix that.
Regarding the output I would remove the file name in order to make the result "pipable":
$ dbxcli share getlink ~/Dropbox/Flyers\ Lyon.jpg | pbcopy
(for non MacOS user, pbcopy
copy the input in the clipboard)
To anybody interested in that option:
https://github.com/dropbox/dbxcli/issues/113#issuecomment-667919621
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.
I'm unsubscribing from this, please tag me if you need me if the maintainers ever return. Thanks!
@banool If you want to get notified, stay subscribed because I don't think I will remember to ping you when it merged (there is not so much activity here anyway).
@biounix I just tried tbx for the first time after having it under my watched repository since you mentioned it. I opened a question here about it.