It inlines the highlighted code from the minted package. The resulting tex file can be compiled without the shell-escape option. Which can be necessary if, for instance, the tex file must be compiled on the editor's servers.
Also it can greatly reduce compile times.
python3 depygmentize.py -i main.tex -o final.tex -l coq
looks for
\usepackage{minted}
\newminted{coq}{fontsize=\\footnotesize,mathescape}
and replaces all occurences of
\begin{coqcode}
...
\end{coqcode}
by the highlighting tex code generated by pygments.
-m x
changes the name of the defined macro in \newminted{x}
. By default it
is the same as -l
.
-p x
changes the name of file that minted uses to define its macros. By
default it is pygments_prelude.tex
.