WgetPaste

  archlinux, shell, sysadmin

Wgetpaste, permet via un pipe, d’envoyer le résultat d’une commande vers un pastebin et de récupérer l’URL de destination.

Installation

Yaourt -S wgetpaste

Fichier de configuration

~/.wgetpaste.conf

# Default nick for pastes
DEFAULT_NICK=yishan
# Default service to paste to
DEFAULT_SERVICE=dpaste
# change default language for the ca and the osl services
DEFAULT_LANGUAGE_ca="bash"
DEFAULT_LANGUAGE_osl="Diff"
# change default expiration period for the ca service
DEFAULT_EXPIRATION_ca="1 day"
wgetpaste --help

Usage: /usr/bin/wgetpaste [options] [file[s]]

Options:

-l, --language LANG           set language (defaults to "Plain Text")
-d, --description DESCRIPTION set description (defaults to "stdin" or filename)
-n, --nick NICK               set nick (defaults to your username)
-s, --service SERVICE         set service to use (defaults to "dpaste")
-e, --expiration EXPIRATION   set when it should expire (defaults to "30 days")
-S, --list-services           list supported pastebin services
-L, --list-languages          list languages supported by the specified service
-E, --list-expiration         list expiration setting supported by the specified service
-u, --tinyurl URL             convert input url to tinyurl
-c, --command COMMAND         paste COMMAND and the output of COMMAND
-i, --info                    append the output of `emerge --info`
-I, --info-only               paste the output of `emerge --info` only
-x, --xcut                    read input from clipboard (requires x11-misc/xclip)
-X, --xpaste                  write resulting url to the X primary selection buffer (requires x11-misc/xclip
-C, --xclippaste              write resulting url to the X clipboard selection buffer (requires x11-misc/xclip)
-r, --raw                     show url for the raw paste (no syntax highlighting or html)
-t, --tee                     use tee to show what is being pasted
-v, --verbose                 show wget stderr output if no url is received
--completions             emit output suitable for shell completions (only affects --list-*)
--debug                   be *very* verbose (implies -v)
-h, --help                    show this help
-g, --ignore-configs          ignore /etc/wgetpaste.conf, ~/.wgetpaste.conf etc.
--version                 show version information

        

Utilisation

# Ex : 
cat .wgetpaste.conf | wgetpaste