I am very fond of those websites that allow users to upload files for a public viewing (called pastebin), usually I upload logs, links and other text files with pastebinit, a simple command-line tool, already available in Debian’s and Ubuntu’s archives, and I thought:
“Why don’t find a not-CLI solution to make it in a more fast and comfortable way?”
So I decided to write nautilus-pastebin, an extension for the GNOME file manager, which allows users to send files just a right-click away.
How does it work?
Simply: right-click on a file, select «Pastebin» and, if the Internet connection is active, after few seconds you will see a bubble like that one in this screenshot:
The extension doesn’t only show that notification, it also retrieves the MIME type in order to try to adjust the syntax highlighting parameter according to the configuration of the selected pastebin and finally copies the paste URL to the clipboard, allowing you to paste it in a browser tab, IRC channel or wherever you want.
The global configuration file is located into /etc path, but if you want to select another pastebin to use you may do it by creating a file like the following one:
pastebin = $GLOBAL_CONFIGFILE_SECTION
The file must be named as nautilus-pastebin.conf and saved under ~/.config/nautilus-pastebin/.
If problems occured during the past operation, you may see a message like the following:
Where can I download it? And how can install it?
You can find all the information that you need by opening the projects page, for the installation, after uncompressing the tarball, you can:
- Use the setup.py script.
- scripts/nautilus-pastebin.py to /usr/lib/nautilus/extensions-2.0/python/
- data/nautilus-pastebin.conf to /etc/ or in ~/.config/nautilus-pastebin/
- data/nautilus-pastebin.png to /usr/share/pixmaps/
After the installation, you may need to restart Nautilus:
Some pastebins of the preconfigured ones don’t work well and I need some time to improve and extend the support for other websites.
If you wanted to contribute to the development by sending me patches, configurations or suggestions I would be very happy!