fnp
/
redakcja.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fixes
[redakcja.git]
/
src
/
catalogue
/
xml_tools.py
diff --git
a/src/catalogue/xml_tools.py
b/src/catalogue/xml_tools.py
index
242714b
..
ff7b031
100644
(file)
--- a/
src/catalogue/xml_tools.py
+++ b/
src/catalogue/xml_tools.py
@@
-60,7
+60,7
@@
def add_trim_begin(text):
master.insert(0, trim_tag)
trim_tag.tail = '\n\n\n' + (master.text or '')
master.text = '\n'
master.insert(0, trim_tag)
trim_tag.tail = '\n\n\n' + (master.text or '')
master.text = '\n'
- return
unicode
(etree.tostring(e, encoding="utf-8"), 'utf-8')
+ return
str
(etree.tostring(e, encoding="utf-8"), 'utf-8')
def add_trim_end(text):
def add_trim_end(text):
@@
-79,7
+79,7
@@
def add_trim_end(text):
prev.tail = (prev.tail or '') + '\n\n\n'
else:
master.text = (master.text or '') + '\n\n\n'
prev.tail = (prev.tail or '') + '\n\n\n'
else:
master.text = (master.text or '') + '\n\n\n'
- return
unicode
(etree.tostring(e, encoding="utf-8"), 'utf-8')
+ return
str
(etree.tostring(e, encoding="utf-8"), 'utf-8')
def split_xml(text):
def split_xml(text):
@@
-124,13
+124,13
@@
def split_xml(text):
del parent[0]
element, parent = parent, parent.getparent()
chunks[:0] = [[name,
del parent[0]
element, parent = parent, parent.getparent()
chunks[:0] = [[name,
-
unicode
(etree.tostring(copied, encoding='utf-8'), 'utf-8')
+
str
(etree.tostring(copied, encoding='utf-8'), 'utf-8')
]]
parts = src.findall('.//naglowek_rozdzial')
chunks[:0] = [[u'początek',
]]
parts = src.findall('.//naglowek_rozdzial')
chunks[:0] = [[u'początek',
-
unicode
(etree.tostring(src, encoding='utf-8'), 'utf-8')
+
str
(etree.tostring(src, encoding='utf-8'), 'utf-8')
]]
for ch in chunks[1:]:
]]
for ch in chunks[1:]: