Toggle navigation
Toggle navigation
This project
Loading...
Sign in
Carlos-Francisco Méndez-Cruz
/
automatic-extraction-growth-conditions
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Graphs
Network
Create a new issue
Commits
Issue Boards
Authored by
Carlos-Francisco Méndez-Cruz
2018-09-24 10:57:56 -0500
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
ec363d7c556f25783b050a7cc4e37951c9e82710
ec363d7c
1 parent
eb9affcf
Transform soft file in XML file
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 additions
and
1 deletions
scripts/soft-2-xml.py
scripts/soft-2-xml.py
View file @
ec363d7
...
...
@@ -50,7 +50,7 @@ if __name__ == "__main__":
if
f
.
endswith
(
"_family.txt"
):
print
(
"Processing...{}/{}"
.
format
(
options
.
inputPath
,
f
))
softText
=
''
with
open
(
os
.
path
.
join
(
options
.
inputPath
,
f
),
"r"
,
encoding
=
"utf-8"
)
as
iFile
:
with
open
(
os
.
path
.
join
(
options
.
inputPath
,
f
),
"r"
,
encoding
=
"utf-8"
,
errors
=
"replace"
)
as
iFile
:
with
open
(
os
.
path
.
join
(
options
.
outputPath
,
f
.
replace
(
".txt"
,
".xml"
)),
"w"
,
encoding
=
"utf-8"
)
as
oFile
:
oFile
.
write
(
"<?xml version=
\"
1.0
\"
encoding=
\"
UTF-8
\"
?>
\n\n
<gse xmlns:xsi=
\"
http://www.w3.org/2001/XMLSchema-instance
\"\n
xsi:noNamespaceSchemaLocation=
\"
esquema-gcs.xsd
\"
>
\n\n
"
)
...
...
Please
register
or
login
to post a comment