ShareDrop
ShareDrop is a system that eases file sharing on Linux, provided you've got your own server to store the files.
It works by monitoring a folder for file creation or modification and by
automatically and securely synchronizing these files to your web server through
rsync
.
Requirements
- bash (tested with 4.2.42)
- sha1sum (tested with the version from GNU coreutils 8.21)
- fswatch
- convert
- a web server
Also depending on the sync_command
- ssh (tested with OpenSSH 6.1)
- rsync (tested with 3.0.9)
Linux
- notify-send (tested with the version from libnotify 0.7.5)
OSX
- terminal-notifier (optional)
$ brew install fswatch
$ brew install imagemagick
Setup
ShareDrop needs some (quite easy) setup.
- Define a VirtualHost (or equivalent) on your Web server that allows serving files from a given directory
- Write a config file for ShareDrop (see below)
- Run
sharedrop.sh
- Drop files in the folder you launched ShareDrop in
- Wait for the notification giving you an URL for your file
Persistent setup
You may also want to automatically run ShareDrop on session start. You can give a path to ShareDrop to monitor as the first argument of the command. This should ease setting up your session manager.
Configuration
ShareDrop is configured through a config.sh
file in a standard configuration
folder (if you haven't tweaked $XDG_CONFIG_HOME
then it's likely to be in
$HOME/.config/sharedrop/
). This file must define two bash variables:
$REMOTE
: anrsync
remote folder specification (such asexample.com:public_html/
)$BASE_URL
: the URL for the VirtualHost you configured in your web server (e.g.:http://example.com/share/
)