diff --git a/main.py b/main.py index 8ffaab5..231f499 100755 --- a/main.py +++ b/main.py @@ -81,6 +81,12 @@ def main(): json_data = myOpus.get_json(args.opusid, "/".join(elements), GRID, cardfilter, faceurls) 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 logging.info("Done. Put the generated JSON files in your 'Saved Objects' Folder.") logging.info("Thanks for using fftcgtool!") diff --git a/opus.py b/opus.py index fe45932..bf5815e 100644 --- a/opus.py +++ b/opus.py @@ -53,6 +53,11 @@ class Opus: card = Card(card_data) 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): # cards per sheet count = grid[0]*grid[1] - 1