Merge lp:~mordred/pastebinit/drizzle into lp:pastebinit

Proposed by Monty Taylor
Status: Merged
Merged at revision: 132
Proposed branch: lp:~mordred/pastebinit/drizzle
Merge into: lp:pastebinit
Diff against target: 75 lines (+46/-2)
3 files modified
pastebin.d/paste.drizzle.org.conf (+18/-0)
pastebin.d/paste.openstack.org.conf (+18/-0)
pastebinit (+10/-2)
To merge this branch: bzr merge lp:~mordred/pastebinit/drizzle
Reviewer Review Type Date Requested Status
Pastebinit Developers Pending
Review via email: mp+91149@code.launchpad.net

Description of the change

Adds paste.drizzle.org

To post a comment you must log in.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== added file 'pastebin.d/paste.drizzle.org.conf'
2--- pastebin.d/paste.drizzle.org.conf 1970-01-01 00:00:00 +0000
3+++ pastebin.d/paste.drizzle.org.conf 2012-02-01 19:11:17 +0000
4@@ -0,0 +1,18 @@
5+[pastebin]
6+basename = paste.drizzle.org
7+regexp = "http://paste.drizzle.org"
8+
9+[format]
10+lang = language
11+page = page
12+content = code
13+post_format = post_format
14+regexp = regexp
15+target_url = target_url
16+
17+[defaults]
18+page = "/json/?method=pastes.newPaste"
19+post_format = "json"
20+lang = ""
21+regexp = "\"data\": \"([^"]*)"
22+target_url = "http://paste.drizzle.org/show/"
23
24=== added file 'pastebin.d/paste.openstack.org.conf'
25--- pastebin.d/paste.openstack.org.conf 1970-01-01 00:00:00 +0000
26+++ pastebin.d/paste.openstack.org.conf 2012-02-01 19:11:17 +0000
27@@ -0,0 +1,18 @@
28+[pastebin]
29+basename = paste.openstack.org
30+regexp = "http://paste.openstack.org"
31+
32+[format]
33+lang = language
34+page = page
35+content = code
36+post_format = post_format
37+regexp = regexp
38+target_url = target_url
39+
40+[defaults]
41+page = "/json/?method=pastes.newPaste"
42+post_format = "json"
43+lang = ""
44+regexp = "\"data\": \"([^"]*)"
45+target_url = "http://paste.openstack.org/show/"
46
47=== modified file 'pastebinit'
48--- pastebinit 2011-09-25 20:38:14 +0000
49+++ pastebinit 2012-02-01 19:11:17 +0000
50@@ -310,7 +310,11 @@
51 if "regexp" in params:
52 reLink = params['regexp']
53 del params["regexp"]
54-
55+ if "target_url" in params:
56+ target_url = params["target_url"]
57+ del params["target_url"]
58+ else:
59+ target_url = None
60 if 'post_format' in params:
61 post_format = params['post_format']
62 del params['post_format']
63@@ -332,7 +336,11 @@
64
65 try:
66 if reLink: #Check if we have to apply a regexp
67- website = website.replace(tmp_page, "")
68+ if target_url:
69+ website = target_url
70+ else:
71+ website = website.replace(tmp_page, "")
72+
73 if reLink == '(.*)':
74 print page.read().strip()
75 else:

Subscribers

People subscribed via source and target branches

to all changes: