Merge lp:~eduardo-mucelli/cairo-dock-plug-ins-extras/Twitter into lp:~cairo-dock-team/cairo-dock-plug-ins-extras/third-party

Proposed by Eduardo Mucelli Rezende Oliveira
Status: Merged
Merged at revision: 244
Proposed branch: lp:~eduardo-mucelli/cairo-dock-plug-ins-extras/Twitter
Merge into: lp:~cairo-dock-team/cairo-dock-plug-ins-extras/third-party
Diff against target: 866 lines (+582/-207)
3 files modified
Twitter/Twitter (+27/-19)
Twitter/Twitter.conf (+3/-0)
Twitter/emblem.py (+552/-188)
To merge this branch: bzr merge lp:~eduardo-mucelli/cairo-dock-plug-ins-extras/Twitter
Reviewer Review Type Date Requested Status
Cairo-Dock Devs Pending
Review via email: mp+98542@code.launchpad.net

Description of the change

emblem can be tweaked to be large, medium, and large. new icon also.

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=== modified file 'Twitter/Twitter'
2--- Twitter/Twitter 2012-03-19 00:02:27 +0000
3+++ Twitter/Twitter 2012-03-21 00:04:19 +0000
4@@ -183,7 +183,23 @@
5
6 def inform_end_of_waiting_process(self):
7 self.icon.SetQuickInfo("")
8+
9+ def refresh_emblem_counter(self):
10+ counter = self.tweet_stream.qsize() + self.message_stream.qsize()
11+ if counter > 0:
12+ self.emblem.update(counter) # create the emblem with the counter
13+ self.icon.SetIcon(self.emblem.emblem)
14+ else:
15+ self.icon.SetIcon(os.path.abspath("./icon"))
16
17+ def refresh_emblem_size(self):
18+ if self.config['emblem_size'] == "Small":
19+ self.emblem.set_size_small()
20+ elif self.config['emblem_size'] == "Medium":
21+ self.emblem.set_size_medium()
22+ else:
23+ self.emblem.set_size_large()
24+
25 def play_alert_sound(self):
26 os.popen('aplay %s' % os.path.abspath("./data/alert.wav"))
27
28@@ -198,15 +214,13 @@
29 if not entry['user']['screen_name'] == self.user.screen_name: # not sent by the own user
30 logp("Inserting new tweet on the stream Queue: %s" % entry)
31 self.tweet_stream.put(entry) # put the new tweet on the stream queue
32- self.emblem.update(self.tweet_stream.qsize() + self.message_stream.qsize()) # create the emblem with the counter
33- self.icon.SetEmblem(self.emblem.emblem, CDApplet.EMBLEM_TOP_RIGHT + CDApplet.EMBLEM_PERSISTENT) # add emblem
34+ self.refresh_emblem_counter()
35 self.play_alert_sound()
36 elif 'direct_message' in entry: # direct messages
37 if not entry['direct_message']['sender']['screen_name'] == self.user.screen_name: # not sent by the own user
38 logp("Inserting new message on the message Queue: %s" % entry)
39 self.message_stream.put(entry) # put the new message on the message queue
40- self.emblem.update(self.tweet_stream.qsize() + self.message_stream.qsize()) # create the emblem with the counter
41- self.icon.SetEmblem(self.emblem.emblem, CDApplet.EMBLEM_TOP_RIGHT + CDApplet.EMBLEM_PERSISTENT) # add emblem
42+ self.refresh_emblem_counter()
43 self.play_alert_sound()
44
45 # TODO: Use the Menu class
46@@ -233,12 +247,7 @@
47 nt_menu.add(Tweet(text, sender, uid))
48 nt_menu.pop_up()
49
50- if self.message_stream.empty(): # if there are not new messages, erase the emblem
51- self.icon.SetEmblem("", CDApplet.EMBLEM_TOP_RIGHT)
52- else: # but it is possible that there are also new message
53- self.emblem.update(self.message_stream.qsize()) # update the emblem for the direct messages counter
54- self.icon.SetEmblem(self.emblem.emblem, CDApplet.EMBLEM_TOP_RIGHT + CDApplet.EMBLEM_PERSISTENT)
55-
56+ self.refresh_emblem_counter()
57 self.inform_end_of_waiting_process()
58
59 def show_home_timeline(self):
60@@ -270,13 +279,8 @@
61 sender = direct_message['direct_message']['sender']['screen_name']
62 dm_menu.add(DirectMessage(text, sender))
63 dm_menu.pop_up()
64-
65- if self.tweet_stream.empty(): # if there are not new tweets, erase the emblem
66- self.icon.SetEmblem("", CDApplet.EMBLEM_TOP_RIGHT)
67- else: # but it is possible that there are also new tweets
68- self.emblem.update(self.tweet_stream.qsize()) # update the emblem for the new tweets counter
69- self.icon.SetEmblem(self.emblem.emblem, CDApplet.EMBLEM_TOP_RIGHT + CDApplet.EMBLEM_PERSISTENT)
70-
71+
72+ self.refresh_emblem_counter()
73 self.inform_end_of_waiting_process()
74
75 def show_direct_messages(self):
76@@ -473,8 +477,12 @@
77 # setting the callback to receive the data of every entry on the stream
78 self.stream_api = TwitterStreamAPI(self.user.access_key, self.user.access_secret, self.on_receive_new_entry_into_stream_callback)
79
80- #def reload(self):
81- #self.read_user_data()
82+ def get_config(self, keyfile):
83+ self.config['emblem_size'] = keyfile.get('Configuration', 'emblem_size')
84+
85+ def reload(self):
86+ self.refresh_emblem_counter()
87+ self.refresh_emblem_size()
88
89 # Callbacks
90 def on_answer_dialog(self, key, content):
91
92=== modified file 'Twitter/Twitter.conf'
93--- Twitter/Twitter.conf 2012-03-19 00:02:27 +0000
94+++ Twitter/Twitter.conf 2012-03-21 00:04:19 +0000
95@@ -97,3 +97,6 @@
96
97 #[gtk-preferences]
98 [Configuration]
99+
100+#L+[Small;Medium;Large] Size of the emblem that shows the number of new tweets, and messages:
101+emblem_size=Medium
102
103=== modified file 'Twitter/emblem.py'
104--- Twitter/emblem.py 2012-03-08 15:21:16 +0000
105+++ Twitter/emblem.py 2012-03-21 00:04:19 +0000
106@@ -8,205 +8,569 @@
107
108 import os
109
110+# All the emblems here were made using Inkscape and are based on a xlink pointing to the default icon.
111+# See xlink:href="./icon"
112+
113 class Emblem:
114 def __init__(self):
115 self.emblem = os.path.abspath(os.path.join(os.getcwd(), './emblem.svg'))
116 self.counter = 0
117+ self.size_small, self.size_medium, self.size_large = range(3)
118+ self.size = self.size_medium
119
120 def update(self, counter):
121 self.counter = counter
122 svg = open(self.emblem, 'w')
123 svg.write(self.draw())
124 svg.close()
125-
126+
127+ def set_size_small(self):
128+ self.size = self.size_small
129+
130+ def set_size_medium(self):
131+ self.size = self.size_medium
132+
133+ def set_size_large(self):
134+ self.size = self.size_large
135+
136 def draw(self):
137- emblem_string = """<?xml version="1.0" encoding="UTF-8" standalone="no"?>
138-<!-- Created with Inkscape (http://www.inkscape.org/) -->
139-<svg xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:cc="http://creativecommons.org/ns#" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:svg="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" version="1.0" width="39.983284" height="39.945618" id="svg2408" inkscape:version="0.48.0 r9654" sodipodi:docname="emblem.svg">
140- <sodipodi:namedview pagecolor="#ffffff" bordercolor="#666666" borderopacity="1" objecttolerance="10" gridtolerance="10" guidetolerance="10" inkscape:pageopacity="0" inkscape:pageshadow="2" inkscape:window-width="1280" inkscape:window-height="748" id="namedview94" showgrid="false" inkscape:zoom="3.4546968" inkscape:cx="-27.204217" inkscape:cy="-10.241983" inkscape:window-x="0" inkscape:window-y="0" inkscape:window-maximized="1" inkscape:current-layer="layer4" fit-margin-top="0" fit-margin-left="0" fit-margin-right="0" fit-margin-bottom="0" inkscape:snap-bbox="true" inkscape:snap-page="true"/>
141- <defs id="defs2410">
142- <linearGradient id="linearGradient3942">
143- <stop id="stop3944" style="stop-color:#ffffff;stop-opacity:1" offset="0"/>
144- <stop id="stop3946" style="stop-color:#ffffff;stop-opacity:0" offset="1"/>
145- </linearGradient>
146- <linearGradient id="linearGradient3727">
147- <stop id="stop3729" style="stop-color:#d5d5d5;stop-opacity:1" offset="0"/>
148- <stop id="stop3731" style="stop-color:#f1f1f1;stop-opacity:1" offset="1"/>
149- </linearGradient>
150- <linearGradient id="linearGradient3641">
151- <stop id="stop3643" style="stop-color:#000000;stop-opacity:1" offset="0"/>
152- <stop id="stop3645" style="stop-color:#000000;stop-opacity:0" offset="1"/>
153- </linearGradient>
154- <linearGradient x1="45.447727" y1="92.539597" x2="45.447727" y2="7.0165396" id="ButtonShadow" gradientUnits="userSpaceOnUse" gradientTransform="scale(1.0058652,0.994169)">
155- <stop id="stop3750" style="stop-color:#000000;stop-opacity:1" offset="0"/>
156- <stop id="stop3752" style="stop-color:#000000;stop-opacity:0.58823532" offset="1"/>
157- </linearGradient>
158- <linearGradient id="linearGradient3737">
159- <stop id="stop3739" style="stop-color:#ffffff;stop-opacity:1" offset="0"/>
160- <stop id="stop3741" style="stop-color:#ffffff;stop-opacity:0" offset="1"/>
161- </linearGradient>
162- <linearGradient id="linearGradient3700">
163- <stop id="stop3702" style="stop-color:#dcdcdc;stop-opacity:1" offset="0"/>
164- <stop id="stop3704" style="stop-color:#f0f0f0;stop-opacity:1" offset="1"/>
165- </linearGradient>
166- <filter color-interpolation-filters="sRGB" id="filter3174">
167- <feGaussianBlur id="feGaussianBlur3176" stdDeviation="1.71"/>
168- </filter>
169- <filter x="-0.192" y="-0.192" width="1.3839999" height="1.3839999" color-interpolation-filters="sRGB" id="filter3794">
170- <feGaussianBlur id="feGaussianBlur3796" stdDeviation="5.28"/>
171- </filter>
172- <linearGradient x1="48" y1="20.220806" x2="48" y2="138.66119" id="linearGradient3613" xlink:href="#linearGradient3737" gradientUnits="userSpaceOnUse"/>
173- <radialGradient cx="48" cy="90.171875" r="42" fx="48" fy="90.171875" id="radialGradient3619" xlink:href="#linearGradient3737" gradientUnits="userSpaceOnUse" gradientTransform="matrix(1.1573129,0,0,0.99590774,-7.5510206,0.19713193)"/>
174- <clipPath id="clipPath3613">
175- <rect width="84" height="84" rx="6" ry="6" x="6" y="6" id="rect3615" style="fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:none"/>
176- </clipPath>
177- <linearGradient x1="48" y1="88" x2="48" y2="32" id="linearGradient3627" xlink:href="#linearGradient3700" gradientUnits="userSpaceOnUse"/>
178- <linearGradient x1="48" y1="88" x2="48" y2="36" id="linearGradient3635" xlink:href="#linearGradient3727" gradientUnits="userSpaceOnUse"/>
179- <filter color-interpolation-filters="sRGB" id="filter3649">
180- <feGaussianBlur id="feGaussianBlur3651" stdDeviation="1.38"/>
181- </filter>
182- <filter color-interpolation-filters="sRGB" id="filter3665">
183- <feGaussianBlur id="feGaussianBlur3667" stdDeviation="0.69"/>
184- </filter>
185- <linearGradient x1="36.357143" y1="6" x2="36.357143" y2="63.893143" id="linearGradient3687" xlink:href="#linearGradient3737" gradientUnits="userSpaceOnUse"/>
186- <linearGradient x1="48" y1="90" x2="48" y2="5.9877172" id="linearGradient3689" xlink:href="#linearGradient3700" gradientUnits="userSpaceOnUse"/>
187- <clipPath id="clipPath3696">
188- <rect width="84" height="84" rx="6" ry="6" x="106" y="6" id="rect3698" style="fill:#ff00ff;fill-opacity:1;fill-rule:nonzero;stroke:none"/>
189- </clipPath>
190- <linearGradient x1="48" y1="32" x2="48" y2="80" id="linearGradient3701" xlink:href="#linearGradient3641" gradientUnits="userSpaceOnUse" gradientTransform="translate(100,0)"/>
191- <clipPath id="clipPath3703">
192- <rect width="84" height="84" rx="6" ry="6" x="106" y="6" id="rect3705" style="fill:#ff00ff;fill-opacity:1;fill-rule:nonzero;stroke:none"/>
193- </clipPath>
194- <linearGradient x1="51" y1="62" x2="51" y2="21" id="linearGradient3707" xlink:href="#linearGradient3641" gradientUnits="userSpaceOnUse" gradientTransform="translate(100,-1)"/>
195- <linearGradient id="linearGradient3737-3">
196- <stop id="stop3739-5" style="stop-color:#ffffff;stop-opacity:1" offset="0"/>
197- <stop id="stop3741-7" style="stop-color:#ffffff;stop-opacity:0" offset="1"/>
198- </linearGradient>
199- <radialGradient cx="48" cy="90.171875" r="42" fx="48" fy="90.171875" id="radialGradient2858" xlink:href="#linearGradient3737-3" gradientUnits="userSpaceOnUse" gradientTransform="matrix(1.1573129,0,0,0.99590774,-7.551021,0.1971319)"/>
200- <linearGradient x1="45.447727" y1="92.539597" x2="45.447727" y2="7.0165396" id="ButtonShadow-0" gradientUnits="userSpaceOnUse" gradientTransform="matrix(1.0058652,0,0,0.994169,100,0)">
201- <stop id="stop3750-8" style="stop-color:#000000;stop-opacity:1" offset="0"/>
202- <stop id="stop3752-5" style="stop-color:#000000;stop-opacity:0.58823532" offset="1"/>
203- </linearGradient>
204- <linearGradient x1="32.251034" y1="6.1317081" x2="32.251034" y2="90.238609" id="linearGradient3780" xlink:href="#ButtonShadow-0" gradientUnits="userSpaceOnUse" gradientTransform="matrix(1.0238095,0,0,1.0119048,-1.1428571,-98.071429)"/>
205- <linearGradient x1="32.251034" y1="6.1317081" x2="32.251034" y2="90.238609" id="linearGradient3772" xlink:href="#ButtonShadow-0" gradientUnits="userSpaceOnUse" gradientTransform="matrix(1.0238095,0,0,1.0119048,-1.1428571,-98.071429)"/>
206- <linearGradient x1="32.251034" y1="6.1317081" x2="32.251034" y2="90.238609" id="linearGradient3725" xlink:href="#ButtonShadow-0" gradientUnits="userSpaceOnUse" gradientTransform="matrix(1.0238095,0,0,1.0119048,-1.1428571,-98.071429)"/>
207- <linearGradient x1="32.251034" y1="6.1317081" x2="32.251034" y2="90.238609" id="linearGradient3721" xlink:href="#ButtonShadow-0" gradientUnits="userSpaceOnUse" gradientTransform="translate(0,-97)"/>
208- <linearGradient x1="32.251034" y1="6.1317081" x2="32.251034" y2="90.238609" id="linearGradient2918" xlink:href="#ButtonShadow-0" gradientUnits="userSpaceOnUse" gradientTransform="matrix(1.0238095,0,0,1.0119048,-1.1428571,-98.071429)"/>
209- <linearGradient id="linearGradient3801">
210- <stop id="stop3803" style="stop-color:#a4d620;stop-opacity:1" offset="0"/>
211- <stop id="stop3805" style="stop-color:#62a915;stop-opacity:1" offset="1"/>
212- </linearGradient>
213- <linearGradient x1="45.298355" y1="72.618279" x2="79.622185" y2="72.618279" id="linearGradient3915" xlink:href="#linearGradient3801" gradientUnits="userSpaceOnUse"/>
214- <linearGradient x1="68" y1="52" x2="68" y2="84" id="linearGradient3948" xlink:href="#linearGradient3942" gradientUnits="userSpaceOnUse"/>
215- <linearGradient gradientUnits="userSpaceOnUse" xlink:href="#linearGradient3942-7" id="linearGradient3948-1" y2="84" x2="68" y1="52" x1="68"/>
216- <linearGradient gradientUnits="userSpaceOnUse" xlink:href="#linearGradient3801-9" id="linearGradient3915-7" y2="72.618279" x2="79.622185" y1="72.618279" x1="45.298355"/>
217- <linearGradient id="linearGradient3801-9">
218- <stop offset="0" style="stop-color:#a4d620;stop-opacity:1" id="stop3803-1"/>
219- <stop offset="1" style="stop-color:#62a915;stop-opacity:1" id="stop3805-7"/>
220- </linearGradient>
221- <linearGradient gradientTransform="matrix(1.0238095,0,0,1.0119048,-1.1428571,-98.071429)" gradientUnits="userSpaceOnUse" xlink:href="#ButtonShadow-0-0" id="linearGradient2918-0" y2="90.238609" x2="32.251034" y1="6.1317081" x1="32.251034"/>
222- <linearGradient gradientTransform="translate(0,-97)" gradientUnits="userSpaceOnUse" xlink:href="#ButtonShadow-0-0" id="linearGradient3721-9" y2="90.238609" x2="32.251034" y1="6.1317081" x1="32.251034"/>
223- <linearGradient gradientTransform="matrix(1.0238095,0,0,1.0119048,-1.1428571,-98.071429)" gradientUnits="userSpaceOnUse" xlink:href="#ButtonShadow-0-0" id="linearGradient3725-4" y2="90.238609" x2="32.251034" y1="6.1317081" x1="32.251034"/>
224- <linearGradient gradientTransform="matrix(1.0238095,0,0,1.0119048,-1.1428571,-98.071429)" gradientUnits="userSpaceOnUse" xlink:href="#ButtonShadow-0-0" id="linearGradient3772-9" y2="90.238609" x2="32.251034" y1="6.1317081" x1="32.251034"/>
225- <linearGradient gradientTransform="matrix(1.0238095,0,0,1.0119048,-1.1428571,-98.071429)" gradientUnits="userSpaceOnUse" xlink:href="#ButtonShadow-0-0" id="linearGradient3780-5" y2="90.238609" x2="32.251034" y1="6.1317081" x1="32.251034"/>
226- <linearGradient gradientTransform="matrix(1.0058652,0,0,0.994169,100,0)" gradientUnits="userSpaceOnUse" id="ButtonShadow-0-0" y2="7.0165396" x2="45.447727" y1="92.539597" x1="45.447727">
227- <stop offset="0" style="stop-color:#000000;stop-opacity:1" id="stop3750-8-6"/>
228- <stop offset="1" style="stop-color:#000000;stop-opacity:0.58823532" id="stop3752-5-1"/>
229- </linearGradient>
230- <radialGradient gradientTransform="matrix(1.1573129,0,0,0.99590774,-7.551021,0.1971319)" gradientUnits="userSpaceOnUse" xlink:href="#linearGradient3737-3-2" id="radialGradient2858-1" fy="90.171875" fx="48" r="42" cy="90.171875" cx="48"/>
231- <linearGradient id="linearGradient3737-3-2">
232- <stop offset="0" style="stop-color:#ffffff;stop-opacity:1" id="stop3739-5-2"/>
233- <stop offset="1" style="stop-color:#ffffff;stop-opacity:0" id="stop3741-7-6"/>
234- </linearGradient>
235- <linearGradient gradientTransform="translate(100,-1)" gradientUnits="userSpaceOnUse" xlink:href="#linearGradient3641-7" id="linearGradient3707-7" y2="21" x2="51" y1="62" x1="51"/>
236- <clipPath id="clipPath3703-7">
237- <rect style="fill:#ff00ff;fill-opacity:1;fill-rule:nonzero;stroke:none" id="rect3705-2" y="6" x="106" ry="6" rx="6" height="84" width="84"/>
238- </clipPath>
239- <linearGradient gradientTransform="translate(100,0)" gradientUnits="userSpaceOnUse" xlink:href="#linearGradient3641-7" id="linearGradient3701-1" y2="80" x2="48" y1="32" x1="48"/>
240- <clipPath id="clipPath3696-8">
241- <rect style="fill:#ff00ff;fill-opacity:1;fill-rule:nonzero;stroke:none" id="rect3698-7" y="6" x="106" ry="6" rx="6" height="84" width="84"/>
242- </clipPath>
243- <linearGradient gradientUnits="userSpaceOnUse" xlink:href="#linearGradient3700-8" id="linearGradient3689-4" y2="5.9877172" x2="48" y1="90" x1="48"/>
244- <linearGradient gradientUnits="userSpaceOnUse" xlink:href="#linearGradient3737-8" id="linearGradient3687-0" y2="63.893143" x2="36.357143" y1="6" x1="36.357143"/>
245- <filter id="filter3665-9" color-interpolation-filters="sRGB">
246- <feGaussianBlur stdDeviation="0.69" id="feGaussianBlur3667-5"/>
247- </filter>
248- <filter id="filter3649-6" color-interpolation-filters="sRGB">
249- <feGaussianBlur stdDeviation="1.38" id="feGaussianBlur3651-4"/>
250- </filter>
251- <linearGradient gradientUnits="userSpaceOnUse" xlink:href="#linearGradient3727-2" id="linearGradient3635-6" y2="36" x2="48" y1="88" x1="48"/>
252- <linearGradient gradientUnits="userSpaceOnUse" xlink:href="#linearGradient3700-8" id="linearGradient3627-2" y2="32" x2="48" y1="88" x1="48"/>
253- <clipPath id="clipPath3613-8">
254- <rect style="fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:none" id="rect3615-9" y="6" x="6" ry="6" rx="6" height="84" width="84"/>
255- </clipPath>
256- <radialGradient gradientTransform="matrix(1.1573129,0,0,0.99590774,-7.5510206,0.19713193)" gradientUnits="userSpaceOnUse" xlink:href="#linearGradient3737-8" id="radialGradient3619-6" fy="90.171875" fx="48" r="42" cy="90.171875" cx="48"/>
257- <linearGradient gradientUnits="userSpaceOnUse" xlink:href="#linearGradient3737-8" id="linearGradient3613-0" y2="138.66119" x2="48" y1="20.220806" x1="48"/>
258- <filter id="filter3794-9" color-interpolation-filters="sRGB" height="1.3839999" width="1.3839999" y="-0.192" x="-0.192">
259- <feGaussianBlur stdDeviation="5.28" id="feGaussianBlur3796-2"/>
260- </filter>
261- <filter id="filter3174-1" color-interpolation-filters="sRGB">
262- <feGaussianBlur stdDeviation="1.71" id="feGaussianBlur3176-4"/>
263- </filter>
264- <linearGradient id="linearGradient3700-8">
265- <stop offset="0" style="stop-color:#dcdcdc;stop-opacity:1" id="stop3702-4"/>
266- <stop offset="1" style="stop-color:#f0f0f0;stop-opacity:1" id="stop3704-3"/>
267- </linearGradient>
268- <linearGradient id="linearGradient3737-8">
269- <stop offset="0" style="stop-color:#ffffff;stop-opacity:1" id="stop3739-6"/>
270- <stop offset="1" style="stop-color:#ffffff;stop-opacity:0" id="stop3741-8"/>
271- </linearGradient>
272- <linearGradient gradientTransform="scale(1.0058652,0.994169)" gradientUnits="userSpaceOnUse" id="ButtonShadow-3" y2="7.0165396" x2="45.447727" y1="92.539597" x1="45.447727">
273- <stop offset="0" style="stop-color:#000000;stop-opacity:1" id="stop3750-0"/>
274- <stop offset="1" style="stop-color:#000000;stop-opacity:0.58823532" id="stop3752-7"/>
275- </linearGradient>
276- <linearGradient id="linearGradient3641-7">
277- <stop offset="0" style="stop-color:#000000;stop-opacity:1" id="stop3643-4"/>
278- <stop offset="1" style="stop-color:#000000;stop-opacity:0" id="stop3645-4"/>
279- </linearGradient>
280- <linearGradient id="linearGradient3727-2">
281- <stop offset="0" style="stop-color:#d5d5d5;stop-opacity:1" id="stop3729-5"/>
282- <stop offset="1" style="stop-color:#f1f1f1;stop-opacity:1" id="stop3731-4"/>
283- </linearGradient>
284- <linearGradient id="linearGradient3942-7">
285- <stop offset="0" style="stop-color:#ffffff;stop-opacity:1" id="stop3944-4"/>
286- <stop offset="1" style="stop-color:#ffffff;stop-opacity:0" id="stop3946-5"/>
287- </linearGradient>
288- <linearGradient inkscape:collect="always" xlink:href="#ButtonShadow-3" id="linearGradient3250" gradientUnits="userSpaceOnUse" gradientTransform="scale(1.0058652,0.994169)" x1="45.447727" y1="92.539597" x2="45.447727" y2="7.0165396"/>
289- <linearGradient inkscape:collect="always" xlink:href="#linearGradient3801-9" id="linearGradient3252" gradientUnits="userSpaceOnUse" x1="45.298355" y1="72.618279" x2="79.622185" y2="72.618279"/>
290- <linearGradient inkscape:collect="always" xlink:href="#linearGradient3942-7" id="linearGradient3254" gradientUnits="userSpaceOnUse" x1="68" y1="52" x2="68" y2="84"/>
291- </defs>
292- <metadata id="metadata2413">
293- <rdf:RDF>
294- <cc:Work rdf:about="">
295- <dc:format>image/svg+xml</dc:format>
296- <dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage"/>
297- <dc:title/>
298- </cc:Work>
299- </rdf:RDF>
300- </metadata>
301- <g id="layer2" style="display:none" transform="translate(-176.03343,-51.028478)">
302- <rect width="86" height="85" rx="6" ry="6" x="5" y="7" id="rect3745" style="opacity:0.9;fill:url(#ButtonShadow);fill-opacity:1;fill-rule:nonzero;stroke:none;filter:url(#filter3174)"/>
303- </g>
304- <g id="layer4" transform="translate(-50.007625,-51.028478)">
305- <g id="g3234" transform="matrix(0.68115941,0,0,0.68115941,28.692755,16.26995)">
306- <path style="opacity:0.1;color:#000000;fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:2;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate" id="path3960" inkscape:connector-curvature="0" d="m 89.986349,69.238985 c -0.21488,-1.561093 -1.973583,-1.971086 -3.08095,-2.785965 0.452305,-1.002477 1.307299,-1.880744 1.442147,-2.982622 0.09844,-1.212445 -1.013508,-2.114893 -2.161243,-2.135756 -0.574938,-0.191984 -1.529962,-0.121132 -1.883184,-0.466436 0.105461,-1.303923 0.927598,-2.804937 -0.05258,-3.95302 -0.907896,-1.060888 -2.339545,-0.509432 -3.503632,-0.325674 -0.950635,0.504422 -0.81239,-0.565783 -0.973216,-1.2035 -0.130627,-1.071533 -0.401383,-2.422333 -1.652276,-2.666162 -1.269606,-0.351715 -2.257329,0.785416 -3.345553,1.248885 -0.564682,0.197811 -0.761585,-1.032508 -1.178359,-1.409042 -0.426005,-1.011804 -1.521655,-1.848863 -2.654045,-1.413094 -1.095119,0.436651 -1.63445,1.627605 -2.458205,2.425428 -0.973647,-0.65486 -1.72467,-1.7847 -2.91707,-1.99934 -1.243767,-0.181639 -2.134633,0.905175 -2.372989,2.019516 -0.345055,0.444832 -0.243497,1.842522 -1.003052,1.403006 -1.213096,-0.355405 -2.631658,-1.302577 -3.801916,-0.341572 -1.164288,0.944179 -0.641361,2.603822 -0.785903,3.912444 -1.186176,0.269467 -2.880347,-0.340038 -3.868298,0.741757 -1.026659,1.143887 -0.143349,2.597452 0.237559,3.813095 0.487992,0.76899 -0.891072,0.672735 -1.319748,1.016916 -1.098052,0.268634 -2.195073,1.121664 -2.064313,2.380723 0.249354,1.192288 1.335753,1.97237 1.99934,2.949845 -0.871859,0.915157 -2.269562,1.493314 -2.556533,2.818742 -0.186067,1.142981 0.709312,1.986005 1.663193,2.403037 0.374257,0.418594 1.762649,0.565214 1.196802,1.235928 -0.585967,1.153839 -1.765734,2.450576 -0.926208,3.768425 0.810341,1.207354 2.476744,0.956157 3.736472,1.311043 -0.08576,1.227497 -0.781478,2.521328 -0.229433,3.703695 0.526899,1.071756 1.844115,1.213477 2.87647,0.879241 0.560732,0.07218 1.729076,-0.722239 1.724808,0.155757 0.28962,1.207178 0.140911,2.908592 1.527846,3.422546 1.38487,0.596205 2.576146,-0.697698 3.773565,-1.225564 0.454783,0.276534 0.742145,1.177337 1.132089,1.695641 0.455828,1.285443 2.259105,1.820804 3.255585,0.80819 0.610876,-0.645848 1.17573,-1.360459 1.769908,-2.032116 1.070537,0.696774 1.92142,2.036743 3.310382,1.999339 1.284689,-0.0939 1.81764,-1.335721 2.151522,-2.404812 0.206115,-0.763429 0.45194,-1.441171 1.291319,-0.838121 1.079697,0.400421 2.40691,1.016712 3.407356,0.09643 1.036768,-1.007403 0.54752,-2.574581 0.688297,-3.867575 1.24572,-0.135375 2.670869,0.29881 3.736472,-0.524417 0.936001,-0.804307 0.694064,-2.129136 0.219537,-3.122161 -0.129526,-0.619425 -0.912001,-1.544893 0.15361,-1.604149 1.111548,-0.448238 2.718145,-0.69704 2.904459,-2.123887 0.293747,-1.438242 -1.158981,-2.317711 -1.863365,-3.381883 -0.0012,-0.497479 0.978512,-0.910082 1.354831,-1.374896 0.68176,-0.486375 1.154931,-1.160958 1.098503,-2.027866 z"/>
307- <path inkscape:connector-curvature="0" style="opacity:0.15;color:#000000;fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:2;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate" id="path3956" transform="matrix(0,1.048834,-1.048834,0,146.16452,5.4895435)" d="m 60.9375,54.59375 a 0.86264402,0.86264402 0 0 0 -0.71875,0.4375 L 58.5,57.875 55.625,56.25 a 0.86264402,0.86264402 0 0 0 -1.28125,0.59375 l -0.625,3.3125 -3.28125,-0.5625 a 0.86264402,0.86264402 0 0 0 -1,1 L 50,63.875 46.6875,64.5 a 0.86264402,0.86264402 0 0 0 -0.59375,1.28125 l 1.625,2.875 L 44.875,70.375 A 0.86264402,0.86264402 0 0 0 44.75,71.78125 L 47.25,73.9375 45.15625,76.5 A 0.86264402,0.86264402 0 0 0 45.5,77.875 l 3.15625,1.1875 -1.125,3.15625 a 0.86264402,0.86264402 0 0 0 0.8125,1.15625 l 3.3125,0.03125 0.0625,3.3125 a 0.86264402,0.86264402 0 0 0 1.15625,0.8125 L 56,86.4375 l 1.1875,3.125 a 0.86264402,0.86264402 0 0 0 1.34375,0.34375 l 2.59375,-2.125 2.1875,2.5625 a 0.86264402,0.86264402 0 0 0 1.40625,-0.125 l 1.6875,-2.875 2.9375,1.625 a 0.86264402,0.86264402 0 0 0 1.25,-0.59375 l 0.59375,-3.28125 3.3125,0.5625 a 0.86264402,0.86264402 0 0 0 1,-1 L 74.9375,81.34375 78.21875,80.75 A 0.86264402,0.86264402 0 0 0 78.8125,79.5 l -1.625,-2.9375 2.875,-1.6875 a 0.86264402,0.86264402 0 0 0 0.125,-1.40625 L 77.625,71.28125 79.75,68.6875 a 0.86264402,0.86264402 0 0 0 -0.34375,-1.34375 l -3.125,-1.1875 1.09375,-3.125 A 0.86264402,0.86264402 0 0 0 76.5625,61.875 L 73.25,61.8125 73.21875,58.5 A 0.86264402,0.86264402 0 0 0 72.0625,57.6875 l -3.15625,1.125 -1.1875,-3.15625 a 0.86264402,0.86264402 0 0 0 -1.375,-0.34375 l -2.5625,2.09375 -2.15625,-2.5 a 0.86264402,0.86264402 0 0 0 -0.6875,-0.3125 z"/>
308- <path inkscape:connector-curvature="0" style="opacity:0.3;color:#000000;fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:2;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate" id="path3950" transform="matrix(0,1.048834,-1.048834,0,146.16452,5.4895435)" d="m 74.641931,84.79994 -4.128425,-0.680449 -0.772592,4.112178 -3.646724,-2.051417 -2.132447,3.599941 -2.725174,-3.174954 -3.235096,2.653498 -1.474928,-3.915545 -3.947546,1.387004 -0.04678,-4.183864 -4.183864,-0.04678 1.387005,-3.947547 -3.915546,-1.474927 2.653499,-3.235097 -3.174955,-2.725173 3.599941,-2.132447 -2.051417,-3.646724 4.112178,-0.772592 -0.680448,-4.128426 4.128425,0.680449 0.772592,-4.112178 3.646724,2.051417 2.132447,-3.599941 2.725173,3.174954 3.235097,-2.653498 1.474927,3.915545 3.947547,-1.387004 0.04678,4.183864 4.183863,0.04678 -1.387004,3.947547 3.915545,1.474927 -2.653498,3.235097 3.174955,2.725173 -3.599942,2.132447 2.051418,3.646724 -4.112178,0.772592 z"/>
309- <path transform="matrix(0,1.048834,-1.048834,0,146.16452,4.4895435)" inkscape:connector-curvature="0" style="color:#000000;fill:#ff0000;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:2;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate" id="path3139" d="m 74.641931,84.79994 -4.128425,-0.680449 -0.772592,4.112178 -3.646724,-2.051417 -2.132447,3.599941 -2.725174,-3.174954 -3.235096,2.653498 -1.474928,-3.915545 -3.947546,1.387004 -0.04678,-4.183864 -4.183864,-0.04678 1.387005,-3.947547 -3.915546,-1.474927 2.653499,-3.235097 -3.174955,-2.725173 3.599941,-2.132447 -2.051417,-3.646724 4.112178,-0.772592 -0.680448,-4.128426 4.128425,0.680449 0.772592,-4.112178 3.646724,2.051417 2.132447,-3.599941 2.725173,3.174954 3.235097,-2.653498 1.474927,3.915545 3.947547,-1.387004 0.04678,4.183864 4.183863,0.04678 -1.387004,3.947547 3.915545,1.474927 -2.653498,3.235097 3.174955,2.725173 -3.599942,2.132447 2.051418,3.646724 -4.112178,0.772592 z"/>
310- <text xml:space="preserve" style="font-size:16px;font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;text-align:start;line-height:125%;letter-spacing:-1.32000005px;writing-mode:lr-tb;text-anchor:start;opacity:0.15;fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none;font-family:Sans;-inkscape-font-specification:Sans Bold" x="59.530632" y="77.325226" id="text3856" sodipodi:linespacing="125%" transform="scale(0.9999961,1.0000039)">
311- <tspan sodipodi:role="line" id="tspan3858" x="59.530632" y="77.325226" style="font-size:16px;font-weight:bold;letter-spacing:-1.32000005px;fill:#000000;-inkscape-font-specification:Sans Bold">{0}</tspan>
312- </text>
313- <path style="opacity:0;fill:#000000;stroke:none;display:inline" id="path3919" inkscape:connector-curvature="0" d="m 60,72 4,-4 4,4 8,-8 4,4 -12,12 -8,-8 z"/>
314- <path style="opacity:0.6;color:#000000;fill:url(#linearGradient3948);fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:2;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate" id="path3933" inkscape:connector-curvature="0" d="M 71.5625,52 68.71875,55.34375 65.3125,52.5625 63.78125,56.65625 59.625,55.1875 l 0,1 4.15625,1.46875 1.53125,-4.09375 3.40625,2.78125 L 71.5625,53 73.8125,56.78125 77.625,54.625 78.4375,58.9375 82.625,58.25 82.78125,57.21875 78.4375,57.9375 77.625,53.625 73.8125,55.78125 71.5625,52 z m -11.96875,7.59375 -4.40625,0.03125 0.34375,1 4.0625,-0.03125 0,-1 z m 22.625,2 -0.15625,0.96875 3.8125,0.71875 0.5,-0.90625 -4.15625,-0.78125 z m -25.875,2.3125 -3.78125,1.40625 0.625,0.78125 3.46875,-1.3125 -0.3125,-0.875 z m 28.3125,2.53125 -0.4375,0.75 3.09375,1.84375 L 88,68.4375 l -3.34375,-2 z M 54.875,69.125 52,71.5625 l 0.6875,0.40625 2.65625,-2.25 L 54.875,69.125 z m 30.25,2.75 -0.46875,0.40625 2.15625,2.625 0.625,-0.21875 -2.3125,-2.8125 z m -29.78125,2.6875 -1.71875,3.0625 0.5,0.09375 1.65625,-2.90625 -0.4375,-0.25 z m 28.3125,2.53125 -0.3125,0.125 1.125,3.15625 0.34375,0 -1.15625,-3.28125 z m -25.875,2.3125 -0.5625,3.375 L 57.375,82.75 57.9375,79.4375 57.78125,79.40625 z"/>
315- <text xml:space="preserve" style="font-size:12px;font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;text-align:start;line-height:125%;writing-mode:lr-tb;text-anchor:start;opacity:0.3;fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none;font-family:Sans;-inkscape-font-specification:Sans Bold" x="60.261475" y="76.597481" id="text3074" sodipodi:linespacing="125%">
316- <tspan sodipodi:role="line" id="tspan3076" x="60.261475" y="76.597481" style="font-size:14px;fill:#000000">{0}</tspan>
317- </text>
318- <text transform="scale(0.9999961,1.0000039)" sodipodi:linespacing="125%" id="text3852" y="78.053253" x="58.71452" style="font-size:18px;font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;text-align:start;line-height:125%;letter-spacing:-1.32000005px;writing-mode:lr-tb;text-anchor:start;opacity:0.05;fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none;font-family:Sans;-inkscape-font-specification:Sans Bold" xml:space="preserve">
319- <tspan style="font-size:18px;font-weight:bold;letter-spacing:-2.47000003px;fill:#000000;-inkscape-font-specification:Sans Bold" y="78.053253" x="58.71452" id="tspan3854" sodipodi:role="line">{0}</tspan>
320- </text>
321- <text sodipodi:linespacing="125%" id="text3070" y="76.097481" x="60.261475" style="font-size:12px;font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;text-align:start;line-height:125%;writing-mode:lr-tb;text-anchor:start;fill:#ff0000;fill-opacity:1;fill-rule:nonzero;stroke:none;font-family:Sans;-inkscape-font-specification:Sans Bold" xml:space="preserve">
322- <tspan style="font-size:14px;fill:#ffffff" y="76.097481" x="60.261475" id="tspan3072" sodipodi:role="line">{0}</tspan>
323- </text>
324+ if self.size == self.size_small:
325+ return self.draw_small()
326+ elif self.size == self.size_medium:
327+ return self.draw_medium()
328+ else:
329+ return self.draw_large()
330+
331+ def draw_small(self):
332+ emblem_string = """<?xml version="1.0" encoding="UTF-8" standalone="no"?>
333+<!-- Created with Inkscape (http://www.inkscape.org/) -->
334+
335+<svg
336+ xmlns:dc="http://purl.org/dc/elements/1.1/"
337+ xmlns:cc="http://creativecommons.org/ns#"
338+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
339+ xmlns:svg="http://www.w3.org/2000/svg"
340+ xmlns="http://www.w3.org/2000/svg"
341+ xmlns:xlink="http://www.w3.org/1999/xlink"
342+ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
343+ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
344+ width="120"
345+ height="120"
346+ id="svg2"
347+ version="1.1"
348+ inkscape:version="0.48.2 r9819"
349+ sodipodi:docname="emblem_large.svg">
350+ <defs
351+ id="defs4">
352+ <linearGradient
353+ x1="68"
354+ y1="52"
355+ x2="68"
356+ y2="84"
357+ id="linearGradient3948"
358+ xlink:href="#linearGradient3942"
359+ gradientUnits="userSpaceOnUse" />
360+ <linearGradient
361+ id="linearGradient3942">
362+ <stop
363+ id="stop3944"
364+ style="stop-color:#ffffff;stop-opacity:1"
365+ offset="0" />
366+ <stop
367+ id="stop3946"
368+ style="stop-color:#ffffff;stop-opacity:0"
369+ offset="1" />
370+ </linearGradient>
371+ </defs>
372+ <sodipodi:namedview
373+ id="base"
374+ pagecolor="#ffffff"
375+ bordercolor="#666666"
376+ borderopacity="1.0"
377+ inkscape:pageopacity="0.0"
378+ inkscape:pageshadow="2"
379+ inkscape:zoom="2.8"
380+ inkscape:cx="53.032794"
381+ inkscape:cy="53.985929"
382+ inkscape:document-units="px"
383+ inkscape:current-layer="layer1"
384+ showgrid="false"
385+ fit-margin-top="0"
386+ fit-margin-left="0"
387+ fit-margin-right="0"
388+ fit-margin-bottom="0"
389+ inkscape:window-width="1280"
390+ inkscape:window-height="775"
391+ inkscape:window-x="0"
392+ inkscape:window-y="1"
393+ inkscape:window-maximized="1" />
394+ <metadata
395+ id="metadata7">
396+ <rdf:RDF>
397+ <cc:Work
398+ rdf:about="">
399+ <dc:format>image/svg+xml</dc:format>
400+ <dc:type
401+ rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
402+ <dc:title></dc:title>
403+ </cc:Work>
404+ </rdf:RDF>
405+ </metadata>
406+ <g
407+ inkscape:label="Camada 1"
408+ inkscape:groupmode="layer"
409+ id="layer1"
410+ transform="translate(-294.28571,-203.79074)">
411+ <image
412+ y="203.79074"
413+ x="294.28571"
414+ id="image3066"
415+ xlink:href="./icon"
416+ height="120"
417+ width="120" />
418+ <g
419+ id="g3234"
420+ transform="matrix(1.0149338,0,0,1.1054171,321.04511,150.44756)">
421+ <path
422+ style="opacity:0.1;color:#000000;fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:2;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
423+ id="path3960"
424+ inkscape:connector-curvature="0"
425+ d="m 89.986349,69.238985 c -0.21488,-1.561093 -1.973583,-1.971086 -3.08095,-2.785965 0.452305,-1.002477 1.307299,-1.880744 1.442147,-2.982622 0.09844,-1.212445 -1.013508,-2.114893 -2.161243,-2.135756 -0.574938,-0.191984 -1.529962,-0.121132 -1.883184,-0.466436 0.105461,-1.303923 0.927598,-2.804937 -0.05258,-3.95302 -0.907896,-1.060888 -2.339545,-0.509432 -3.503632,-0.325674 -0.950635,0.504422 -0.81239,-0.565783 -0.973216,-1.2035 -0.130627,-1.071533 -0.401383,-2.422333 -1.652276,-2.666162 -1.269606,-0.351715 -2.257329,0.785416 -3.345553,1.248885 -0.564682,0.197811 -0.761585,-1.032508 -1.178359,-1.409042 -0.426005,-1.011804 -1.521655,-1.848863 -2.654045,-1.413094 -1.095119,0.436651 -1.63445,1.627605 -2.458205,2.425428 -0.973647,-0.65486 -1.72467,-1.7847 -2.91707,-1.99934 -1.243767,-0.181639 -2.134633,0.905175 -2.372989,2.019516 -0.345055,0.444832 -0.243497,1.842522 -1.003052,1.403006 -1.213096,-0.355405 -2.631658,-1.302577 -3.801916,-0.341572 -1.164288,0.944179 -0.641361,2.603822 -0.785903,3.912444 -1.186176,0.269467 -2.880347,-0.340038 -3.868298,0.741757 -1.026659,1.143887 -0.143349,2.597452 0.237559,3.813095 0.487992,0.76899 -0.891072,0.672735 -1.319748,1.016916 -1.098052,0.268634 -2.195073,1.121664 -2.064313,2.380723 0.249354,1.192288 1.335753,1.97237 1.99934,2.949845 -0.871859,0.915157 -2.269562,1.493314 -2.556533,2.818742 -0.186067,1.142981 0.709312,1.986005 1.663193,2.403037 0.374257,0.418594 1.762649,0.565214 1.196802,1.235928 -0.585967,1.153839 -1.765734,2.450576 -0.926208,3.768425 0.810341,1.207354 2.476744,0.956157 3.736472,1.311043 -0.08576,1.227497 -0.781478,2.521328 -0.229433,3.703695 0.526899,1.071756 1.844115,1.213477 2.87647,0.879241 0.560732,0.07218 1.729076,-0.722239 1.724808,0.155757 0.28962,1.207178 0.140911,2.908592 1.527846,3.422546 1.38487,0.596205 2.576146,-0.697698 3.773565,-1.225564 0.454783,0.276534 0.742145,1.177337 1.132089,1.695641 0.455828,1.285443 2.259105,1.820804 3.255585,0.80819 0.610876,-0.645848 1.17573,-1.360459 1.769908,-2.032116 1.070537,0.696774 1.92142,2.036743 3.310382,1.999339 1.284689,-0.0939 1.81764,-1.335721 2.151522,-2.404812 0.206115,-0.763429 0.45194,-1.441171 1.291319,-0.838121 1.079697,0.400421 2.40691,1.016712 3.407356,0.09643 1.036768,-1.007403 0.54752,-2.574581 0.688297,-3.867575 1.24572,-0.135375 2.670869,0.29881 3.736472,-0.524417 0.936001,-0.804307 0.694064,-2.129136 0.219537,-3.122161 -0.129526,-0.619425 -0.912001,-1.544893 0.15361,-1.604149 1.111548,-0.448238 2.718145,-0.69704 2.904459,-2.123887 0.293747,-1.438242 -1.158981,-2.317711 -1.863365,-3.381883 -0.0012,-0.497479 0.978512,-0.910082 1.354831,-1.374896 0.68176,-0.486375 1.154931,-1.160958 1.098503,-2.027866 z" />
426+ <path
427+ inkscape:connector-curvature="0"
428+ style="opacity:0.15;color:#000000;fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:2;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
429+ id="path3956"
430+ transform="matrix(0,1.048834,-1.048834,0,146.16452,5.4895435)"
431+ d="m 60.9375,54.59375 a 0.86264402,0.86264402 0 0 0 -0.71875,0.4375 L 58.5,57.875 55.625,56.25 a 0.86264402,0.86264402 0 0 0 -1.28125,0.59375 l -0.625,3.3125 -3.28125,-0.5625 a 0.86264402,0.86264402 0 0 0 -1,1 L 50,63.875 46.6875,64.5 a 0.86264402,0.86264402 0 0 0 -0.59375,1.28125 l 1.625,2.875 L 44.875,70.375 A 0.86264402,0.86264402 0 0 0 44.75,71.78125 L 47.25,73.9375 45.15625,76.5 A 0.86264402,0.86264402 0 0 0 45.5,77.875 l 3.15625,1.1875 -1.125,3.15625 a 0.86264402,0.86264402 0 0 0 0.8125,1.15625 l 3.3125,0.03125 0.0625,3.3125 a 0.86264402,0.86264402 0 0 0 1.15625,0.8125 L 56,86.4375 l 1.1875,3.125 a 0.86264402,0.86264402 0 0 0 1.34375,0.34375 l 2.59375,-2.125 2.1875,2.5625 a 0.86264402,0.86264402 0 0 0 1.40625,-0.125 l 1.6875,-2.875 2.9375,1.625 a 0.86264402,0.86264402 0 0 0 1.25,-0.59375 l 0.59375,-3.28125 3.3125,0.5625 a 0.86264402,0.86264402 0 0 0 1,-1 L 74.9375,81.34375 78.21875,80.75 A 0.86264402,0.86264402 0 0 0 78.8125,79.5 l -1.625,-2.9375 2.875,-1.6875 a 0.86264402,0.86264402 0 0 0 0.125,-1.40625 L 77.625,71.28125 79.75,68.6875 a 0.86264402,0.86264402 0 0 0 -0.34375,-1.34375 l -3.125,-1.1875 1.09375,-3.125 A 0.86264402,0.86264402 0 0 0 76.5625,61.875 L 73.25,61.8125 73.21875,58.5 A 0.86264402,0.86264402 0 0 0 72.0625,57.6875 l -3.15625,1.125 -1.1875,-3.15625 a 0.86264402,0.86264402 0 0 0 -1.375,-0.34375 l -2.5625,2.09375 -2.15625,-2.5 a 0.86264402,0.86264402 0 0 0 -0.6875,-0.3125 z" />
432+ <path
433+ inkscape:connector-curvature="0"
434+ style="opacity:0.3;color:#000000;fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:2;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
435+ id="path3950"
436+ transform="matrix(0,1.048834,-1.048834,0,146.16452,5.4895435)"
437+ d="m 74.641931,84.79994 -4.128425,-0.680449 -0.772592,4.112178 -3.646724,-2.051417 -2.132447,3.599941 -2.725174,-3.174954 -3.235096,2.653498 -1.474928,-3.915545 -3.947546,1.387004 -0.04678,-4.183864 -4.183864,-0.04678 1.387005,-3.947547 -3.915546,-1.474927 2.653499,-3.235097 -3.174955,-2.725173 3.599941,-2.132447 -2.051417,-3.646724 4.112178,-0.772592 -0.680448,-4.128426 4.128425,0.680449 0.772592,-4.112178 3.646724,2.051417 2.132447,-3.599941 2.725173,3.174954 3.235097,-2.653498 1.474927,3.915545 3.947547,-1.387004 0.04678,4.183864 4.183863,0.04678 -1.387004,3.947547 3.915545,1.474927 -2.653498,3.235097 3.174955,2.725173 -3.599942,2.132447 2.051418,3.646724 -4.112178,0.772592 z" />
438+ <path
439+ transform="matrix(0,1.048834,-1.048834,0,146.16452,4.4895435)"
440+ inkscape:connector-curvature="0"
441+ style="color:#000000;fill:#ff0000;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:2;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
442+ id="path3139"
443+ d="m 74.641931,84.79994 -4.128425,-0.680449 -0.772592,4.112178 -3.646724,-2.051417 -2.132447,3.599941 -2.725174,-3.174954 -3.235096,2.653498 -1.474928,-3.915545 -3.947546,1.387004 -0.04678,-4.183864 -4.183864,-0.04678 1.387005,-3.947547 -3.915546,-1.474927 2.653499,-3.235097 -3.174955,-2.725173 3.599941,-2.132447 -2.051417,-3.646724 4.112178,-0.772592 -0.680448,-4.128426 4.128425,0.680449 0.772592,-4.112178 3.646724,2.051417 2.132447,-3.599941 2.725173,3.174954 3.235097,-2.653498 1.474927,3.915545 3.947547,-1.387004 0.04678,4.183864 4.183863,0.04678 -1.387004,3.947547 3.915545,1.474927 -2.653498,3.235097 3.174955,2.725173 -3.599942,2.132447 2.051418,3.646724 -4.112178,0.772592 z" />
444+ <text
445+ xml:space="preserve"
446+ style="font-size:16px;font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;text-align:start;line-height:125%;letter-spacing:-1.32000005px;writing-mode:lr-tb;text-anchor:start;opacity:0.15;fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none;font-family:Sans;-inkscape-font-specification:Sans Bold"
447+ x="59.530632"
448+ y="77.325226"
449+ id="text3856"
450+ sodipodi:linespacing="125%"
451+ transform="scale(0.9999961,1.0000039)"> <tspan
452+ sodipodi:role="line"
453+ id="tspan3858"
454+ x="59.530632"
455+ y="77.325226"
456+ style="font-size:16px;font-weight:bold;letter-spacing:-1.32000005px;fill:#000000;-inkscape-font-specification:Sans Bold">{0}</tspan> </text>
457+ <path
458+ style="opacity:0;fill:#000000;stroke:none;display:inline"
459+ id="path3919"
460+ inkscape:connector-curvature="0"
461+ d="m 60,72 4,-4 4,4 8,-8 4,4 -12,12 -8,-8 z" />
462+ <path
463+ style="opacity:0.6;color:#000000;fill:url(#linearGradient3948);fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:2;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
464+ id="path3933"
465+ inkscape:connector-curvature="0"
466+ d="M 71.5625,52 68.71875,55.34375 65.3125,52.5625 63.78125,56.65625 59.625,55.1875 l 0,1 4.15625,1.46875 1.53125,-4.09375 3.40625,2.78125 L 71.5625,53 73.8125,56.78125 77.625,54.625 78.4375,58.9375 82.625,58.25 82.78125,57.21875 78.4375,57.9375 77.625,53.625 73.8125,55.78125 71.5625,52 z m -11.96875,7.59375 -4.40625,0.03125 0.34375,1 4.0625,-0.03125 0,-1 z m 22.625,2 -0.15625,0.96875 3.8125,0.71875 0.5,-0.90625 -4.15625,-0.78125 z m -25.875,2.3125 -3.78125,1.40625 0.625,0.78125 3.46875,-1.3125 -0.3125,-0.875 z m 28.3125,2.53125 -0.4375,0.75 3.09375,1.84375 L 88,68.4375 l -3.34375,-2 z M 54.875,69.125 52,71.5625 l 0.6875,0.40625 2.65625,-2.25 L 54.875,69.125 z m 30.25,2.75 -0.46875,0.40625 2.15625,2.625 0.625,-0.21875 -2.3125,-2.8125 z m -29.78125,2.6875 -1.71875,3.0625 0.5,0.09375 1.65625,-2.90625 -0.4375,-0.25 z m 28.3125,2.53125 -0.3125,0.125 1.125,3.15625 0.34375,0 -1.15625,-3.28125 z m -25.875,2.3125 -0.5625,3.375 L 57.375,82.75 57.9375,79.4375 57.78125,79.40625 z" />
467+ <text
468+ xml:space="preserve"
469+ style="font-size:12px;font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;text-align:start;line-height:125%;writing-mode:lr-tb;text-anchor:start;opacity:0.3;fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none;font-family:Sans;-inkscape-font-specification:Sans Bold"
470+ x="60.261475"
471+ y="76.597481"
472+ id="text3074"
473+ sodipodi:linespacing="125%"> <tspan
474+ sodipodi:role="line"
475+ id="tspan3076"
476+ x="60.261475"
477+ y="76.597481"
478+ style="font-size:14px;fill:#000000">{0}</tspan> </text>
479+ <text
480+ transform="scale(0.9999961,1.0000039)"
481+ sodipodi:linespacing="125%"
482+ id="text3852"
483+ y="78.053253"
484+ x="58.71452"
485+ style="font-size:18px;font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;text-align:start;line-height:125%;letter-spacing:-1.32000005px;writing-mode:lr-tb;text-anchor:start;opacity:0.05;fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none;font-family:Sans;-inkscape-font-specification:Sans Bold"
486+ xml:space="preserve"> <tspan
487+ style="font-size:18px;font-weight:bold;letter-spacing:-2.47000003px;fill:#000000;-inkscape-font-specification:Sans Bold"
488+ y="78.053253"
489+ x="58.71452"
490+ id="tspan3854"
491+ sodipodi:role="line">{0}</tspan> </text>
492+ <text
493+ sodipodi:linespacing="125%"
494+ id="text3070"
495+ y="76.097481"
496+ x="60.261475"
497+ style="font-size:12px;font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;text-align:start;line-height:125%;writing-mode:lr-tb;text-anchor:start;fill:#ff0000;fill-opacity:1;fill-rule:nonzero;stroke:none;font-family:Sans;-inkscape-font-specification:Sans Bold"
498+ xml:space="preserve"> <tspan
499+ style="font-size:14px;fill:#ffffff"
500+ y="76.097481"
501+ x="60.261475"
502+ id="tspan3072"
503+ sodipodi:role="line">{0}</tspan> </text>
504+ </g>
505+ </g>
506+</svg>"""
507+ formated_counter = str('%02d' % self.counter)
508+ return emblem_string.format(formated_counter) # replaces the '{0}' on the triple-quoted http://stackoverflow.com/questions/3877623/in-python-can-you-have-variables-within-triple-quotes-if-so-how
509+
510+ def draw_medium(self):
511+ emblem_string = """<?xml version="1.0" encoding="UTF-8" standalone="no"?>
512+<!-- Created with Inkscape (http://www.inkscape.org/) -->
513+
514+<svg
515+ xmlns:dc="http://purl.org/dc/elements/1.1/"
516+ xmlns:cc="http://creativecommons.org/ns#"
517+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
518+ xmlns:svg="http://www.w3.org/2000/svg"
519+ xmlns="http://www.w3.org/2000/svg"
520+ xmlns:xlink="http://www.w3.org/1999/xlink"
521+ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
522+ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
523+ width="120"
524+ height="120"
525+ id="svg2"
526+ version="1.1"
527+ inkscape:version="0.48.2 r9819"
528+ sodipodi:docname="emblem_medium.svg">
529+ <defs
530+ id="defs4">
531+ <linearGradient
532+ x1="68"
533+ y1="52"
534+ x2="68"
535+ y2="84"
536+ id="linearGradient3948"
537+ xlink:href="#linearGradient3942"
538+ gradientUnits="userSpaceOnUse" />
539+ <linearGradient
540+ id="linearGradient3942">
541+ <stop
542+ id="stop3944"
543+ style="stop-color:#ffffff;stop-opacity:1"
544+ offset="0" />
545+ <stop
546+ id="stop3946"
547+ style="stop-color:#ffffff;stop-opacity:0"
548+ offset="1" />
549+ </linearGradient>
550+ </defs>
551+ <sodipodi:namedview
552+ id="base"
553+ pagecolor="#ffffff"
554+ bordercolor="#666666"
555+ borderopacity="1.0"
556+ inkscape:pageopacity="0.0"
557+ inkscape:pageshadow="2"
558+ inkscape:zoom="2.8"
559+ inkscape:cx="53.032796"
560+ inkscape:cy="53.985929"
561+ inkscape:document-units="px"
562+ inkscape:current-layer="layer1"
563+ showgrid="false"
564+ fit-margin-top="0"
565+ fit-margin-left="0"
566+ fit-margin-right="0"
567+ fit-margin-bottom="0"
568+ inkscape:window-width="1280"
569+ inkscape:window-height="775"
570+ inkscape:window-x="0"
571+ inkscape:window-y="1"
572+ inkscape:window-maximized="1" />
573+ <metadata
574+ id="metadata7">
575+ <rdf:RDF>
576+ <cc:Work
577+ rdf:about="">
578+ <dc:format>image/svg+xml</dc:format>
579+ <dc:type
580+ rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
581+ <dc:title />
582+ </cc:Work>
583+ </rdf:RDF>
584+ </metadata>
585+ <g
586+ inkscape:label="Camada 1"
587+ inkscape:groupmode="layer"
588+ id="layer1"
589+ transform="translate(-294.28571,-203.79074)">
590+ <image
591+ y="203.79074"
592+ x="294.28571"
593+ id="image3066"
594+ xlink:href="./icon"
595+ height="120"
596+ width="120" />
597+ <g
598+ id="g3234"
599+ transform="matrix(1.7761342,0,0,1.93448,249.82895,111.58303)">
600+ <path
601+ style="opacity:0.1;color:#000000;fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:2;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
602+ id="path3960"
603+ inkscape:connector-curvature="0"
604+ d="m 89.986349,69.238985 c -0.21488,-1.561093 -1.973583,-1.971086 -3.08095,-2.785965 0.452305,-1.002477 1.307299,-1.880744 1.442147,-2.982622 0.09844,-1.212445 -1.013508,-2.114893 -2.161243,-2.135756 -0.574938,-0.191984 -1.529962,-0.121132 -1.883184,-0.466436 0.105461,-1.303923 0.927598,-2.804937 -0.05258,-3.95302 -0.907896,-1.060888 -2.339545,-0.509432 -3.503632,-0.325674 -0.950635,0.504422 -0.81239,-0.565783 -0.973216,-1.2035 -0.130627,-1.071533 -0.401383,-2.422333 -1.652276,-2.666162 -1.269606,-0.351715 -2.257329,0.785416 -3.345553,1.248885 -0.564682,0.197811 -0.761585,-1.032508 -1.178359,-1.409042 -0.426005,-1.011804 -1.521655,-1.848863 -2.654045,-1.413094 -1.095119,0.436651 -1.63445,1.627605 -2.458205,2.425428 -0.973647,-0.65486 -1.72467,-1.7847 -2.91707,-1.99934 -1.243767,-0.181639 -2.134633,0.905175 -2.372989,2.019516 -0.345055,0.444832 -0.243497,1.842522 -1.003052,1.403006 -1.213096,-0.355405 -2.631658,-1.302577 -3.801916,-0.341572 -1.164288,0.944179 -0.641361,2.603822 -0.785903,3.912444 -1.186176,0.269467 -2.880347,-0.340038 -3.868298,0.741757 -1.026659,1.143887 -0.143349,2.597452 0.237559,3.813095 0.487992,0.76899 -0.891072,0.672735 -1.319748,1.016916 -1.098052,0.268634 -2.195073,1.121664 -2.064313,2.380723 0.249354,1.192288 1.335753,1.97237 1.99934,2.949845 -0.871859,0.915157 -2.269562,1.493314 -2.556533,2.818742 -0.186067,1.142981 0.709312,1.986005 1.663193,2.403037 0.374257,0.418594 1.762649,0.565214 1.196802,1.235928 -0.585967,1.153839 -1.765734,2.450576 -0.926208,3.768425 0.810341,1.207354 2.476744,0.956157 3.736472,1.311043 -0.08576,1.227497 -0.781478,2.521328 -0.229433,3.703695 0.526899,1.071756 1.844115,1.213477 2.87647,0.879241 0.560732,0.07218 1.729076,-0.722239 1.724808,0.155757 0.28962,1.207178 0.140911,2.908592 1.527846,3.422546 1.38487,0.596205 2.576146,-0.697698 3.773565,-1.225564 0.454783,0.276534 0.742145,1.177337 1.132089,1.695641 0.455828,1.285443 2.259105,1.820804 3.255585,0.80819 0.610876,-0.645848 1.17573,-1.360459 1.769908,-2.032116 1.070537,0.696774 1.92142,2.036743 3.310382,1.999339 1.284689,-0.0939 1.81764,-1.335721 2.151522,-2.404812 0.206115,-0.763429 0.45194,-1.441171 1.291319,-0.838121 1.079697,0.400421 2.40691,1.016712 3.407356,0.09643 1.036768,-1.007403 0.54752,-2.574581 0.688297,-3.867575 1.24572,-0.135375 2.670869,0.29881 3.736472,-0.524417 0.936001,-0.804307 0.694064,-2.129136 0.219537,-3.122161 -0.129526,-0.619425 -0.912001,-1.544893 0.15361,-1.604149 1.111548,-0.448238 2.718145,-0.69704 2.904459,-2.123887 0.293747,-1.438242 -1.158981,-2.317711 -1.863365,-3.381883 -0.0012,-0.497479 0.978512,-0.910082 1.354831,-1.374896 0.68176,-0.486375 1.154931,-1.160958 1.098503,-2.027866 z" />
605+ <path
606+ inkscape:connector-curvature="0"
607+ style="opacity:0.15;color:#000000;fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:2;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
608+ id="path3956"
609+ transform="matrix(0,1.048834,-1.048834,0,146.16452,5.4895435)"
610+ d="m 60.9375,54.59375 a 0.86264402,0.86264402 0 0 0 -0.71875,0.4375 L 58.5,57.875 55.625,56.25 a 0.86264402,0.86264402 0 0 0 -1.28125,0.59375 l -0.625,3.3125 -3.28125,-0.5625 a 0.86264402,0.86264402 0 0 0 -1,1 L 50,63.875 46.6875,64.5 a 0.86264402,0.86264402 0 0 0 -0.59375,1.28125 l 1.625,2.875 L 44.875,70.375 A 0.86264402,0.86264402 0 0 0 44.75,71.78125 L 47.25,73.9375 45.15625,76.5 A 0.86264402,0.86264402 0 0 0 45.5,77.875 l 3.15625,1.1875 -1.125,3.15625 a 0.86264402,0.86264402 0 0 0 0.8125,1.15625 l 3.3125,0.03125 0.0625,3.3125 a 0.86264402,0.86264402 0 0 0 1.15625,0.8125 L 56,86.4375 l 1.1875,3.125 a 0.86264402,0.86264402 0 0 0 1.34375,0.34375 l 2.59375,-2.125 2.1875,2.5625 a 0.86264402,0.86264402 0 0 0 1.40625,-0.125 l 1.6875,-2.875 2.9375,1.625 a 0.86264402,0.86264402 0 0 0 1.25,-0.59375 l 0.59375,-3.28125 3.3125,0.5625 a 0.86264402,0.86264402 0 0 0 1,-1 L 74.9375,81.34375 78.21875,80.75 A 0.86264402,0.86264402 0 0 0 78.8125,79.5 l -1.625,-2.9375 2.875,-1.6875 a 0.86264402,0.86264402 0 0 0 0.125,-1.40625 L 77.625,71.28125 79.75,68.6875 a 0.86264402,0.86264402 0 0 0 -0.34375,-1.34375 l -3.125,-1.1875 1.09375,-3.125 A 0.86264402,0.86264402 0 0 0 76.5625,61.875 L 73.25,61.8125 73.21875,58.5 A 0.86264402,0.86264402 0 0 0 72.0625,57.6875 l -3.15625,1.125 -1.1875,-3.15625 a 0.86264402,0.86264402 0 0 0 -1.375,-0.34375 l -2.5625,2.09375 -2.15625,-2.5 a 0.86264402,0.86264402 0 0 0 -0.6875,-0.3125 z" />
611+ <path
612+ inkscape:connector-curvature="0"
613+ style="opacity:0.3;color:#000000;fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:2;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
614+ id="path3950"
615+ transform="matrix(0,1.048834,-1.048834,0,146.16452,5.4895435)"
616+ d="m 74.641931,84.79994 -4.128425,-0.680449 -0.772592,4.112178 -3.646724,-2.051417 -2.132447,3.599941 -2.725174,-3.174954 -3.235096,2.653498 -1.474928,-3.915545 -3.947546,1.387004 -0.04678,-4.183864 -4.183864,-0.04678 1.387005,-3.947547 -3.915546,-1.474927 2.653499,-3.235097 -3.174955,-2.725173 3.599941,-2.132447 -2.051417,-3.646724 4.112178,-0.772592 -0.680448,-4.128426 4.128425,0.680449 0.772592,-4.112178 3.646724,2.051417 2.132447,-3.599941 2.725173,3.174954 3.235097,-2.653498 1.474927,3.915545 3.947547,-1.387004 0.04678,4.183864 4.183863,0.04678 -1.387004,3.947547 3.915545,1.474927 -2.653498,3.235097 3.174955,2.725173 -3.599942,2.132447 2.051418,3.646724 -4.112178,0.772592 z" />
617+ <path
618+ transform="matrix(0,1.048834,-1.048834,0,146.16452,4.4895435)"
619+ inkscape:connector-curvature="0"
620+ style="color:#000000;fill:#ff0000;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:2;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
621+ id="path3139"
622+ d="m 74.641931,84.79994 -4.128425,-0.680449 -0.772592,4.112178 -3.646724,-2.051417 -2.132447,3.599941 -2.725174,-3.174954 -3.235096,2.653498 -1.474928,-3.915545 -3.947546,1.387004 -0.04678,-4.183864 -4.183864,-0.04678 1.387005,-3.947547 -3.915546,-1.474927 2.653499,-3.235097 -3.174955,-2.725173 3.599941,-2.132447 -2.051417,-3.646724 4.112178,-0.772592 -0.680448,-4.128426 4.128425,0.680449 0.772592,-4.112178 3.646724,2.051417 2.132447,-3.599941 2.725173,3.174954 3.235097,-2.653498 1.474927,3.915545 3.947547,-1.387004 0.04678,4.183864 4.183863,0.04678 -1.387004,3.947547 3.915545,1.474927 -2.653498,3.235097 3.174955,2.725173 -3.599942,2.132447 2.051418,3.646724 -4.112178,0.772592 z" />
623+ <text
624+ xml:space="preserve"
625+ style="font-size:16px;font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;text-align:start;line-height:125%;letter-spacing:-1.32000005px;writing-mode:lr-tb;text-anchor:start;opacity:0.15;fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none;font-family:Sans;-inkscape-font-specification:Sans Bold"
626+ x="59.530632"
627+ y="77.325226"
628+ id="text3856"
629+ sodipodi:linespacing="125%"
630+ transform="scale(0.9999961,1.0000039)"> <tspan
631+ sodipodi:role="line"
632+ id="tspan3858"
633+ x="59.530632"
634+ y="77.325226"
635+ style="font-size:16px;font-weight:bold;letter-spacing:-1.32000005px;fill:#000000;-inkscape-font-specification:Sans Bold">{0}</tspan> </text>
636+ <path
637+ style="opacity:0;fill:#000000;stroke:none;display:inline"
638+ id="path3919"
639+ inkscape:connector-curvature="0"
640+ d="m 60,72 4,-4 4,4 8,-8 4,4 -12,12 -8,-8 z" />
641+ <path
642+ style="opacity:0.6;color:#000000;fill:url(#linearGradient3948);fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:2;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
643+ id="path3933"
644+ inkscape:connector-curvature="0"
645+ d="M 71.5625,52 68.71875,55.34375 65.3125,52.5625 63.78125,56.65625 59.625,55.1875 l 0,1 4.15625,1.46875 1.53125,-4.09375 3.40625,2.78125 L 71.5625,53 73.8125,56.78125 77.625,54.625 78.4375,58.9375 82.625,58.25 82.78125,57.21875 78.4375,57.9375 77.625,53.625 73.8125,55.78125 71.5625,52 z m -11.96875,7.59375 -4.40625,0.03125 0.34375,1 4.0625,-0.03125 0,-1 z m 22.625,2 -0.15625,0.96875 3.8125,0.71875 0.5,-0.90625 -4.15625,-0.78125 z m -25.875,2.3125 -3.78125,1.40625 0.625,0.78125 3.46875,-1.3125 -0.3125,-0.875 z m 28.3125,2.53125 -0.4375,0.75 3.09375,1.84375 L 88,68.4375 l -3.34375,-2 z M 54.875,69.125 52,71.5625 l 0.6875,0.40625 2.65625,-2.25 L 54.875,69.125 z m 30.25,2.75 -0.46875,0.40625 2.15625,2.625 0.625,-0.21875 -2.3125,-2.8125 z m -29.78125,2.6875 -1.71875,3.0625 0.5,0.09375 1.65625,-2.90625 -0.4375,-0.25 z m 28.3125,2.53125 -0.3125,0.125 1.125,3.15625 0.34375,0 -1.15625,-3.28125 z m -25.875,2.3125 -0.5625,3.375 L 57.375,82.75 57.9375,79.4375 57.78125,79.40625 z" />
646+ <text
647+ xml:space="preserve"
648+ style="font-size:12px;font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;text-align:start;line-height:125%;writing-mode:lr-tb;text-anchor:start;opacity:0.3;fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none;font-family:Sans;-inkscape-font-specification:Sans Bold"
649+ x="60.261475"
650+ y="76.597481"
651+ id="text3074"
652+ sodipodi:linespacing="125%"> <tspan
653+ sodipodi:role="line"
654+ id="tspan3076"
655+ x="60.261475"
656+ y="76.597481"
657+ style="font-size:14px;fill:#000000">{0}</tspan> </text>
658+ <text
659+ transform="scale(0.9999961,1.0000039)"
660+ sodipodi:linespacing="125%"
661+ id="text3852"
662+ y="78.053253"
663+ x="58.71452"
664+ style="font-size:18px;font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;text-align:start;line-height:125%;letter-spacing:-1.32000005px;writing-mode:lr-tb;text-anchor:start;opacity:0.05;fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none;font-family:Sans;-inkscape-font-specification:Sans Bold"
665+ xml:space="preserve"> <tspan
666+ style="font-size:18px;font-weight:bold;letter-spacing:-2.47000003px;fill:#000000;-inkscape-font-specification:Sans Bold"
667+ y="78.053253"
668+ x="58.71452"
669+ id="tspan3854"
670+ sodipodi:role="line">{0}</tspan> </text>
671+ <text
672+ sodipodi:linespacing="125%"
673+ id="text3070"
674+ y="76.097481"
675+ x="60.261475"
676+ style="font-size:12px;font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;text-align:start;line-height:125%;writing-mode:lr-tb;text-anchor:start;fill:#ff0000;fill-opacity:1;fill-rule:nonzero;stroke:none;font-family:Sans;-inkscape-font-specification:Sans Bold"
677+ xml:space="preserve"> <tspan
678+ style="font-size:14px;fill:#ffffff"
679+ y="76.097481"
680+ x="60.261475"
681+ id="tspan3072"
682+ sodipodi:role="line">{0}</tspan> </text>
683+ </g>
684+ </g>
685+</svg>"""
686+ formated_counter = str('%02d' % self.counter)
687+ return emblem_string.format(formated_counter) # replaces the '{0}' on the triple-quoted http://stackoverflow.com/questions/3877623/in-python-can-you-have-variables-within-triple-quotes-if-so-how
688+
689+ def draw_large(self):
690+ emblem_string = """<?xml version="1.0" encoding="UTF-8" standalone="no"?>
691+<!-- Created with Inkscape (http://www.inkscape.org/) -->
692+
693+<svg
694+ xmlns:dc="http://purl.org/dc/elements/1.1/"
695+ xmlns:cc="http://creativecommons.org/ns#"
696+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
697+ xmlns:svg="http://www.w3.org/2000/svg"
698+ xmlns="http://www.w3.org/2000/svg"
699+ xmlns:xlink="http://www.w3.org/1999/xlink"
700+ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
701+ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
702+ width="120"
703+ height="120"
704+ id="svg2"
705+ version="1.1"
706+ inkscape:version="0.48.2 r9819">
707+ <defs
708+ id="defs4">
709+ <linearGradient
710+ x1="68"
711+ y1="52"
712+ x2="68"
713+ y2="84"
714+ id="linearGradient3948"
715+ xlink:href="#linearGradient3942"
716+ gradientUnits="userSpaceOnUse" />
717+ <linearGradient
718+ id="linearGradient3942">
719+ <stop
720+ id="stop3944"
721+ style="stop-color:#ffffff;stop-opacity:1"
722+ offset="0" />
723+ <stop
724+ id="stop3946"
725+ style="stop-color:#ffffff;stop-opacity:0"
726+ offset="1" />
727+ </linearGradient>
728+ </defs>
729+ <sodipodi:namedview
730+ id="base"
731+ pagecolor="#ffffff"
732+ bordercolor="#666666"
733+ borderopacity="1.0"
734+ inkscape:pageopacity="0.0"
735+ inkscape:pageshadow="2"
736+ inkscape:zoom="2.8"
737+ inkscape:cx="113.74708"
738+ inkscape:cy="53.985929"
739+ inkscape:document-units="px"
740+ inkscape:current-layer="layer1"
741+ showgrid="false"
742+ fit-margin-top="0"
743+ fit-margin-left="0"
744+ fit-margin-right="0"
745+ fit-margin-bottom="0"
746+ inkscape:window-width="1280"
747+ inkscape:window-height="775"
748+ inkscape:window-x="0"
749+ inkscape:window-y="1"
750+ inkscape:window-maximized="1" />
751+ <metadata
752+ id="metadata7">
753+ <rdf:RDF>
754+ <cc:Work
755+ rdf:about="">
756+ <dc:format>image/svg+xml</dc:format>
757+ <dc:type
758+ rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
759+ <dc:title></dc:title>
760+ </cc:Work>
761+ </rdf:RDF>
762+ </metadata>
763+ <g
764+ inkscape:label="Camada 1"
765+ inkscape:groupmode="layer"
766+ id="layer1"
767+ transform="translate(-294.28571,-203.79074)">
768+ <image
769+ y="203.79074"
770+ x="294.28571"
771+ id="image3066"
772+ xlink:href="./icon"
773+ height="120"
774+ width="120" />
775+ <g
776+ id="g3234"
777+ transform="matrix(2.5373346,0,0,2.7635428,176.61279,68.718501)">
778+ <path
779+ style="opacity:0.1;color:#000000;fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:2;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
780+ id="path3960"
781+ inkscape:connector-curvature="0"
782+ d="m 89.986349,69.238985 c -0.21488,-1.561093 -1.973583,-1.971086 -3.08095,-2.785965 0.452305,-1.002477 1.307299,-1.880744 1.442147,-2.982622 0.09844,-1.212445 -1.013508,-2.114893 -2.161243,-2.135756 -0.574938,-0.191984 -1.529962,-0.121132 -1.883184,-0.466436 0.105461,-1.303923 0.927598,-2.804937 -0.05258,-3.95302 -0.907896,-1.060888 -2.339545,-0.509432 -3.503632,-0.325674 -0.950635,0.504422 -0.81239,-0.565783 -0.973216,-1.2035 -0.130627,-1.071533 -0.401383,-2.422333 -1.652276,-2.666162 -1.269606,-0.351715 -2.257329,0.785416 -3.345553,1.248885 -0.564682,0.197811 -0.761585,-1.032508 -1.178359,-1.409042 -0.426005,-1.011804 -1.521655,-1.848863 -2.654045,-1.413094 -1.095119,0.436651 -1.63445,1.627605 -2.458205,2.425428 -0.973647,-0.65486 -1.72467,-1.7847 -2.91707,-1.99934 -1.243767,-0.181639 -2.134633,0.905175 -2.372989,2.019516 -0.345055,0.444832 -0.243497,1.842522 -1.003052,1.403006 -1.213096,-0.355405 -2.631658,-1.302577 -3.801916,-0.341572 -1.164288,0.944179 -0.641361,2.603822 -0.785903,3.912444 -1.186176,0.269467 -2.880347,-0.340038 -3.868298,0.741757 -1.026659,1.143887 -0.143349,2.597452 0.237559,3.813095 0.487992,0.76899 -0.891072,0.672735 -1.319748,1.016916 -1.098052,0.268634 -2.195073,1.121664 -2.064313,2.380723 0.249354,1.192288 1.335753,1.97237 1.99934,2.949845 -0.871859,0.915157 -2.269562,1.493314 -2.556533,2.818742 -0.186067,1.142981 0.709312,1.986005 1.663193,2.403037 0.374257,0.418594 1.762649,0.565214 1.196802,1.235928 -0.585967,1.153839 -1.765734,2.450576 -0.926208,3.768425 0.810341,1.207354 2.476744,0.956157 3.736472,1.311043 -0.08576,1.227497 -0.781478,2.521328 -0.229433,3.703695 0.526899,1.071756 1.844115,1.213477 2.87647,0.879241 0.560732,0.07218 1.729076,-0.722239 1.724808,0.155757 0.28962,1.207178 0.140911,2.908592 1.527846,3.422546 1.38487,0.596205 2.576146,-0.697698 3.773565,-1.225564 0.454783,0.276534 0.742145,1.177337 1.132089,1.695641 0.455828,1.285443 2.259105,1.820804 3.255585,0.80819 0.610876,-0.645848 1.17573,-1.360459 1.769908,-2.032116 1.070537,0.696774 1.92142,2.036743 3.310382,1.999339 1.284689,-0.0939 1.81764,-1.335721 2.151522,-2.404812 0.206115,-0.763429 0.45194,-1.441171 1.291319,-0.838121 1.079697,0.400421 2.40691,1.016712 3.407356,0.09643 1.036768,-1.007403 0.54752,-2.574581 0.688297,-3.867575 1.24572,-0.135375 2.670869,0.29881 3.736472,-0.524417 0.936001,-0.804307 0.694064,-2.129136 0.219537,-3.122161 -0.129526,-0.619425 -0.912001,-1.544893 0.15361,-1.604149 1.111548,-0.448238 2.718145,-0.69704 2.904459,-2.123887 0.293747,-1.438242 -1.158981,-2.317711 -1.863365,-3.381883 -0.0012,-0.497479 0.978512,-0.910082 1.354831,-1.374896 0.68176,-0.486375 1.154931,-1.160958 1.098503,-2.027866 z" />
783+ <path
784+ inkscape:connector-curvature="0"
785+ style="opacity:0.15;color:#000000;fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:2;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
786+ id="path3956"
787+ transform="matrix(0,1.048834,-1.048834,0,146.16452,5.4895435)"
788+ d="m 60.9375,54.59375 a 0.86264402,0.86264402 0 0 0 -0.71875,0.4375 L 58.5,57.875 55.625,56.25 a 0.86264402,0.86264402 0 0 0 -1.28125,0.59375 l -0.625,3.3125 -3.28125,-0.5625 a 0.86264402,0.86264402 0 0 0 -1,1 L 50,63.875 46.6875,64.5 a 0.86264402,0.86264402 0 0 0 -0.59375,1.28125 l 1.625,2.875 L 44.875,70.375 A 0.86264402,0.86264402 0 0 0 44.75,71.78125 L 47.25,73.9375 45.15625,76.5 A 0.86264402,0.86264402 0 0 0 45.5,77.875 l 3.15625,1.1875 -1.125,3.15625 a 0.86264402,0.86264402 0 0 0 0.8125,1.15625 l 3.3125,0.03125 0.0625,3.3125 a 0.86264402,0.86264402 0 0 0 1.15625,0.8125 L 56,86.4375 l 1.1875,3.125 a 0.86264402,0.86264402 0 0 0 1.34375,0.34375 l 2.59375,-2.125 2.1875,2.5625 a 0.86264402,0.86264402 0 0 0 1.40625,-0.125 l 1.6875,-2.875 2.9375,1.625 a 0.86264402,0.86264402 0 0 0 1.25,-0.59375 l 0.59375,-3.28125 3.3125,0.5625 a 0.86264402,0.86264402 0 0 0 1,-1 L 74.9375,81.34375 78.21875,80.75 A 0.86264402,0.86264402 0 0 0 78.8125,79.5 l -1.625,-2.9375 2.875,-1.6875 a 0.86264402,0.86264402 0 0 0 0.125,-1.40625 L 77.625,71.28125 79.75,68.6875 a 0.86264402,0.86264402 0 0 0 -0.34375,-1.34375 l -3.125,-1.1875 1.09375,-3.125 A 0.86264402,0.86264402 0 0 0 76.5625,61.875 L 73.25,61.8125 73.21875,58.5 A 0.86264402,0.86264402 0 0 0 72.0625,57.6875 l -3.15625,1.125 -1.1875,-3.15625 a 0.86264402,0.86264402 0 0 0 -1.375,-0.34375 l -2.5625,2.09375 -2.15625,-2.5 a 0.86264402,0.86264402 0 0 0 -0.6875,-0.3125 z" />
789+ <path
790+ inkscape:connector-curvature="0"
791+ style="opacity:0.3;color:#000000;fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:2;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
792+ id="path3950"
793+ transform="matrix(0,1.048834,-1.048834,0,146.16452,5.4895435)"
794+ d="m 74.641931,84.79994 -4.128425,-0.680449 -0.772592,4.112178 -3.646724,-2.051417 -2.132447,3.599941 -2.725174,-3.174954 -3.235096,2.653498 -1.474928,-3.915545 -3.947546,1.387004 -0.04678,-4.183864 -4.183864,-0.04678 1.387005,-3.947547 -3.915546,-1.474927 2.653499,-3.235097 -3.174955,-2.725173 3.599941,-2.132447 -2.051417,-3.646724 4.112178,-0.772592 -0.680448,-4.128426 4.128425,0.680449 0.772592,-4.112178 3.646724,2.051417 2.132447,-3.599941 2.725173,3.174954 3.235097,-2.653498 1.474927,3.915545 3.947547,-1.387004 0.04678,4.183864 4.183863,0.04678 -1.387004,3.947547 3.915545,1.474927 -2.653498,3.235097 3.174955,2.725173 -3.599942,2.132447 2.051418,3.646724 -4.112178,0.772592 z" />
795+ <path
796+ transform="matrix(0,1.048834,-1.048834,0,146.16452,4.4895435)"
797+ inkscape:connector-curvature="0"
798+ style="color:#000000;fill:#ff0000;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:2;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
799+ id="path3139"
800+ d="m 74.641931,84.79994 -4.128425,-0.680449 -0.772592,4.112178 -3.646724,-2.051417 -2.132447,3.599941 -2.725174,-3.174954 -3.235096,2.653498 -1.474928,-3.915545 -3.947546,1.387004 -0.04678,-4.183864 -4.183864,-0.04678 1.387005,-3.947547 -3.915546,-1.474927 2.653499,-3.235097 -3.174955,-2.725173 3.599941,-2.132447 -2.051417,-3.646724 4.112178,-0.772592 -0.680448,-4.128426 4.128425,0.680449 0.772592,-4.112178 3.646724,2.051417 2.132447,-3.599941 2.725173,3.174954 3.235097,-2.653498 1.474927,3.915545 3.947547,-1.387004 0.04678,4.183864 4.183863,0.04678 -1.387004,3.947547 3.915545,1.474927 -2.653498,3.235097 3.174955,2.725173 -3.599942,2.132447 2.051418,3.646724 -4.112178,0.772592 z" />
801+ <text
802+ xml:space="preserve"
803+ style="font-size:16px;font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;text-align:start;line-height:125%;letter-spacing:-1.32000005px;writing-mode:lr-tb;text-anchor:start;opacity:0.15;fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none;font-family:Sans;-inkscape-font-specification:Sans Bold"
804+ x="59.530632"
805+ y="77.325226"
806+ id="text3856"
807+ sodipodi:linespacing="125%"
808+ transform="scale(0.9999961,1.0000039)"> <tspan
809+ sodipodi:role="line"
810+ id="tspan3858"
811+ x="59.530632"
812+ y="77.325226"
813+ style="font-size:16px;font-weight:bold;letter-spacing:-1.32000005px;fill:#000000;-inkscape-font-specification:Sans Bold">{0}</tspan> </text>
814+ <path
815+ style="opacity:0;fill:#000000;stroke:none;display:inline"
816+ id="path3919"
817+ inkscape:connector-curvature="0"
818+ d="m 60,72 4,-4 4,4 8,-8 4,4 -12,12 -8,-8 z" />
819+ <path
820+ style="opacity:0.6;color:#000000;fill:url(#linearGradient3948);fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:2;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
821+ id="path3933"
822+ inkscape:connector-curvature="0"
823+ d="M 71.5625,52 68.71875,55.34375 65.3125,52.5625 63.78125,56.65625 59.625,55.1875 l 0,1 4.15625,1.46875 1.53125,-4.09375 3.40625,2.78125 L 71.5625,53 73.8125,56.78125 77.625,54.625 78.4375,58.9375 82.625,58.25 82.78125,57.21875 78.4375,57.9375 77.625,53.625 73.8125,55.78125 71.5625,52 z m -11.96875,7.59375 -4.40625,0.03125 0.34375,1 4.0625,-0.03125 0,-1 z m 22.625,2 -0.15625,0.96875 3.8125,0.71875 0.5,-0.90625 -4.15625,-0.78125 z m -25.875,2.3125 -3.78125,1.40625 0.625,0.78125 3.46875,-1.3125 -0.3125,-0.875 z m 28.3125,2.53125 -0.4375,0.75 3.09375,1.84375 L 88,68.4375 l -3.34375,-2 z M 54.875,69.125 52,71.5625 l 0.6875,0.40625 2.65625,-2.25 L 54.875,69.125 z m 30.25,2.75 -0.46875,0.40625 2.15625,2.625 0.625,-0.21875 -2.3125,-2.8125 z m -29.78125,2.6875 -1.71875,3.0625 0.5,0.09375 1.65625,-2.90625 -0.4375,-0.25 z m 28.3125,2.53125 -0.3125,0.125 1.125,3.15625 0.34375,0 -1.15625,-3.28125 z m -25.875,2.3125 -0.5625,3.375 L 57.375,82.75 57.9375,79.4375 57.78125,79.40625 z" />
824+ <text
825+ xml:space="preserve"
826+ style="font-size:12px;font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;text-align:start;line-height:125%;writing-mode:lr-tb;text-anchor:start;opacity:0.3;fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none;font-family:Sans;-inkscape-font-specification:Sans Bold"
827+ x="60.261475"
828+ y="76.597481"
829+ id="text3074"
830+ sodipodi:linespacing="125%"> <tspan
831+ sodipodi:role="line"
832+ id="tspan3076"
833+ x="60.261475"
834+ y="76.597481"
835+ style="font-size:14px;fill:#000000">{0}</tspan> </text>
836+ <text
837+ transform="scale(0.9999961,1.0000039)"
838+ sodipodi:linespacing="125%"
839+ id="text3852"
840+ y="78.053253"
841+ x="58.71452"
842+ style="font-size:18px;font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;text-align:start;line-height:125%;letter-spacing:-1.32000005px;writing-mode:lr-tb;text-anchor:start;opacity:0.05;fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none;font-family:Sans;-inkscape-font-specification:Sans Bold"
843+ xml:space="preserve"> <tspan
844+ style="font-size:18px;font-weight:bold;letter-spacing:-2.47000003px;fill:#000000;-inkscape-font-specification:Sans Bold"
845+ y="78.053253"
846+ x="58.71452"
847+ id="tspan3854"
848+ sodipodi:role="line">{0}</tspan> </text>
849+ <text
850+ sodipodi:linespacing="125%"
851+ id="text3070"
852+ y="76.097481"
853+ x="60.261475"
854+ style="font-size:12px;font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;text-align:start;line-height:125%;writing-mode:lr-tb;text-anchor:start;fill:#ff0000;fill-opacity:1;fill-rule:nonzero;stroke:none;font-family:Sans;-inkscape-font-specification:Sans Bold"
855+ xml:space="preserve"> <tspan
856+ style="font-size:14px;fill:#ffffff"
857+ y="76.097481"
858+ x="60.261475"
859+ id="tspan3072"
860+ sodipodi:role="line">{0}</tspan> </text>
861 </g>
862 </g>
863 </svg>"""
864
865=== modified file 'Twitter/icon'
866Binary files Twitter/icon 2011-12-17 00:14:56 +0000 and Twitter/icon 2012-03-21 00:04:19 +0000 differ

Subscribers

People subscribed via source and target branches