mirror of
https://github.com/Steffo99/sophon.git
synced 2024-12-21 22:34:21 +00:00
🎓 Fix the script
This commit is contained in:
parent
e5e897b192
commit
4d45228028
1 changed files with 11 additions and 2 deletions
|
@ -1,10 +1,19 @@
|
||||||
import re
|
import re
|
||||||
|
|
||||||
with open("build/latex/progettazioneesviluppodisophonapplicativocloudasupportodellaricerca.tex", "r") as file:
|
with open("build/latex/progettazioneesviluppodisophonapplicativocloudasupportodellaricerca.tex", "r") as file:
|
||||||
|
print("Reading file...")
|
||||||
text = file.read()
|
text = file.read()
|
||||||
|
|
||||||
text = re.sub(r"\\renewcommand[{]\\indexname[}][{]Indice del modulo Python[}].*?\\end[{]sphinxtheindex[}]", "", text, re.DOTALL)
|
print("Performing first sub...", end=" ")
|
||||||
text = re.sub(r"\\renewcommand[{]\\indexname[}][{]HTTP Routing Table[}].*?\\end[{]sphinxtheindex[}]", "", text, re.DOTALL)
|
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:
|
with open("build/latex/progettazioneesviluppodisophonapplicativocloudasupportodellaricerca.tex", "w") as file:
|
||||||
|
print("Writing file...")
|
||||||
file.write(text)
|
file.write(text)
|
||||||
|
|
||||||
|
print("Done!")
|
||||||
|
|
Loading…
Reference in a new issue