X-Git-Url: https://git.mdrn.pl/librarian.git/blobdiff_plain/3f007696b61ee78291def21c0dca98f94524a943..4c03e8c6d362890f31ea8227e5ab5e0cb3f4df30:/scripts/normalize.py diff --git a/scripts/normalize.py b/scripts/normalize.py index ae1d84a..6f6013f 100644 --- a/scripts/normalize.py +++ b/scripts/normalize.py @@ -1,12 +1,8 @@ -#!/usr/bin/env python # -*- coding: utf-8 -*- # -# Copyright © 2008,2009,2010 Fundacja Nowoczesna Polska -# # This file is part of Librarian, licensed under GNU Affero GPLv3 or later. -# For full license text see COPYING or +# Copyright © Fundacja Nowoczesna Polska. See NOTICE for more information. # - from __future__ import with_statement import re @@ -51,8 +47,8 @@ def wl_fix_dialog(context, data): if m is not None: return m.group(1) else: - return text - + return text + def filter_verse_ends(data): return data.replace('/\n', '
') @@ -64,7 +60,7 @@ ns['fix-dialog-line'] = wl_fix_dialog def normalize_stylesheet(): return etree.XSLT(etree.parse(os.path.join(os.path.dirname(librarian.__file__), 'xslt', 'normalize.xslt'))) -if __name__ == '__main__': +if __name__ == '__main__': tran = normalize_stylesheet() input = StringIO( f ) doc = trans( etree.parse(input) )