I like to add a sort of watermark with info about the git revision at the 
bottom of some files that I typeset. I’m using Lua, so I have:

context(os.resultof("git --no-pager log --pretty='%h of %aD' -1 foo.xml”))

which gives something like "git revision b085c92a of Wed, 14 Feb 2018 12:49:35 
+0100.” Suppose I want to make this more general. What would be the easiest way 
to either say “the xml file that is being processed” (something like arg[1]) or 
“the xml file whose name is in the Lua variable ‘foo?’”



If your question is of interest to others as well, please add an entry to the 

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net

Reply via email to