mirror of
https://github.com/ldericher/fftcgtool
synced 2025-01-15 15:02:59 +00:00
Card sorting, Full-Opus export files
This commit is contained in:
parent
52216406a6
commit
0d7bdd7a3d
2 changed files with 11 additions and 0 deletions
6
main.py
6
main.py
|
@ -81,6 +81,12 @@ def main():
|
||||||
json_data = myOpus.get_json(args.opusid, "/".join(elements), GRID, cardfilter, faceurls)
|
json_data = myOpus.get_json(args.opusid, "/".join(elements), GRID, cardfilter, faceurls)
|
||||||
json_file.write(json_data)
|
json_file.write(json_data)
|
||||||
|
|
||||||
|
json_filename = "fullopus_{}.json".format(args.opusid)
|
||||||
|
with open(json_filename, "w") as json_file:
|
||||||
|
cardfilter = lambda card: True
|
||||||
|
json_data = myOpus.get_json(args.opusid, "full", GRID, cardfilter, faceurls)
|
||||||
|
json_file.write(json_data)
|
||||||
|
|
||||||
# Bye
|
# Bye
|
||||||
logging.info("Done. Put the generated JSON files in your 'Saved Objects' Folder.")
|
logging.info("Done. Put the generated JSON files in your 'Saved Objects' Folder.")
|
||||||
logging.info("Thanks for using fftcgtool!")
|
logging.info("Thanks for using fftcgtool!")
|
||||||
|
|
5
opus.py
5
opus.py
|
@ -53,6 +53,11 @@ class Opus:
|
||||||
card = Card(card_data)
|
card = Card(card_data)
|
||||||
self._cards.append(card)
|
self._cards.append(card)
|
||||||
|
|
||||||
|
# sort every element alphabetically
|
||||||
|
self._cards.sort(key=lambda x: x._serial)
|
||||||
|
self._cards.sort(key=lambda x: x._name)
|
||||||
|
self._cards.sort(key=lambda x: x._element)
|
||||||
|
|
||||||
def __get_sheets(self, grid):
|
def __get_sheets(self, grid):
|
||||||
# cards per sheet
|
# cards per sheet
|
||||||
count = grid[0]*grid[1] - 1
|
count = grid[0]*grid[1] - 1
|
||||||
|
|
Loading…
Reference in a new issue