feklee / dbx-tools Goto Github PK
View Code? Open in Web Editor NEWCommand line tools to interact with Dropbox
License: Do What The F*ck You Want To Public License
Command line tools to interact with Dropbox
License: Do What The F*ck You Want To Public License
I've been trying to do some selective bulk downloads for a specific filetype (ie: download all JPG files in folders of RAW+JPG files), and I ended up doing something like with
# Pull DBX file list.
dbxcli ls -Rl /photography/ > ~/dbx_files.log
# Filter for all JPGs JPGs, and transform the text to just be the path with quotes.
cat ~/ls_output.log | grep '.JPG' | cut -c 55- | awk '{$1=$1;print}' | sed 's/^/"/;s/$/"/' > ~/dbx_jpg_files.log
# Grab all files
cat ~/dbx_jpg_files.log | xargs -n 1 ~/dbx-tools/dbx-get
Unfortunately dbx-get
ends up failing if the files are part of a subfolder (eg: /photography/trip1
) that is not yet created locally (ie: have not done dbx-cd /photography/trip1
). To get it to work, I needed to first dbx-cd
all of the folders -- which was quite a lot!
I think this may have been a bit more nuanced too, it only failed if there was an inner folder (eg: /photography/trip1/location1
) while the outer folder (trip1
) was uninitialized. I'll have to do a bit more testing to figure out when/how it didn't work.
I suspect the right thing to do in these situations is to initialize the folders eagerly here. I'll see if I can get a patch up for this too (:
Thanks a ton for this tool btw, it was very helpful for managing files and just worked (:
Hello. Your readme says tested with dbxcli Git release v2.1.1
but then it lists right below it dbxcli version: 0.1.0
, so I'm confused. Are these tools for v2.1.1 or for 0.1.0?
An example:
$ dbx-ls
Sync su NAS/
Cartella del team xxx SNC/
commerciale/
Proter xxx su Dropbox/
Outlook/
$ dbx-cd commerciale
$ dbx-pwd
Current directory not in $DBX_HOME
$ echo $DBX_HOME
/home/xxx/Code/02_xxx/test/dbx-tools/xxx
$ dbx-ls
Sync su NAS/
Cartella del team xxx SNC/
commerciale/
Proter xxx su Dropbox/
Outlook/
--
I have edited this line in init.sh from:
DOT_DIR="$HOME/.dbx-tools"
to:
DOT_DIR="$HOME/Code/02_xxx/test/.dbx-tools"
I suggest you to permit to set DOT_DIR by export.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.