Merge lp:~stefanor/ibid/url-output-404159 into lp:~ibid-core/ibid/old-trunk-pack-0.92

Proposed by Stefano Rivera
Status: Merged
Approved by: Jonathan Hitchcock
Approved revision: 728
Merged at revision: 737
Proposed branch: lp:~stefanor/ibid/url-output-404159
Merge into: lp:~ibid-core/ibid/old-trunk-pack-0.92
Diff against target: None lines
To merge this branch: bzr merge lp:~stefanor/ibid/url-output-404159
Reviewer Review Type Date Requested Status
Jonathan Hitchcock Approve
Michael Gorven Approve
Review via email: mp+9250@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Michael Gorven (mgorven) wrote :

 review approve

review: Approve
Revision history for this message
Jonathan Hitchcock (vhata) wrote :

This is a tad ugly, isn't it? Do we need to do it for all of them?

Revision history for this message
Stefano Rivera (stefanor) wrote :

> This is a tad ugly, isn't it? Do we need to do it for all of them?

I call it consistent, but no it's not necessary for all of them.

lp:~stefanor/ibid/url-output-404159 updated
726. By Stefano Rivera

Correctly grab the URLs we are now producing

727. By Stefano Rivera

Correctly grab lookup-style URLs too

728. By Stefano Rivera

Minor formatting tweaks

Revision history for this message
Jonathan Hitchcock (vhata) wrote :

