Commit bc6a61ab authored by Mikkel Strange's avatar Mikkel Strange
Browse files

recognize ulm fileformat

parent b0638bd7
......@@ -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', 'rb').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(
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment