{% extends "base.html" %} {% block headline %}

About dpaste.de

{% endblock %} {% block content %}

API

#!/usr/bin/env python

import urllib
import urllib2
import sys

def paste_code():
    request = urllib2.Request(
        'http://dpaste.de/api/',
        urllib.urlencode([('content', sys.stdin.read())]),
    )
    response = urllib2.urlopen(request)
    # Strip surrounding quotes (NB: response has no trailing newline)
    print response.read()[1:-1]

if __name__ == '__main__':
    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:

{% endblock %} {% block sidebar %}

Imprint

Address

Martin Mahner
Lauterbacher Str. 4
DE-18581 Putbus
Germany

Jabber/E-Mail:

martin@mahner.org

Phone:

+49 38301 890(770+8)1

1 Yes, that's math!

{% endblock %}