Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
nomad-lab
parser-gpaw
Commits
bc6a61ab
Commit
bc6a61ab
authored
Jul 04, 2017
by
Mikkel Strange
Browse files
recognize ulm fileformat
parent
b0638bd7
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/main/scala/eu/nomad_lab/parsers/GpawParser2.scala
View file @
bc6a61ab
...
...
@@ -18,12 +18,12 @@ object GpawParser2 extends SimpleExternalParserGenerator(
}(
breakOut
)
:
List
[(
String
,
jn.JString
)])
))
::
Nil
),
// output file is binary and first 16 bytes is a string
: 'AFFormatGPAW
'
// output file is binary and first 16 bytes is a string
containing: 'GPAW
'
// In python the check is like this
// is_gpw_file = open('
H2
.gpw', 'r').read(16)
.strip()=='AFFormatGPAW'
// is_gpw_file =
'GPAW' in str(
open('
file
.gpw', 'r
b
').read(16)
)
// How do we do this in scala?
mainFileTypes
=
Seq
(
"application/x-bin"
),
mainFileRe
=
""
.
r
,
mainFileRe
=
"
- of UlmGPAW|AFFormatGPAW
"
.
r
,
cmd
=
Seq
(
lab
.
DefaultPythonInterpreter
.
pythonExe
(),
"${envDir}/parsers/gpaw/parser/parser-gpaw/parser2.py"
,
"${mainFilePath}"
),
resList
=
Seq
(
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment