Mark Polyakov

Anypaste 1.1

This is the first significant update to Anypaste, the smart command-line file sharing/pastebin-ing tool. For those who haven’t heard of it, Anypaste automatically detects the file types of files you pass to it and uploads them to suitable public-facing hosts, such as Imgur for images and Hastebin for text.

Tagging & Listing

Plugins can now have tags, such as “private”. For example, to upload to a site that doesn’t publicly list uploads, run anypaste -t private why-i-secretly-like-windows.txt. This feature was inspired by Anypaste’s logical ancestor Nopaste. Currently, there are “private”, “permanent”, “direct”, “editable”, and “deletable” tags setup on all appropriate built-in plugins. Listing plugins is possible as well: anypaste -l outputs a list of plugins, including their tags, possible configuration options, and more. You can list just the plugins that are compatible with a certain file by running anypaste -l my_file, or use any combination of other plugin-filtering options like -p.

Completion hooks

Anypaste now supports “completion hooks”, little scripts that run after each file is uploaded. There are two default ones provided which can be enabled with --notify and --copy, which will send a desktop notification and copy the primary link to your clipboard upon upload completion, respectively.

Scriptability

In 1.0, Anypaste outputted anything and everything to stdout. In 1.1, there are strict standards about what output goes where: only the links and the corresponding labels (such as Link: or Direct Link:) are put on stdout. We’ve also standardized the exit values of the scripts to make it clear why it has failed and display an appropriate message if you are using Anypaste inside your own script.

New Plugins

  • Imgur: By far the most popular image hosting site on the web, I initially left this out because its official API requires an API key. Now it comes with an API key in the source code!
  • Clyp.it: An additional audio host, because there was only one before.
  • Pomf: An open-source generic file hosting service. We use dmca.gripe’s instance by default.

Better Documentation

The old documentation was a set of hacked-together static files. The new Anypaste website uses Hugo with the Simpledoc theme to look better and be easier to maintain, as we can now write documentation in markup.

I’ve also added support for custom file names (not the same as the ones on disk), made interactive mode less glitchy, added automated tests (In Bash????), and more! I would be if you would star Anypaste on GitHub, add new plugins, report bugs, or even just join the #anypaste IRC channel.