Updated the tagger to scan all files.

This commit is contained in:
Bokuan Li
2025-12-21 03:10:32 -05:00
parent c021e0f27b
commit ba0cf9a315
2 changed files with 39 additions and 33 deletions

View File

@@ -35,7 +35,7 @@
\hi
\end{lemma}
\begin{proof}
hihihihihihihi
greetings fellow gamer
\[\xymatrix{ & Y_1 & \\ X \ar[ru]^{f_1} \ar[r]^{f_3} \ar[rd]_{f_2} & Y_3 \ar[u]_{a_{31}} \ar[d]^{a_{32}} & Y \ar[lu]_{s_1} \ar[l]_{s_3} \ar[ld]^{s_2} \\ & Y_2 & }\]
\end{proof}

View File

@@ -4,6 +4,7 @@ import re
# no I, no O
CHARACTERS = "0123456789ABCDEFGHJKLMNPQRSTUVWXYZ"
# convert integer to tag
def tobase(i):
global CHARACTERS
@@ -15,13 +16,18 @@ def tobase(i):
else:
return tobase(i // len(CHARACTERS)) + CHARACTERS[i % len(CHARACTERS)]
def totag(i):
return tobase(i).rjust(4, "0")
# convert tag to integer
def toint(tag):
global CHARACTERS
return sum([CHARACTERS.index(tag[i]) * len(CHARACTERS)**(4-i-1) for i in range(4)])
return sum(
[CHARACTERS.index(tag[i]) * len(CHARACTERS) ** (4 - i - 1) for i in range(4)]
)
tags = dict()
labels = dict()
@@ -49,8 +55,8 @@ except IndexError:
last = -1
#filenames = glob.glob("*.tex")
filenames = ["document.tex"]
filenames = glob.glob("*.tex")
# filenames = ["document.tex"]
# where we should start
i = last + 1