X-Git-Url: https://git.mdrn.pl/librarian.git/blobdiff_plain/17e20f7c5e5642515d284b3bbbf19d4ea16c31b3..3a27423b73ba18f8aad3043c1fbcdbf6e4dad890:/librarian/epub.py?ds=inline diff --git a/librarian/epub.py b/librarian/epub.py index 649901e..e992f40 100644 --- a/librarian/epub.py +++ b/librarian/epub.py @@ -20,6 +20,10 @@ sys.path.append('..') # for running from working copy from librarian import XMLNamespace, RDFNS, DCNS, WLNS, NCXNS, OPFNS, NoDublinCore from librarian.dcparser import BookInfo +from librarian import functions + +functions.reg_person_name() + def inner_xml(node): """ returns node's text and children as a string @@ -399,7 +403,7 @@ def transform(provider, slug, output_file=None, output_dir=None): os.chdir(os.path.join(os.path.dirname(os.path.realpath(__file__)), '../font-optimizer')) for fname in 'DejaVuSerif.ttf', 'DejaVuSerif-Bold.ttf', 'DejaVuSerif-Italic.ttf', 'DejaVuSerif-BoldItalic.ttf': - subprocess.check_call(['./subset.pl', '--chars', ''.join(chars), res('../fonts/' + fname), os.path.join(tmpdir, fname)]) + subprocess.check_call(['./subset.pl', '--chars', ''.join(chars).encode('utf-8'), res('../fonts/' + fname), os.path.join(tmpdir, fname)]) zip.write(os.path.join(tmpdir, fname), os.path.join('OPS', fname)) rmtree(tmpdir) os.chdir(cwd)