# HG changeset patch # User Paul Bissex # Date 1595605067 14400 # Fri Jul 24 11:37:47 2020 -0400 # Node ID 16910912e0e7b6e990d54557c57af12051558d1e # Parent ab1bab41d0968b27d30b21d944240e5ebcf1cf5b removed obsolete 'poster' param diff --git a/README.md b/README.md --- a/README.md +++ b/README.md @@ -1,12 +1,12 @@ # Scripts and Tools for dpaste.com # *License: MIT* ### [dpaste.sh](https://bitbucket.org/pbx/dpaste-tools/src/tip/dpaste.sh?fileviewer=file-view-default) -Simple command-line client for creating dpaste items from stdin. Optionally specify syntax, title, poster, and expiry. Resulting item is opened in your browser (via `xdg-open` on Linux; use `open` on macOS). +Simple command-line client for creating dpaste items from stdin. Optionally specify syntax, title, and expiry. Resulting item is opened in your browser (via `xdg-open` on Linux; use `open` on macOS). Sample session: ``` #!bash -$ dpaste.sh -t Demo -p pbx -s python3 -e 1 +$ dpaste.sh -t Demo -s python3 -e 1 Paste your content now, ^D to submit. --- print("Hello!") diff --git a/dpaste.sh b/dpaste.sh --- a/dpaste.sh +++ b/dpaste.sh @@ -3,8 +3,8 @@ # Usage info show_help() { cat << HELP -Usage: $(basename $0) [-h] [-s SYNTAX] [-t TITLE] [-p POSTER] [-e EXPIRY] -Send stdin to dpaste.com, optionally setting syntax/title/poster/expiry. +Usage: $(basename $0) [-h] [-s SYNTAX] [-t TITLE] [-e EXPIRY] +Send stdin to dpaste.com, optionally setting syntax/title/expiry. Resulting item will be opened in your browser. HELP } @@ -13,7 +13,7 @@ # (getopts code adapted from http://mywiki.wooledge.org/BashFAQ/035#getopts) params="" # Trailing colon on option name means it expects a value -while getopts hs:t:p:e: opt; do +while getopts hs:t:e: opt; do case $opt in h) show_help @@ -23,8 +23,6 @@ ;; t) params="$params -F title=$OPTARG" ;; - p) params="$params -F poster=$OPTARG" - ;; e) params="$params -F expiry_days=$OPTARG" ;; *)