Skip to content

Instantly share code, notes, and snippets.

@ExpHP
Last active March 29, 2017 02:08
Show Gist options
  • Select an option

  • Save ExpHP/38d5fc777d8b165fd2286c5db134358e to your computer and use it in GitHub Desktop.

Select an option

Save ExpHP/38d5fc777d8b165fd2286c5db134358e to your computer and use it in GitHub Desktop.
main = shakeArgs opts $ do
-- ...
"[p]/[v]/freqs/[k]" !> \out fmt -> do
let i = List.elemIndex (fmt "[k]") kpointShorts -- HACK should use order in data
liftIO $ input (fmt "[p]/[v]/data.dat") & script "degnuplot"
& procs "jq" [idgaf $ "[.[]["++show i++"][0][1]]"] -- FIXME shelling out to jq!?
& toOut & output (idgaf out)
"[p]/[v]band.gplot" !> \out fmt -> act
where
act = do
[templateFile] <- needs [fmt "[p]/input/band.gplot.template"]
[dataFile] <- needs [fmt "[p]/[v]/data.dat"]
[titleFile] <- needs [fmt "[p]/[v]/title" ]
[labelFile] <- needs [fmt "[p]/[v]/band_labels.txt"]
-- stuff...
-- stuff used in "stuff..."
dquote = "\"" ++ s ++ "\""
paren = "(" ++ s ++ ")"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment