Skip to content

Commit

Permalink
Update convert-metadix-dix.py
Browse files Browse the repository at this point in the history
  • Loading branch information
marcriera committed Jul 7, 2024
1 parent 949d3fd commit ec047fb
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions convert-metadix-dix.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,19 +26,19 @@ def isMultiword(e):
if b:
return True
p = e.find("p")
if p:
if p is not None:
l=p.find("l")
if l:
if l is not None:
g = l.find("g")
if g:
if g is not None:
return True
b = l.find("b")
if b is not None:
return True
r=p.find("r")
if r:
if r is not None:
g = r.find("g")
if g:
if g is not None:
return True
b = r.find("b")
if b is not None:
Expand All @@ -52,7 +52,7 @@ def wordL(e):
word = part.text
if word is None:
p = e.find("p")
if p:
if p is not None:
l = p.find("l")
word = l.text
if word is None:
Expand All @@ -66,7 +66,7 @@ def wordR(e):
word = part.text
if word is None:
p = e.find("p")
if p:
if p is not None:
l = p.find("r")
word = l.text
if word is None:
Expand Down Expand Up @@ -95,11 +95,11 @@ def wordR(e):
parname = ""
par = None
p = e.find('p')
if p:
if p is not None:
par = p.find('l').find('s')
if par is None:
i = e.find('i')
if i:
if i is not None:
par = i.find('s')
if par is None:
continue
Expand All @@ -121,4 +121,4 @@ def wordR(e):
new.set('n', prefixes[prefix])
e.insert(0, new)

tree.write(target)
tree.write(target)

0 comments on commit ec047fb

Please sign in to comment.