Commit c66f718a authored by gijs's avatar gijs
Browse files

Pff

parent 25234170
......@@ -21,9 +21,9 @@ template = u"""<!DOCTYPE html>
<body>
<svg class="defs-only">
<filter id="duotone" color-interpolation-filters="sRGB" x="0" y="0" height="100%" width="100%">
<feColorMatrix type="matrix" values=" 0.12 0 0 0 0
0.59 0 0 0 0
0.82 0 0 0 0
<feColorMatrix type="matrix" values=" 1 0 0 0 0
1 0 0 0 0
1 0 0 0 0
0 0 0 1 0" />
</filter>
</svg>
......@@ -45,8 +45,18 @@ def makeLemma(title, url, bigSoup):
lemma = bigSoup.new_tag("section")
lemma['class'] = 'lemma'
header = bigSoup.new_tag("h1", class_='story-title')
header.append(title)
sectiontitle = tagContent(child)
asciii = bigSoup.new_tag('pre')
asciii['class'] = 'ascii'
asciii.append(u'''%
%
% {}'''.format(title))
header = bigSoup.new_tag('section')
header['class'] = 'asciiheaderwrapper lemmaheader'
header.append(asciii)
lemma.append(header)
for t in lemmaSoup.contents:
......@@ -86,52 +96,63 @@ for (lang, url) in pages:
container.append(chapter)
elif child.name:
if child.name == 'h2':
sectiontitle = child.text
elif child.name == 'h2':
sectiontitle = tagContent(child)
asciii1 = soup.new_tag('pre')
asciii1['class'] = 'ascii'
asciii1.append('''
asciii1 = soup.new_tag('pre')
asciii1['class'] = 'ascii'
asciii1.append(u'''
%%% %%%
%%% %%%
%%% %%%
%%% %%%''')
asciiiname = soup.new_tag('div')
asciiiname['class'] = 'asciiname'
asciii2 = soup.new_tag('pre')
asciii2['class'] = 'ascii'
asciii2.append('''%%% %%%
%%% %%%''')
asciiiname = soup.new_tag('div')
asciiiname['class'] = 'asciiname'
asciii2 = soup.new_tag('pre')
asciii2['class'] = 'ascii'
asciii2.append(u'''%%% %%%
%%% %%%
%%% %%%
%%% %%%''')
asciiiname.append(sectiontitle)
container.append(asciii1)
container.append(asciiiname)
container.append(asciii2)
elif child.name == 'h3':
sectiontitle = child.text
asciii1 = soup.new_tag('pre')
asciii1['class'] = 'ascii box'
asciii1.append('''% % % % % % % % % %''')
asciiiname = soup.new_tag('div')
asciiiname['class'] = 'asciiname box'
asciii2 = soup.new_tag('pre')
asciii2['class'] = 'ascii box'
asciii2.append('''% % % % % % % % % %''')
asciiiname.append(sectiontitle)
container.append(asciii1)
container.append(asciiiname)
container.append(asciii2)
else:
container.append(copy.copy(child))
asciiiname.append(sectiontitle)
headerwrapper = soup.new_tag('section')
headerwrapper['class'] = 'asciiheaderwrapper groupheader center'
headerwrapper.append(asciii1)
headerwrapper.append(asciiiname)
headerwrapper.append(asciii2)
container.append(headerwrapper)
elif child.name == 'h3':
sectiontitle = child.text
asciii1 = soup.new_tag('pre')
asciii1['class'] = 'ascii box'
asciii1.append(u'''% % % % % % % % % %''')
asciiiname = soup.new_tag('div')
asciiiname['class'] = 'asciiname box'
asciii2 = soup.new_tag('pre')
asciii2['class'] = 'ascii box'
asciii2.append(u'''% % % % % % % % % %''')
asciiiname.append(sectiontitle)
headerwrapper = soup.new_tag('section')
headerwrapper['class'] = 'asciiheaderwrapper'
headerwrapper.append(asciii1)
headerwrapper.append(asciiiname)
headerwrapper.append(asciii2)
container.append(headerwrapper)
else:
container.append(copy.copy(child))
soup.append(container)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment