From: Radek Czajka Date: Tue, 19 Feb 2013 10:41:26 +0000 (+0100) Subject: slowniczek link X-Git-Url: https://git.mdrn.pl/librarian.git/commitdiff_plain/f7260ec22a6bcb39fe800ac21f335c2c903a2072 slowniczek link --- diff --git a/librarian/pyhtml.py b/librarian/pyhtml.py index 6bfbf8a..b4d8557 100644 --- a/librarian/pyhtml.py +++ b/librarian/pyhtml.py @@ -160,12 +160,15 @@ u"""%(wskazowki)s surl = element.attrib.get('src', None) if surl is None: # print '** missing src on , setting default' - surl = 'http://edukacjamedialna.edu.pl/slowniczek' + surl = 'http://edukacjamedialna.edu.pl/lekcje/slowniczek/' sxml = None if surl: sxml = etree.fromstring(self.options['provider'].by_uri(surl).get_string()) self.options = {'slowniczek': True, 'slowniczek_xml': sxml } - return '
', '
' + pre, post = '
', '
' + if self.options['wldoc'].book_info.url.slug != 'slowniczek': + post += u'

Zobacz cały słowniczek.

' % surl + return pre, post listtag = {'num': 'ol', 'punkt': 'ul', @@ -178,10 +181,7 @@ u"""%(wskazowki)s attrs_s = ' '.join(['%s="%s"' % kv for kv in attrs.items()]) if attrs_s: attrs_s = ' ' + attrs_s - pre, post = '<%s class="lista %s %s"%s>' % (listtag, ltype, classes, attrs_s), '' % listtag - if ltype == 'slowniczek': - post += '

Zobacz cały słowniczek.

' % surl - return pre, post + return '<%s class="lista %s %s"%s>' % (listtag, ltype, classes, attrs_s), '' % listtag def handle_punkt(self, element): if self.options['slowniczek']: