This Python3 utility parses LaTeX source codes for TODO tags and print them up on terminal.
Supported TODO tags are todo
, TODO
, fixme
, FIXME
, question
, problem
, etc.
You may modify the example configuration todotex.example.toml
to your like and place it at ~/.config/todotex/todotex.toml
(see --help
for detail).
sample.tex
:
\documentclass{article}
\begin{document}
% todo some text
Superchiasmatic neucleus is the primary clock % continue later: forgot
% what to write now
\end{document}
With command python3 -m todotex -c .
under directory of sample.tex
, the output is
sample.tex
3:TODO:some text
4:TODO:forgot what to write now
(with color)
Simply add todotex
to your PYTHONPATH
.
For example, suppose that all dependencies has been installed to ~/miniconda3/envs/hello/bin/python3
, and that this repo has been cloned to /path/to/todo-tex
.
You may run the utility via:
PYTHONPATH=/path/to/todo-tex ~/miniconda3/envs/hello/bin/python3 -m todotex --help
Or you may put the following text to a shell script, and call the shell script with arguments:
PYTHONPATH=/path/to/todo-tex ~/miniconda3/envs/hello/bin/python3 -m todotex "$@"
See python3 -m todotex --help
.
Each key
refers to the TODO/DONE tags in TeX source to parse, and each label
refers to what to be shown in terminal.
The todo
list collects all TODO tags and labels.
The done
list collects all DONE tags and labels.
Scenario to use DONE tags includes notes to previously posed question
tag.
Option -D
can be used to suppress showing DONE tags.
An example configuration is provided at todotex.example.toml
.
tomli
: used to parse configuration file
chardet
(relevant only under Windows): used to safely open text files with unknown encodingscolorama
, used to color the output under Windows
To run the tests in todotex
, you'll need pytest
:
pytest todotex/tests