wgetpaste
Command-line interface to various online pastebin services. Automates pasting content to multiple pastebin platforms.
Description
wgetpaste provides a simple script for uploading text content, command outputs, or files to popular pastebin services like dpaste, github gists, and gitlab snippets. It streamlines sharing logs, debugging output, or code snippets without manual copy-pasting through web interfaces.
Use cases include quickly sharing terminal output during collaboration, debugging sessions, or reporting issues. Users can customize pastes with language syntax highlighting, descriptions, nicknames, and expiration times. Configuration files allow setting defaults and service-specific headers for authentication.
The tool supports X11 clipboard integration for seamless copy-paste workflows and raw URL output for direct access without HTML formatting.
How It Works
wgetpaste reads input from stdin, files, commands, or clipboard, then uses HTTP POST requests to upload content to selected pastebin services via their APIs. Service-specific configurations in /etc/wgetpaste.conf or ~/.wgetpaste.conf define endpoints, headers (e.g., Authorization tokens), and defaults. Custom headers like HEADER_gists or URL_snippets enable authenticated uploads to GitHub Gists or GitLab Snippets. The tool returns a shareable URL, optionally shortened or copied to clipboard.
Installation
sudo apt install wgetpasteFlags
Examples
wgetpaste -hwgetpastewgetpaste file.txtwgetpaste -s gists -l pythonwgetpaste -c 'ls -la'wgetpaste -Swgetpaste -L -s dpastewgetpaste -x