Enhancement: Support dpaste.com

Bug #1216322 reported by Marco Patzer
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
pastebinit
Triaged
Wishlist
Unassigned

Bug Description

It would be nice to have support for the Django pastebin dpaste.com as well.

Revision history for this message
Rolf Leggewie (r0lf) wrote :

setting to triaged

patches for the configuration file welcome!

Changed in pastebinit:
importance: Undecided → Wishlist
status: New → Triaged
Revision history for this message
Marco Patzer (mpfusion) wrote :

Here is an attempt at creating a `dpaste.com.conf` file.

[pastebin]
basename = dpaste.com
regexp = http://dpaste.com

[format]
user = poster
content = content
title = title
language = language

[defaults]
language = plain
page = http://dpaste.com/api/v1/

However, I don't know how to parse the returned URL which should be output on the console containing the URL of the paste. It is returned in the HTTP header as `Location`. Example:

    curl -is -F 'content=foobar' http://dpaste.com/api/v1/

Revision history for this message
Daniel Hahler (blueyed) wrote :

This conf works, but requires a change to pastebinit to accept/use `format` from `[defaults]`.
Using this config you will have to use `-f ""` to change the default format ("text", no accepted by dpaste) to an empty string.

  [pastebin]
  basename = dpaste.com
  regexp = http://dpaste.com

  [format]
  user = poster
  content = content
  title = title
  format = language
  page = page

  [defaults]
  # Empty means "Plain".
  format =
  page = /api/v1/

I am currently hacking in the pastebinit source anyway, and would add this as a pull request.

Revision history for this message
Daniel Hahler (blueyed) wrote :

When using the above conf, in e.g. ~/.pastebin.d/dpaste.com.conf, you can use this ~/.pastebinit.xml to use it:

    <pastebinit>
      <pastebin>http://dpaste.com</pastebin>
      <format></format>
    </pastebinit>

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.