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

help needed to identity file in scala, comment on how to do it in python added

parent 66f3f805
......@@ -18,7 +18,11 @@ object GpawParser2 extends SimpleExternalParserGenerator(
}(breakOut): List[(String, jn.JString)])
)) :: Nil
),
mainFileTypes = Seq("application/x-bin"),
// output file is binary and first 16 bytes is a string: 'AFFormatGPAW '
// In python the check is like this
// is_gpw_file = open('H2.gpw', 'r').read(16).strip()=='AFFormatGPAW'
// How do we do this in scala?
mainFileTypes = Seq("application/x-bin"),
mainFileRe = "".r,
cmd = Seq(lab.DefaultPythonInterpreter.pythonExe(), "${envDir}/parsers/gpaw/parser/parser-gpaw/parser2.py",
"${mainFilePath}"),
......
  • Fawzi,

    could you help here? The new gpaw output files can be identified in Python as stated in the comments, but I don't know how to do it in Scala :-) Would like to have the parser for the new GPAW file format testet on some real data soon!

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