2021-12-02 16:40:21 +00:00
|
|
|
import re
|
|
|
|
|
|
|
|
with open("build/latex/progettazioneesviluppodisophonapplicativocloudasupportodellaricerca.tex", "r") as file:
|
2021-12-02 16:55:39 +00:00
|
|
|
print("Reading file...")
|
2021-12-02 16:40:21 +00:00
|
|
|
text = file.read()
|
|
|
|
|
2021-12-02 16:55:39 +00:00
|
|
|
print("Performing first sub...", end=" ")
|
|
|
|
text, number = re.subn(r"\\renewcommand[{]\\indexname[}][{]Indice del modulo Python[}].*?\\end[{]sphinxtheindex[}]", "", text, flags=re.DOTALL)
|
|
|
|
print(number)
|
|
|
|
|
|
|
|
print("Performing second sub...", end=" ")
|
|
|
|
text, number = re.subn(r"\\renewcommand[{]\\indexname[}][{]HTTP Routing Table[}].*?\\end[{]sphinxtheindex[}]", "", text, flags=re.DOTALL)
|
|
|
|
print(number)
|
2021-12-02 16:40:21 +00:00
|
|
|
|
|
|
|
with open("build/latex/progettazioneesviluppodisophonapplicativocloudasupportodellaricerca.tex", "w") as file:
|
2021-12-02 16:55:39 +00:00
|
|
|
print("Writing file...")
|
2021-12-02 16:40:21 +00:00
|
|
|
file.write(text)
|
2021-12-02 16:55:39 +00:00
|
|
|
|
|
|
|
print("Done!")
|