parsing latex log files

In mary cases, LaTeX should be run several times to get the correct result (for example, to resolve cross-references). The only way to detect if re-run is required is to analyze the log file. I haven't found anything ready to use, so I've written it myself.

texloginfo.py:
* written in Python,
* is a command-line program,
* is a re-usable class for Python programs,
* unit-tested (both the class and the command-line).

I'll publish it as soon as find time. If you need it right now, contact me privately.

Some examples:

$ ./texloginfo.py --warnings ./test-data/warnings/warnings.log 
Overfull \hbox (90.38905pt too wide) in paragraph at lines 3--5

$ ./texloginfo.py --errors ./test-data/errors/errors.log 
! Missing number, treated as zero.
! Illegal unit of measure (pt inserted).

$ ./texloginfo.py --rerun ./test-data/rerun/rerun.log 
$ echo $?
1

$ cat test-data/*/*log | ./texloginfo.py --rerun --errors --warnings - 
! Missing number, treated as zero.
! Illegal unit of measure (pt inserted).
LaTeX Warning: Label(s) may have changed. Rerun to get cross-references right.
Overfull \hbox (90.38905pt too wide) in paragraph at lines 3--5
Categories: python TeX

Updated: