About dpaste.de


dpaste is open source. You can find the source, contribute to it and leave ideas on Github: github.com/bartTC/dpaste

API

  1. #!/usr/bin/env python
  2.  
  3. import urllib
  4. import urllib2
  5. import sys
  6.  
  7. def paste_code():
  8. request = urllib2.Request(
  9. 'http://dpaste.de/api/',
  10. urllib.urlencode([('content', sys.stdin.read())]),
  11. )
  12. response = urllib2.urlopen(request)
  13. # Strip surrounding quotes (NB: response has no trailing newline)
  14. print response.read()[1:-1]
  15.  
  16. if __name__ == '__main__':
  17. paste_code()

Save this script in /usr/local/bin/dpaste and chmod +x ..filepath.

Usage: cat foo.txt | dpaste

Or you could use curl: alias dpaste="curl -F 'content=<-' http://dpaste.de/api/"

Applications using the API:

Statistics

There are 2271 snippets in the database. The most popular languages are:

PYTHON 1259
TEXT ONLY 248
C 138
BASH 109
PHP 57

Imprint

Address:

Martin Mahner
Lauterbacher Str. 4
DE-18581 Putbus
Germany

Jabber/E-Mail:

martin@mahner.org