From 1883c7ed2399c00b31ea4328027c933d2672a0d8 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Marek=20St=C4=99pniowski?= Date: Thu, 28 Aug 2008 19:02:04 +0200 Subject: [PATCH 1/1] Now XSLT file is always searched for in a directory in which book2htm.py resides. --- bin/book2html.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/bin/book2html.py b/bin/book2html.py index e68435974..f66117d5d 100755 --- 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 - 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); -- 2.20.1