fnp
/
librarian.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
initial epub support
[librarian.git]
/
librarian
/
text.py
diff --git
a/librarian/text.py
b/librarian/text.py
index
d54c36b
..
cfe4a4d
100644
(file)
--- a/
librarian/text.py
+++ b/
librarian/text.py
@@
-1,7
+1,7
@@
# -*- coding: utf-8 -*-
#
# This file is part of Librarian, licensed under GNU Affero GPLv3 or later.
# -*- coding: utf-8 -*-
#
# This file is part of Librarian, licensed under GNU Affero GPLv3 or later.
-# Copyright © Fundacja Nowoczesna Polska. See NOTICE for more information.
+# Copyright © Fundacja Nowoczesna Polska. See NOTICE for more information.
#
from librarian import dcparser, parser
from lxml import etree
#
from librarian import dcparser, parser
from lxml import etree
@@
-58,9
+58,9
@@
def wrap_words(context, text, wrapping):
text = ''.join(text)
if not wrapping:
return text
text = ''.join(text)
if not wrapping:
return text
-
+
words = re.split(r'\s', text)
words = re.split(r'\s', text)
-
+
line_length = 0
lines = [[]]
for word in words:
line_length = 0
lines = [[]]
for word in words:
@@
-94,7
+94,7
@@
def transform(input_filename, output_filename, is_file=True, parse_dublincore=Tr
result = document.transform(style, **options)
output_file = codecs.open(output_filename, 'wb', encoding='utf-8')
result = document.transform(style, **options)
output_file = codecs.open(output_filename, 'wb', encoding='utf-8')
-
+
if parse_dublincore:
url = dcparser.parse(input_filename).url
else:
if parse_dublincore:
url = dcparser.parse(input_filename).url
else: