Adding upstream version 1.8.0.
Signed-off-by: Daniel Baumann <daniel@debian.org>
This commit is contained in:
parent
c48d95b7fa
commit
e40b3259c1
2403 changed files with 153656 additions and 0 deletions
24
examples/FTMLnorm.py
Normal file
24
examples/FTMLnorm.py
Normal file
|
@ -0,0 +1,24 @@
|
|||
#!/usr/bin/env python3
|
||||
'Normalize an FTML file'
|
||||
__url__ = 'https://github.com/silnrsi/pysilfont'
|
||||
__copyright__ = 'Copyright (c) 2016 SIL International (https://www.sil.org)'
|
||||
__license__ = 'Released under the MIT License (https://opensource.org/licenses/MIT)'
|
||||
__author__ = 'David Raymond'
|
||||
|
||||
from silfont.core import execute
|
||||
import silfont.ftml as ftml
|
||||
from xml.etree import cElementTree as ET
|
||||
|
||||
argspec = [
|
||||
('infile',{'help': 'Input ftml file'}, {'type': 'infile'}),
|
||||
('outfile',{'help': 'Output ftml file', 'nargs': '?'}, {'type': 'outfile', 'def': '_new.xml'}),
|
||||
('-l','--log',{'help': 'Log file'}, {'type': 'outfile', 'def': '_ftmltest.log'})
|
||||
]
|
||||
|
||||
def doit(args) :
|
||||
f = ftml.Fxml(args.infile)
|
||||
f.save(args.outfile)
|
||||
|
||||
def cmd() : execute("",doit,argspec)
|
||||
if __name__ == "__main__": cmd()execute("", doit, argspec)
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue