Wgetpaste

is Article description::a command-line tool for posting snippets of text to various online "pastebin" services. It makes it easy to post text to a pastebin, and presents a link for sharing the post. It should be very useful for providing information to help with troubleshooting, for posting to IRC or to the forums, for example.

See the service selection section for a list of available pastebin services. Visit a service's website for usage-information specific to that service.

The default service, dpaste.com, is well suited for posting to Gentoo IRC or requesting support. Services that require javascript to view the posts can be impractical.

USE flags
currently has just one use flag, for using SSL/TLS or not:

Emerge
Install :

Configuration
Settings, notably the default service, can be configured globally in or in, or per-user in  or in.

There is an example configuration file available.

Github gists
The gists service requires a valid API token. Generate it on the Github website and paste it into a config snippet:

A gist must be set to public or private by setting the variable either in the config file, or on the command-line, thus (for Bash):

must be set to  or   only or it will report an error!

Invocation
Invoke with the   option for useful information on usage:

Service selection
Before posting a snippet, care should be taken to select the desired service to post to.

To show which is the current default service, and list available services, use the  (  for short) option:

The default service is marked with an asterisk, this service will be used unless a different service is selected with the  (  for short) option, when pasting. For example:

Different paste services have different constraints, such as allowable size, retention period etc. Go to the service website for full information. For larger posts, 0x0 may be useful.

Posting a file
To post a file, simply run followed by the filename, not forgetting to specify a paste service if somthing other than the default is required.

For example, run the following command to create a paste of the system's Xorg configuration:

To create a paste of using the tiny URL service use the   option (  for short):

Post command output
A command's output may be directly posted to a snippet service, though it is recommended to write output to a file and check the contents before pasting, to avoid any possible security issues.

To paste the entire output of a command, use the  (  for short) option. Remember to quote the command:

Content may also be piped to, though this may omit stderr, so "2>&1" can be used, for example.

Advanced options
To set a language for syntax highlighting use the  (  for short) option:

Use the  (  for short) option to list all available languages, these depend on the selected paste service:

removing ansi-sequences with ansifilter
For getting color on terminals ansi-sequences are used. When uploading a logfile these can be annoying, e.g.: �[32m * �[39;49;00mPackage:   x11-wm/dwm-6.2 �[32m * �[39;49;00mRepository: gentoo �[32m * �[39;49;00mMaintainer: gyakovlev@gentoo.org �[32m * �[39;49;00mUSE:       abi_x86_64 amd64 elibc_glibc kernel_linux savedconfig userland_GNU xinerama �[32m * �[39;49;00mFEATURES:  network-sandbox preserve-libs sandbox userpriv usersandbox

app-text/ansifilter removes these control character.

Install :

Filter the build.log and write it to /tmp:

Upload /tmp/build.log with wgetpaste.

External references

 * There is a similar tool available in Portage :.
 * Pastebin - Wikipedia article about pastebin services.