fnp
/
librarian.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
slowniczek link
[librarian.git]
/
librarian
/
pyhtml.py
diff --git
a/librarian/pyhtml.py
b/librarian/pyhtml.py
index
6d1e914
..
b4d8557
100644
(file)
--- 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')
# Lists
def handle_lista(self, element, attrs={}):
ltype = element.attrib.get('typ', 'punkt')
+ if not element.findall("punkt"):
+ if ltype == 'czytelnia':
+ return '<p>W przygotowaniu.</p>'
+ else:
+ return None
if ltype == 'slowniczek':
surl = element.attrib.get('src', None)
if surl is None:
# print '** missing src on <slowniczek>, setting default'
if ltype == 'slowniczek':
surl = element.attrib.get('src', None)
if surl is None:
# print '** missing src on <slowniczek>, 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 }
sxml = None
if surl:
sxml = etree.fromstring(self.options['provider'].by_uri(surl).get_string())
self.options = {'slowniczek': True, 'slowniczek_xml': sxml }
- return '<div class="slowniczek">', '</div>'
+ pre, post = '<div class="slowniczek">', '</div>'
+ if self.options['wldoc'].book_info.url.slug != 'slowniczek':
+ post += u'<p class="see-more"><a href="%s">Zobacz cały słowniczek.</a></p>' % surl
+ return pre, post
listtag = {'num': 'ol',
'punkt': 'ul',
listtag = {'num': 'ol',
'punkt': 'ul',