From ccabcc6d28eb537b2ba4eba9d7ff2edd5e2310e6 Mon Sep 17 00:00:00 2001 From: cruft Date: Wed, 18 Nov 2009 19:30:56 -0700 Subject: [PATCH] Now with style sheet --- style.css | 26 ++++++++++++++++++++++++++ toepub.py => toxhtml.py | 21 +++++++++++++++++++-- 2 files changed, 45 insertions(+), 2 deletions(-) create mode 100644 style.css rename toepub.py => toxhtml.py (91%) diff --git a/style.css b/style.css new file mode 100644 index 0000000..f7bb35c --- /dev/null +++ b/style.css @@ -0,0 +1,26 @@ +body { + max-width: 40em; + font-family: Antykwa Torunska; +} + +img { + max-width: 100%; + max-height: 100%; +} + +.part { + padding: 40% 0; + page-break-before: always; + page-break-after: always; + font-size: 400%; + text-align: center; +} + +.chapter { + page-break-before: always; + margin-top: 40%; +} + +.author { + border-bottom: 2px solid black; +} diff --git a/toepub.py b/toxhtml.py similarity index 91% rename from toepub.py rename to toxhtml.py index 4eb96b0..5ad7eea 100755 --- a/toepub.py +++ b/toxhtml.py @@ -93,9 +93,10 @@ def art(artist, url, title=None): print('
') print('%s' % (url, alt)) if title: - print('%s by %s' % (title, artist)) + atxt = '%s by %s' % (title, artist) else: - print(alt) + atxt = alt + print('

%s

' % (atxt)) print('
') outbuf = '' @@ -198,6 +199,22 @@ for l in f: if l.startswith('\\begin{document'): break +print(''' + + + + Horrors 2 + + + + +''') + for l in f: outline(l) +print(''' + +''')