mirror of
https://github.com/Steffo99/sophon.git
synced 2024-12-21 14:24:22 +00:00
🎓 Try removing indexes with python
This commit is contained in:
parent
951bbc113c
commit
ef6a53bdd1
2 changed files with 13 additions and 0 deletions
3
.github/workflows/build-sphinx-thesis.yml
vendored
3
.github/workflows/build-sphinx-thesis.yml
vendored
|
@ -92,6 +92,9 @@ jobs:
|
|||
- name: "Add appendix macro"
|
||||
working-directory: thesis/build/latex/
|
||||
run: sed --regexp-extended --in-place 's/[\]chapter[{]Installazione di Sophon[}]/\appendix\chapter{Installazione di Sophon}/g' progettazioneesviluppodisophonapplicativocloudasupportodellaricerca.tex
|
||||
- name: "Remove autogenerated indexes"
|
||||
working-directory: thesis/
|
||||
run: python latex_index_remover.py
|
||||
- name: "Build PDF document with Latexmk"
|
||||
working-directory: thesis/build/latex/
|
||||
run: make
|
||||
|
|
10
thesis/latex_index_remover.py
Normal file
10
thesis/latex_index_remover.py
Normal file
|
@ -0,0 +1,10 @@
|
|||
import re
|
||||
|
||||
with open("build/latex/progettazioneesviluppodisophonapplicativocloudasupportodellaricerca.tex", "r") as file:
|
||||
text = file.read()
|
||||
|
||||
text = re.sub(r"\\renewcommand[{]\\indexname[}][{]Indice del modulo Python[}].*?\\end[{]sphinxtheindex[}]", "", text, re.DOTALL)
|
||||
text = re.sub(r"\\renewcommand[{]\\indexname[}][{]HTTP Routing Table[}].*?\\end[{]sphinxtheindex[}]", "", text, re.DOTALL)
|
||||
|
||||
with open("build/latex/progettazioneesviluppodisophonapplicativocloudasupportodellaricerca.tex", "w") as file:
|
||||
file.write(text)
|
Loading…
Reference in a new issue