changeset 11:b2ac68732e45

Clean.
author Matti Hamalainen <ccr@tnsp.org>
date Tue, 11 May 2021 11:30:42 +0300
parents 013f0cd9e5b3
children d50e71642be7
files lxmldump.py
diffstat 1 files changed, 3 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/lxmldump.py	Tue May 11 11:27:47 2021 +0300
+++ b/lxmldump.py	Tue May 11 11:30:42 2021 +0300
@@ -137,9 +137,9 @@
 
 
 ##
-def pkk_output_one(indent, dnode, dsub):
+def pkk_output_one(indent, dnode, dsub, dfmt):
     for qnode in dnode.findall(dsub):
-        pkk_printi(indent, "{}\n".format(pkk_get_text(qnode)))
+        pkk_printi(indent, dfmt.format(pkk_get_text(qnode)))
 
 def pkk_output_subs(indent, dnode, dsub, dname):
     for qnode in dnode.findall(dsub):
@@ -168,7 +168,7 @@
 def pkk_output_node(indent, dnode):
 
     for wnode in dnode.findall("./HeadwordCtn"):
-        pkk_output_one (indent, wnode, "./Headword")
+        pkk_output_one (indent, wnode, "./Headword", "\"{}\":\n")
         pkk_output_sense(indent + 1, wnode)
 
         index = 1