1
Fork 0
mirror of https://github.com/Steffo99/sophon.git synced 2024-10-16 07:07:26 +00:00

🎓 Try removing indexes with python

This commit is contained in:
Steffo 2021-12-02 17:40:21 +01:00
parent 951bbc113c
commit ef6a53bdd1
Signed by: steffo
GPG key ID: 6965406171929D01
2 changed files with 13 additions and 0 deletions

View file

@ -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

View 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)