Merge lp:~lig/gwibber/slkiru into lp:gwibber

Proposed by Serge Matveenko
Status: Rejected
Rejected by: Ken VanDine
Proposed branch: lp:~lig/gwibber/slkiru
Merge into: lp:gwibber
Diff against target: 46 lines
2 files modified
gwibber/urlshorter/__init__.py (+2/-0)
gwibber/urlshorter/slkiru.py (+24/-0)
To merge this branch: bzr merge lp:~lig/gwibber/slkiru
Reviewer Review Type Date Requested Status
Ken VanDine Disapprove
Review via email: mp+13812@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Serge Matveenko (lig) wrote :

Support for slki.ru url shortener service added (resubmit)

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

466. By Serge Matveenko

Add slki.ru url shortener support

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-10-22 23:00:33 +0000
4@@ -1,6 +1,7 @@
5
6 import cligs, isgd, tinyurlcom, trim, ur1ca
7 #import snipurlcom, zima
8+import slkiru
9
10 PROTOCOLS = {
11 "cli.gs": cligs,
12@@ -10,4 +11,5 @@
13 "tr.im": trim,
14 "ur1.ca": ur1ca,
15 #"zi.ma": zima,
16+ "slki.ru": slkiru,
17 }
18
19=== added file 'gwibber/urlshorter/slkiru.py'
20--- gwibber/urlshorter/slkiru.py 1970-01-01 00:00:00 +0000
21+++ gwibber/urlshorter/slkiru.py 2009-10-22 23:00:33 +0000
22@@ -0,0 +1,24 @@
23+
24+"""
25+
26+slki.ru interface for Gwibber
27+lig (Serge Matveenko) - 2009
28+
29+"""
30+
31+import urllib2
32+
33+PROTOCOL_INFO = {
34+
35+ "name": "slki.ru",
36+ "version": 0.1,
37+ "fqdn" : "http://slki.ru",
38+
39+}
40+
41+class URLShorter:
42+
43+ def short(self, text):
44+ short = urllib2.urlopen("http://slki.ru/api/add/?url=%s" % urllib2.quote(text)).read().rstrip("\n")
45+ return short
46+