Merge lp://staging/~ember/gwibber/sl-rim-urlshorters into lp://staging/gwibber/1.2

Proposed by Greg Grossmeier
Status: Rejected
Rejected by: Ken VanDine
Proposed branch: lp://staging/~ember/gwibber/sl-rim-urlshorters
Merge into: lp://staging/gwibber/1.2
Diff against target: None lines
To merge this branch: bzr merge lp://staging/~ember/gwibber/sl-rim-urlshorters
Reviewer Review Type Date Requested Status
Ken VanDine Disapprove
Review via email: mp+10251@code.staging.launchpad.net
To post a comment you must log in.
Revision history for this message
Ken VanDine (ken-vandine) wrote :

Sorry this took so long to get reviewed, this no longer applies to trunk.

Thanks for your submission.

review: Disapprove

Unmerged revisions

303. By Pedro Fragoso

Add sl.pt and r.im to urlshorter

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'gwibber/urlshorter/__init__.py'
2--- gwibber/urlshorter/__init__.py 2009-04-15 22:56:03 +0000
3+++ gwibber/urlshorter/__init__.py 2009-04-18 14:22:14 +0000
4@@ -1,5 +1,5 @@
5
6-import cligs, isgd, tinyurlcom, trim, ur1ca
7+import cligs, isgd, tinyurlcom, trim, ur1ca, rim, sl
8 #import snipurlcom, zima
9
10 PROTOCOLS = {
11@@ -9,5 +9,7 @@
12 "tinyurl.com": tinyurlcom,
13 "tr.im": trim,
14 "ur1.ca": ur1ca,
15+ "r.im": rim,
16+ "sl.pt": sl,
17 #"zi.ma": zima,
18 }
19
20=== added file 'gwibber/urlshorter/rim.py'
21--- gwibber/urlshorter/rim.py 1970-01-01 00:00:00 +0000
22+++ gwibber/urlshorter/rim.py 2009-04-18 14:22:14 +0000
23@@ -0,0 +1,24 @@
24+
25+"""
26+
27+r.im interface for Gwibber
28+Pedro Fragoso <ember@ubuntu.com>
29+
30+"""
31+
32+import urllib2
33+
34+PROTOCOL_INFO = {
35+
36+ "name": "r.im",
37+ "version": 0.1,
38+ "fqdn" : "http://r.im",
39+
40+}
41+
42+class URLShorter:
43+
44+ def short(self, text):
45+ short = urllib2.urlopen("http://r.im/api/index.cfm?long_url=%s" % urllib2.quote(text)).read().strip()
46+ return short
47+
48
49=== added file 'gwibber/urlshorter/sl.py'
50--- gwibber/urlshorter/sl.py 1970-01-01 00:00:00 +0000
51+++ gwibber/urlshorter/sl.py 2009-04-18 14:22:14 +0000
52@@ -0,0 +1,24 @@
53+
54+"""
55+
56+PunyURL interface for Gwibber
57+Pedro Fragoso <ember@ubuntu.com>
58+
59+"""
60+
61+import urllib2
62+
63+PROTOCOL_INFO = {
64+
65+ "name": "sl.pt",
66+ "version": 0.1,
67+ "fqdn" : "http://sl.pt",
68+
69+}
70+
71+class URLShorter:
72+
73+ def short(self, text):
74+ short = urllib2.urlopen("http://services.sapo.pt/PunyURL/GetCompressedURLByURL?url=%s" % urllib2.quote(text)).read().split()
75+ return short[6].strip('</ascii>')
76+

Subscribers

People subscribed via source and target branches