Re: feature request: quiet mode / creation date
Reinhard Kotucha <[email protected]> Thu, 20 Jul 2017 23:32:19 +0200
| Newsgroups | gmane.comp.tex.metapost |
|---|---|
| Message-ID | <[email protected]> |
On 2017-07-20 at 16:19:42 +0200, Niklas Beisert wrote: > a) The generated figure files contain a timestamp of the creation date: > %%CreationDate: 2017.07.17:1654 > I'm not sure what the actual benefit of this timestamp is besides > bookkeeping. However, one drawback is that the file CHANGES each time > mpost is run even though the content may not have changed. If metapost > is run automatically each time the latex document is compiled, this may > result in a great number of individual files being changed. Not a major > issue, but it becomes a bit of a hassle if the output files are being > synchronised or versioned. A simple solution would be a new command line > option to suppress this line (and ideally also the timestamp given in > the first line of .log files). As far as I can see, the output files > without such a timestamp would be stable, i.e. they change only if the > contained graphics changes. Hi Niklas, the problem is that all MetaPost files are compliled regardless whether their source code had been changed. I know that TeX's interface to the underlying operating system is quite poor and that it's almost impossible to compare filesystem time stamps in a portable way. But there is texlua. Instead of invoking mpost on every MetaPost source file, you can as well invoke a texlua script which runs mpost only if the .mp file is newer than the corresponding .mps file. texlua allows you to write scripts which are completely platform-independent. Comparing filesystem time stamps is possible. If you are not not familiar with Lua yet, let me know. I could provide such a script at the upcoming weekend. Programming in Lua is a pleasure. It seems wrong to me to suppress time stamps in generated files. It's more approppriate not to generate them at all unless the source code was changed. Regards, Reinhard -- ------------------------------------------------------------------ Reinhard Kotucha Phone: +49-511-3373112 Marschnerstr. 25 D-30167 Hannover mailto:[email protected] ------------------------------------------------------------------ -- http://tug.org/metapost/