Open porg opened 1 year ago
Thank you for the suggestion. However, the named link styles would involve parsing the returned link to pull out the item code and then constructing a link. That would add a lot of complexity to the code, and is frankly just more work than I am prepared to put into this project, for very limited benefit. If I understand correctly, all of the various behaviors (not link styles, but behaviors) can be achieved using different combinations of link arguments. So this is purely about link aesthetics.
If you need the links fetched by this tool to be formatted differently, you can use sed
or your own script to modify them to suit your purposes.
As for the new scl
link style, it seems premature to put work into supporting it when it may be modified, or even abandoned.
www.dropbox.com
+ arguments.dl.dropboxusercontent.com
Goal
--link-<shorthand>
or--link=<shorthand>
.--query
with optional #3.Dropbox /s/ link formats
--link-preview
https://www.dropbox.com/s/<identifier>/filename.png
--link-download-argument
https://www.dropbox.com/s/<identifier>/filename.png?&dl=1
--link-download-subdomain
https://dl.dropbox.com/s/<identifier>/filename.png
--link-raw-redirect
https://www.dropbox.com/s/<identifier>/filename.png?&raw=1
--link-raw-direct
https://dl.dropboxusercontent.com/s/<identifier>/filename.png>
Dropbox /scl/ link formats
--link-scl-preview
https://www.dropbox.com/scl/fi/<identifier>/filename.png?rlkey=<content-key>&dl=0
--link-scl-download
https://www.dropbox.com/scl/fi/<identifier>/filename.png?rlkey=<content-key>&dl=1
wget <url>
→ Creates ugly filename (the last URL part as is).wget -content-dispositon <url>
→ Creates intended filename (passed via HTTP Content-Disposition header)--link-scl-raw-redirect
https://www.dropbox.com/scl/fi/<identifier>/filename.png?rlkey=<content-key>&raw=1
--link-scl-raw-direct
https://dl.dropboxusercontent.com/scl/fi/<identifier>/filename.png?rlkey=<content-key>