Recreate mappings every time

This saves the user a little hassle and is very fast.
This commit is contained in:
Nate Bowman
2026-10-04 02:23:53 -04:00
parent 03ab8d72bc
commit 24f315c107
7 changed files with 28 additions and 65 deletions

View File

@@ -1,6 +1,5 @@
Project structure:
```
create-maps-from-namelist.py -- script for creating maps
data/ -- input files from AoE itself (taken from another project)
decks/ -- python scripts to create individual decks
* actual decks are not stored here
@@ -8,7 +7,6 @@ decks/ -- python scripts to create individual decks
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
maps/ -- mappings between names and numbers
namelists/ -- lists containing names to include for particular decks
settings.yaml -- controls where files are read from and written to
```
@@ -24,9 +22,8 @@ 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.
* Generate mappings for the data file from names to numbers and numbers to
names based on your namelist
* Create a deck using these mappings
* 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
@@ -43,8 +40,6 @@ Process:
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
* Run create-maps-from-namelist.py using your new deck-specific namelist
* This creates two files in output/generated-maps/
* 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