paste-py is a dead simple paste service written in Python. An instance is running at http://paste.awesom.eu.
The most useful utility is the paste.sh script: save it somewhere in your path and use it as follows:
paste.sh foo
will paste the content of the filefoo
and return the URL of the pastepaste.sh -
will paste what it reads from stdin and the URL of the paste
You can also put the language to highlight with and the user as second and third argument (though the language will be detected from the extension).
You can look at the parameters at the beginning of the script to set a default user or automatically copy the paste URL.
With paste-py, everything happens in the arguments you give in the
URL. Every argument is prepended by a &
. The following arguments
can be used:
ln
: add line numbers to the pastehl=foo
: syntax highlight the paste as languagefoo
raw
: raw paste, to download it; you can also use the prefix/raw/
to have a shell-friendly URL (eg.http://paste.awesom.eu/raw/HiT
)script
: used to paste from a script (will only return the URL, no html)
Users are also supported: enter a username (eg. foobar
) when pasting
something, and you can access all your pastes by browsing
http://paste.awesom.eu/user/foobar
. Note that you cannot delete
your pastes, so think twice before pasting something sensitive. In
case you really need to delete a paste, contact me.
The only dependencies are Tornado and Pygments. If you want to use the script to launch paste-py as a daemon, grizzled is also needed.
$ pip install tornado pygments grizzled
You can either launch it as a daemon or not: launch daemonize.py
or
paste.py
. Look at the help (--help
) if you want to change the
listening address. For example:
$ LANG=en_US.UTF-8 python paste.py --addr=0.0.0.0 --port=8080
The design is pretty basic, but some people made improvements to it. If you want a better design, look at http://paste.isomorphis.me/.
WTFPL, ie. do what the fuck you want with it.