Project structure: ``` data/ -- input files from AoE itself (taken from another project) decks/ -- python scripts to create individual decks * actual decks are not stored here * it should be called deck-creators, but I don't want to type that flashcards/ -- all of the useful library code is in here output/ -- files generated by the project decks-output/ -- generated decks that can be read into Anki namelists/ -- lists containing names to include for particular decks settings.yaml -- controls where files are read from and written to ``` Once you have data in the correct format, creating the cards is trivial. The data is provided by another project (referenced below) and pulled directly from AoE itself. However, the names and identifiers used in the data can be tricky. Most of the work here is to create mappings between names and id numbers for that data. Big picture process: * Create a list of names that you want included in the deck * These are not just any names -- they need to match what is used in the data file. Use the process below to help with this. * Create a deck using just these names. The library handles the mapping of names to id numbers for you. Process: * Run flashcards/create_full_namelists.py * `python -m flashcards.create_full_namelists` * This generates two files in output/namelists/ * Each file corresponds to one key in the data file: "units_buildings" and "techs" * Make new namelists by deleting unused entries from the generated namelists * This is the worst part * You want to remove only the entirely useless things at first * When finished, keep around these pruned namelists and start your deck namelists as copies of them so you don't need to redo this step * You can also just use the one I added, but there's no guarantee it is up-to-date or mistake-free * Copy one of the pruned namelists and delete more entries until you have just the names you need for a given deck * Using one of the scripts in decks/ as a template, write a Python script that reads your generated maps and the data file and outputs an Anki deck * Unless you want to add the flashcards package to your path, you must run with `python -m decks.{file name without .py extension}` * The deck will be stored in output/decks-output/ * Open Anki and import the deck # Acknowledgements The data used for this project was downloaded from: ``` * https://github.com/SiegeEngineers/halfon/blob/master/data/units_buildings_techs.de.json * https://github.com/SiegeEngineers/aoe2techtree/blob/master/data/data.json * https://github.com/SiegeEngineers/aoe2techtree/blob/master/data/locales/en/strings.json ``` A few duplicate(-ish) elements were removed from `units_buildings_techs.de.json`. The SiegeEngineers team on Github has a lot of cool stuff. You should check them out. The particular projects I took this from are called HALFON and aoe2techtree.