<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
</head>
<body text="#000000" bgcolor="#FFFFFF">
Hi,<br>
When I use usfm2osis.py I have an issue with the \r marker the
script convert :<br>
<font face="Courier New, Courier, monospace">\r (Mc 1, 7-8; Lc 3,
15-18; Jn 1, 24-28)<br>
<br>
</font>like that : <br>
<font face="Courier New, Courier, monospace"><title
type="parallel"><reference type="parallel">(Mc 1, 7-8; Lc
3, 15-18; Jn 1, 24-28)</reference></title></font><br>
<br>
And when I want to read the reference link on xiphos, it doesn’t.
Then I did some "odd jobs" to make it working, I run first this
command :<br>
<font face="Courier New, Courier, monospace">find . -name
"*osis.xml" -exec sed -i 's/type="parallel"><reference
type="parallel">/type="parallel"><reference
osisRef="">/g' {} \;</font><br>
And after that I execute this script:<br>
<br>
<font face="Courier New, Courier, monospace">#$ cat corrig.py<br>
import sys, re<br>
fo=sys.stdout<br>
<br>
rec=re.compile('(.*osisRef=")[^"]*(">\()([^)]+)(.*)')<br>
<br>
def modiref(ref):<br>
ref=re.sub(', *','.',ref)<br>
ref=re.sub(' +','.',ref)<br>
ref=ref.replace('c','k')<br>
return ref<br>
<br>
for lig in sys.stdin.readlines():<br>
k=rec.match(lig)<br>
if k:<br>
refs=re.split('; *',k.group(3))<br>
fo.write("%s%s%s%s"%(k.group(1),modiref(refs[0]),k.group(2),refs[0]))<br>
for ref in refs[1:]: fo.write(';
</reference><reference
osisRef="%s">%s'%(modiref(ref),ref))<br>
fo.write('%s\n'%(k.group(4)))<br>
else: fo.write(lig)<br>
</font><br>
I thought it can be usefull for all to report the bug. Maybe we can
improve directly the usfm2osis.py<br>
<br>
Best regard, Br Cyrille<br>
<br>
</body>
</html>