<3 <>

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'ibid/plugins/feeds.py'
2--- ibid/plugins/feeds.py 2009-07-11 16:52:17 +0000
3+++ ibid/plugins/feeds.py 2009-07-24 15:41:23 +0000
4@@ -183,7 +183,7 @@
5 else:
6 summary = article.content[0].value
7
8- event.addresponse(u'"%(title)s" %(link)s : %(summary)s', {
9+ event.addresponse(u'"%(title)s" <%(link)s> %(summary)s', {
10 'title': html2text_file(article.title, None).strip(),
11 'link': article.link,
12 'summary': summary,
13
14=== modified file 'ibid/plugins/google.py'
15--- ibid/plugins/google.py 2009-07-10 13:34:44 +0000
16+++ ibid/plugins/google.py 2009-07-24 15:41:23 +0000
17@@ -52,7 +52,7 @@
18
19 title = item["titleNoFormatting"]
20
21- results.append(u'"%s" %s' % (decode_htmlentities(title), item["unescapedUrl"]))
22+ results.append(u'%s <%s>' % (decode_htmlentities(title), item["unescapedUrl"]))
23
24 if results:
25 event.addresponse(u', '.join(results))
26@@ -141,7 +141,7 @@
27 title = u''.join([e.string for e in item.a.contents])
28 if title.startswith("Image results for"):
29 continue
30- results.append(u'"%s" %s' % (decode_htmlentities(title), url))
31+ results.append(u'%s <%s>' % (decode_htmlentities(title), url))
32 except Exception:
33 pass
34 if len(results) >= 8:
35
36=== modified file 'ibid/plugins/lookup.py'
37--- ibid/plugins/lookup.py 2009-07-18 08:09:39 +0000
38+++ ibid/plugins/lookup.py 2009-07-24 15:41:23 +0000
39@@ -168,7 +168,7 @@
40 )
41 text = item.find('text').text
42
43- return u'%s : %s' % (url, text)
44+ return u'<%s>: %s' % (url, text)
45
46 @match(r'^(?:fml\s+|http://www\.fmylife\.com/\S+/)(\d+|random|flop|top|last|love|money|kids|work|health|sex|miscellaneous)$')
47 def fml(self, event, id):
48@@ -249,11 +249,11 @@
49
50 id, body = message
51 if len(body) > 1:
52- event.addresponse(u'http://textsfromlastnight.com/view/%i :', id)
53+ event.addresponse(u'<http://textsfromlastnight.com/view/%i>:', id)
54 for line in body:
55 event.addresponse(line)
56 else:
57- event.addresponse(u'http://textsfromlastnight.com/view/%(id)i : %(body)s', {
58+ event.addresponse(u'<http://textsfromlastnight.com/view/%(id)i>: %(body)s', {
59 'id': id,
60 'body': body[0],
61 })
62@@ -327,7 +327,7 @@
63 return
64
65 id, body = story
66- event.addresponse(u'%(url)sstory.php?id=%(id)i : %(body)s', {
67+ event.addresponse(u'<%(url)sstory.php?id=%(id)i>: %(body)s', {
68 'url': url,
69 'id': id,
70 'body': body,
71@@ -404,7 +404,7 @@
72 def latest(self, event, service_name, user):
73 service = self.services[service_name.lower()]
74 try:
75- event.addresponse(u'"%(text)s" %(ago)s ago, %(url)s', self.remote_latest(service, user))
76+ event.addresponse(u'"%(text)s" %(ago)s ago, <%(url)s>', self.remote_latest(service, user))
77 except HTTPError, e:
78 if e.code in (401, 403):
79 event.addresponse(u"Sorry, %s's feed is private", user)
80@@ -809,7 +809,7 @@
81 message = u'Show: %(Show Name)s. Premiered: %(Premiered)s. ' \
82 u'Latest Episode: %(Latest Episode)s. Next Episode: %(Next Episode)s. ' \
83 u'Airtime: %(Airtime)s on %(Network)s. Genres: %(Genres)s. ' \
84- u'Status: %(Status)s. - %(Show URL)s'
85+ u'Status: %(Status)s. <%(Show URL)s>'
86
87 if not retr_info:
88 event.addresponse(u"I can't find anything out about '%s'", show)
89
90=== modified file 'ibid/plugins/rfc.py'
91--- ibid/plugins/rfc.py 2009-07-10 13:34:44 +0000
92+++ ibid/plugins/rfc.py 2009-07-24 15:41:23 +0000
93@@ -156,7 +156,7 @@
94
95 number = int(number)
96 if number in rfcs:
97- event.addresponse(u"%(record)s http://www.rfc-editor.org/rfc/rfc%(number)i.txt", {
98+ event.addresponse(u"%(record)s <http://www.rfc-editor.org/rfc/rfc%(number)i.txt>", {
99 'record': rfcs[number].record,
100 'number': number,
101 })
102
103=== modified file 'ibid/plugins/trac.py'
104--- ibid/plugins/trac.py 2009-07-09 14:50:37 +0000
105+++ ibid/plugins/trac.py 2009-07-24 15:41:23 +0000
106@@ -48,7 +48,7 @@
107 if not ticket:
108 raise Exception(u"No such ticket")
109
110- message = u'New %s in %s reported by %s: "%s" %sticket/%s' % (ticket.type, ticket.component, ticket.reporter, ticket.summary, self.url, ticket.id)
111+ message = u'New %s in %s reported by %s: "%s" <%sticket/%s>' % (ticket.type, ticket.component, ticket.reporter, ticket.summary, self.url, ticket.id)
112 ibid.dispatcher.send({'reply': message, 'source': self.source, 'target': self.channel})
113 self.log.info(u'Ticket %s created', id)
114 return True
115@@ -79,7 +79,7 @@
116
117 if ticket:
118 event.addresponse(u'Ticket %(id)s (%(status)s %(priority)s %(type)s in %(component)s for %(milestone)s) '
119- u'reported %(ago)s ago assigned to %(owner)s: "%(summary)s" %(url)sticket/%(id)s', {
120+ u'reported %(ago)s ago assigned to %(owner)s: "%(summary)s" <%(url)sticket/%(id)s>', {
121 'id': ticket.id,
122 'status': ticket.status,
123 'priority': ticket.priority,

Subscribers

People subscribed via source and target branches