X-Git-Url: https://git.mdrn.pl/librarian.git/blobdiff_plain/724310b910f3ec0aeb2a1fbd0189d5f588a00f8f..f7260ec22a6bcb39fe800ac21f335c2c903a2072:/librarian/pyhtml.py diff --git a/librarian/pyhtml.py b/librarian/pyhtml.py index 6d1e914..b4d8557 100644 --- a/librarian/pyhtml.py +++ b/librarian/pyhtml.py @@ -151,16 +151,24 @@ u"""%(wskazowki)s # Lists def handle_lista(self, element, attrs={}): ltype = element.attrib.get('typ', 'punkt') + if not element.findall("punkt"): + if ltype == 'czytelnia': + return '

W przygotowaniu.

' + else: + return None if ltype == 'slowniczek': 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',