mirror of
https://github.com/Steffo99/sophon.git
synced 2024-12-23 07:14:21 +00:00
19 lines
749 B
Python
19 lines
749 B
Python
import re
|
|
|
|
with open("build/latex/progettazioneesviluppodisophonapplicativocloudasupportodellaricerca.tex", "r") as file:
|
|
print("Reading file...")
|
|
text = file.read()
|
|
|
|
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)
|
|
|
|
with open("build/latex/progettazioneesviluppodisophonapplicativocloudasupportodellaricerca.tex", "w") as file:
|
|
print("Writing file...")
|
|
file.write(text)
|
|
|
|
print("Done!")
|