Welcome to SharePastes’s documentation!¶
Helps you quickly share code snippets via various services like Github Gist and PasteBin.com.
What does SharePastes do?¶
SharePastes provides you with a simple and minimal command line tool that you can use to quickly share whatever you have copied to your clipboard.
Contents¶
Requirements¶
- Python 2.7 (that’s what I have tested it with).
xclip
command for Linux must be installed.yum install xclip
for Fedora.apt-get install xclip
for Ubuntu.
Installation¶
sudo pip install https://github.com/vaidikkp/sharepastes/archive/master.zip
How to use?¶
Copy anything to your clipboard.
Run the following command:
sharepastes --using <service-name>
- where
<service-name>
is the service that you want to use: gist
for Github’s Gistpastebin
for Pastebin.com
- where
After successful execution of the above command, you will get link to your post in your terminal and the same will be copied to your clipboard as well.
Go ahead and share it with whoever you want to. Simply use your Operating System’s shortcut for pasting to paste the URL.
Creating Shortcuts¶
Obviously, you wouldn’t want to run that command everytime you want to share something. So the best use of SharePastes is by creating a shortcut for the above command i.e. sharepastes --using <service-name>
.
You may create shortcuts in:
- Linux
- GNOME - System Settings > Keyboard > Shortcuts
- If you use anyother desktop experience software and know the way to do this, please send a pull request.
- Mac OS - See this link.
Note: before using your shortcut for the first time, make sure you use the command from the terminal first because SharePastes needs API keys of the service you intend to post your text to.
Extending SharePastes¶
SharePastes currently supports only Github Gist and Pastebin. But, it can be extended to work with any other similar service that provides an API for the same.
What’s next?¶
- Perhaps support for more used services.
- OS notifications using something like PyNotify for Linux and similar for Mac OS and Windows.