Updated the tagger to scan all files.
This commit is contained in:
@@ -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}
|
||||
|
||||
|
||||
12
tagger.py
12
tagger.py
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user