fnp
/
wolnelektury.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
9e54c10
)
Now XSLT file is always searched for in a directory in which book2htm.py resides.
author
Marek Stępniowski
<marek@stepniowski.com>
Thu, 28 Aug 2008 17:02:04 +0000
(19:02 +0200)
committer
Marek Stępniowski
<marek@stepniowski.com>
Thu, 28 Aug 2008 17:02:04 +0000
(19:02 +0200)
bin/book2html.py
patch
|
blob
|
history
diff --git
a/bin/book2html.py
b/bin/book2html.py
index
e684359
..
f66117d
100755
(executable)
--- a/
bin/book2html.py
+++ b/
bin/book2html.py
@@
-12,7
+12,8
@@
from lxml import etree
def transform(input_filename, output_filename):
"""Transforms file input_filename in XML to output_filename in XHTML."""
# Parse XSLT
def transform(input_filename, output_filename):
"""Transforms file input_filename in XML to output_filename in XHTML."""
# Parse XSLT
- style = etree.parse('book2html.xslt')
+ style_filename = os.path.join(os.path.dirname(__file__), 'book2html.xslt')
+ style = etree.parse(style_filename)
doc_file = cStringIO.StringIO()
expr = re.compile(r'/\s', re.MULTILINE | re.UNICODE);
doc_file = cStringIO.StringIO()
expr = re.compile(r'/\s', re.MULTILINE | re.UNICODE);