Updated the tagger to scan all files.
This commit is contained in:
@@ -35,7 +35,7 @@
|
|||||||
\hi
|
\hi
|
||||||
\end{lemma}
|
\end{lemma}
|
||||||
\begin{proof}
|
\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 & }\]
|
\[\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}
|
\end{proof}
|
||||||
|
|
||||||
|
|||||||
12
tagger.py
12
tagger.py
@@ -4,6 +4,7 @@ import re
|
|||||||
# no I, no O
|
# no I, no O
|
||||||
CHARACTERS = "0123456789ABCDEFGHJKLMNPQRSTUVWXYZ"
|
CHARACTERS = "0123456789ABCDEFGHJKLMNPQRSTUVWXYZ"
|
||||||
|
|
||||||
|
|
||||||
# convert integer to tag
|
# convert integer to tag
|
||||||
def tobase(i):
|
def tobase(i):
|
||||||
global CHARACTERS
|
global CHARACTERS
|
||||||
@@ -15,13 +16,18 @@ def tobase(i):
|
|||||||
else:
|
else:
|
||||||
return tobase(i // len(CHARACTERS)) + CHARACTERS[i % len(CHARACTERS)]
|
return tobase(i // len(CHARACTERS)) + CHARACTERS[i % len(CHARACTERS)]
|
||||||
|
|
||||||
|
|
||||||
def totag(i):
|
def totag(i):
|
||||||
return tobase(i).rjust(4, "0")
|
return tobase(i).rjust(4, "0")
|
||||||
|
|
||||||
|
|
||||||
# convert tag to integer
|
# convert tag to integer
|
||||||
def toint(tag):
|
def toint(tag):
|
||||||
global CHARACTERS
|
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()
|
tags = dict()
|
||||||
labels = dict()
|
labels = dict()
|
||||||
@@ -49,8 +55,8 @@ except IndexError:
|
|||||||
last = -1
|
last = -1
|
||||||
|
|
||||||
|
|
||||||
#filenames = glob.glob("*.tex")
|
filenames = glob.glob("*.tex")
|
||||||
filenames = ["document.tex"]
|
# filenames = ["document.tex"]
|
||||||
|
|
||||||
# where we should start
|
# where we should start
|
||||||
i = last + 1
|
i = last + 1
|
||||||
|
|||||||
Reference in New Issue
Block a user