From f05682e9a78ec3ed9fdef41b77621572ef0f79ee Mon Sep 17 00:00:00 2001 From: fbt Date: Sun, 6 Mar 2016 07:18:59 +0300 Subject: [PATCH] new README Signed-off-by: fbt --- README.md | 62 +++++++++++++++++++++++++++++++++---------------------- ufwd | 8 ++++++- 2 files changed, 44 insertions(+), 26 deletions(-) diff --git a/README.md b/README.md index 9ae733a..13243d0 100644 --- a/README.md +++ b/README.md @@ -1,38 +1,50 @@ -LICENSE -======= -All scripts here are released uder the ISC permissive free software license (http://en.wikipedia.org/wiki/ISC_license). -It basically says that you can do whatever you like with the code as long as you credit the author and provide the license with it. -Also see LICENSE in the repo. +ufw-tools +========= + +ufw-tools are two simple-ish scripts for uploading files to 8fw.me. Support ======= I do not promise any support for any of the provided scripts. That said, I'll do what I can for you if I'm not too busy and/or drunk. -General information -=================== -The paths are all configurable of course. -The help information that the scripts give is dynamic and is provided here only for reference. - Scripts ======= ufw --- -A very simple tool to upload files to the zfh.so file hosting + +ufw is the main one, it uploads shit. + Usage: ufw [-RsF] [-D num] [file/url]" - Flags: - -R # Remove the file after uploading. - -s # Make a screenshot and upload it instead of a file. - -F # Make a fullscreen shot instead of prompting for a window/area. Implies -s. - -D # Delay the shot by seconds. - -p # Make the file private. Requires $secret to be set in the config. - -m # Maximum filesize (takes K, M and G suffixes). + Flags: + -R # Remove the file after uploading. + -s # Make a screenshot and upload it instead of a file. + -F # Make a fullscreen shot instead of prompting for a window/area. Implies -s. + -d # Supply a dexcription. + -D # Delay the shot by seconds. + -p # Make the file public. + -u # Generate a shortlink from URL. + -m # Maximum filesize (takes K, M and G suffixes). + -a # Add the file to an album. + -A # API response format. + + Config options (~/.config/ufw): + secret # Your personal token. Get it at https://zfh.so/settings_form + cfg_screenshot_ext # Screenshot file type, used by scrot. + cfg_max_filesize # Maximum filesize in megabytes. + # Others are self-explanatory: + cfg_url_regex + cfg_tmp_dir + cfg_service_url - Config options (~/.config/ufw): - secret # Your personal token. Get it at https://zfh.so/settings_form - cfg_screenshot_ext # Screenshot file type, used by scrot. - # Others are self-explanatory: - cfg_url_regex - cfg_tmp_dir - cfg_script_url +ufwd +---- + +ufwd periodically checks a directory of your choosing (defaults to $XDG_RUNTIME DIR/ufwd) and invokes ufw to upload the files and remove them. + + Usage: ufwd [-hn] [-d workdir] -D [check delay] + -h # Show this message. + -n # Enable notifications with notify-send. Must be installed. + -d [path] # Set the dir that is to be watched. + -D [sec] # Set the check interval. diff --git a/ufwd b/ufwd index c9733bf..27c3aab 100755 --- a/ufwd +++ b/ufwd @@ -13,7 +13,13 @@ cfg_scan_delay='30' msg() { printf '%s\n' "$*"; } err() { echo "$*" >&2; } -usage() { echo "No help available."; } +usage() { + printf 'Usage: ufwd [-hn] [-d workdir] -D [check delay]\n' + printf ' -h # Show this message.\n' + printf ' -n # Enable notifications with notify-send. Must be installed.\n' + printf ' -d [path] # Set the dir that is to be watched.\n' + printf ' -D [sec] # Set the check interval.\n' +} main() { while (( $# )); do