diff --git a/README.md b/README.md index ac9e282..4ccc5cc 100644 --- a/README.md +++ b/README.md @@ -1,13 +1,34 @@ # FLIT -create fluttering folders +Create fluttering folders -- flit add [days] - - create folder with 30 days or specified life time -- flit list - - list folders with due dates +Basic function: + +- You want to share files over a web server. +- You don't want the URL to be guessable, but also not too long to share. +- You want the share to expire over time, and files deleted + +# Installation + +- Create a folder that is publicily visible on a web server, like Nginx. +- Copy the flit.example as executable `flit`, and add the public URL in the + script. +- Have the flit.py in the same folder. +- Add a symlink to flit script so that it is in the PATH, i.e. `ln -s $(pwd)/flit ~/.local/bin/flit` +- Add `flit del` to daily cron + +# Usage + +- flit add [-d {days}] [-m {description}] [files] + - Create folder with 30 days or specified life time + - You can add *files* to be copied in the folder, or simply copy them + yourself. +- flit list [-v] + - List folders with due dates + - Use the verbose switch to list URLS to all files in the shares - flit del - - delete due folders + - Delete due folders + +Note: This utility does not create indexes of files. Use another tool, or let +web server index. -hint: add `flit del` to cron.daily -hint2: `flit-add() { cd $( flit add $1 ); }` diff --git a/flit.example b/flit.example new file mode 100755 index 0000000..2e1bdde --- /dev/null +++ b/flit.example @@ -0,0 +1,5 @@ +#!/bin/bash + + +pwd=$( dirname $( readlink -f $0 ) ) +python3 "$pwd"/flit.py --root "https://your.server/and.path" "$@"