madx / sharedrop Goto Github PK
View Code? Open in Web Editor NEWEasily share files using your own server
Easily share files using your own server
It's a question not sure if it should belong in here
On my gandi simple hosting I cannot use rsync yet :/
lftp seems a good alternative to handle that.
I put all kind of crap on my Desktop folder, including the screenshots (default location on osx) so we should add a way to filter what should be handled by this program. Maybe just (png|jpg...) for a start ?
Or a regex pattern to catch "Screen shot ..." ?
Don't know how to do on linux, but I will take care of OS X example
$HASH_CMD "$file" | cut -d' ' -f1 | ruby -ne 'puts $_.to_i(16).to_s(36)'
This line depends on Ruby, I don't want this dependency anymore if the project is going to be used by more that 1 person (me :D)
I need to find away to do this efficiently in bash.
Ok, I just had a review of the code after @MoOx's PR, there are some things I really don't like with the codebase in general (not due to @MoOx's commits but due to the fact that the script was a hack at the beginning)
Here's a better architecture I've been thinking about:
sharedrop
├── bin
│ └── sharedrop # Actual executable, to be symlinked in ~/.bin
├── lib
│ ├── config.sh # Configuration variables definitions
│ ├── core.sh # Core functionality
│ ├── logging.sh # Logging facilities
│ ├── os
│ │ ├── linux.sh # Linux-specific stuff
│ │ └── osx.sh # OS X-specific stuff
│ └── web.sh # Web listing generator
├── Makefile # Makefile to help installation and bootstrap
├── README.md # Project description and instructions
└── test
├── test_add_local_file.sh # Tests for adding a local file
├── test_clean_old_files.sh # Tests for cleaning old files
└── test_remove_local_file.sh # Tests for removing a local file
What do you think?
I like Google's Bash style guide: http://google.github.io/styleguide/shell.xml
I also think ShellCheck is a must have http://www.shellcheck.net/about.html
We should have a CONTRIBUTING.md file with explanations about the style we want to enforce.
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.