Skip to content

Commit

Permalink
* aldonis la folio bildo por la mangxkvanto
Browse files Browse the repository at this point in the history
* en la pythonsxablogenerilo tradonis la .json informo de la json al la .tex rezulto
* gxisdatigis la repobildon
  • Loading branch information
paulwuertz committed Jun 14, 2019
1 parent da596ed commit cd61d69
Show file tree
Hide file tree
Showing 5 changed files with 28,795 additions and 7,470 deletions.
9 changes: 6 additions & 3 deletions genkartoj.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,25 +12,28 @@
\\cardtitle{{{2}}}
\\cardcontent{{{3}}}
\\cardborder {4}
\\mangxkvanto{{{5}}}
\\end{{tikzpicture}}"""

dekstra = "\n\\fill (5.7,.33) -- (5.7,2.33) -- (6,1.33) -- cycle;"
maldekstra = "\\fill (.4,.33) -- (.4,2.33) -- (.1,1.33) -- cycle;\n"

def makeKart(jsEl):
image, bgcolor, title, cont = jsEl["img"], jsEl["koloro"], \
jsEl["title"], jsEl["teksto"]
image, bgcolor, title, cont, mangxkvanto = jsEl["img"], jsEl["koloro"], \
jsEl["title"], jsEl["teksto"], jsEl["mangxkvanto"]
arrows = ""
if jsEl["dekstra"] : arrows += dekstra
if jsEl["maldekstra"] : arrows += maldekstra
return karto.format(image, bgcolor, title, cont, arrows)
return karto.format(image, bgcolor, title, cont, arrows, mangxkvanto)

cards = open("kartaro.json").read()
kartoj = json.loads(cards)
ludo = ". \n\n \\vspace{.95cm}\n\n"
c=0
for kart in kartoj:
mangxkvantvaloroj = [int(key) for key in kart["mangxkvantoj"] for i in range(kart["mangxkvantoj"][key])]
for j in range(kart["kvanto"]):
kart["mangxkvanto"] = mangxkvantvaloroj[j]
if c%9==0 and c!=0:
ludo += pagxekajxo
elif c%3==0 or c%6==0 and c!=0:
Expand Down
Binary file added img/folio.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified img/repoimg.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit cd61d69

Please sign in to comment.