Skip to content
Snippets Groups Projects
Verified Commit 4dc65862 authored by David Beniamine's avatar David Beniamine
Browse files

Handle already unlized documents

parent 6ec74737
Branches
Tags
No related merge requests found
Pipeline #201 passed
......@@ -31,11 +31,20 @@ def unlizeXmlNb(input, output, template, lang, dry_run):
# Add
unl = unlize(nestedBody2Str(node), lang, dry_run)
addCell(nb, node.text, unl)
else:
addCell(nb, getText(node, 'orig'), getText(node, 'unl'))
with open(output, 'w') as f:
nbf.write(nb, f)
def getText(node, tag):
try:
return node.xpath(tag)[0].text
except IndexError:
return ''
def addCell(nb, xml, unl):
code = """
xmldata = \"\"\"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment