ohare93 / brain-brew

Automated Anki flashcard creation and extraction to/from Csv
The Unlicense
89 stars 5 forks source link

A less hacky way to change the crowdanki_uuid in deck.json would be nice... #56

Open Starfish-Fujieda opened 1 week ago

Starfish-Fujieda commented 1 week ago

Really glad to see you're still working on this project.

I might be using this in a way you haven't considered. I have to make lots of decks for students, customized to their individual needs. So I have a template deck and accompanying TSV file. I init a brainbrew project with the template deck, substitute a kid's TSV and media files and build from source.

The problem is that in line 4 of the src/deck.json file, the new deck ends up having the same crowdanki_uuid as the template deck. The workaround is I have a little python script that generates a new UUID and I paste it manually.

It works and beggars can't be chooser and all that...but yeah.

ohare93 commented 1 week ago

Interesting use case! I’m on mobile just now so forgive my lacking answer 😅 I may have documented the following somewhere, but it’s difficult to find it on mobile.

I’m pretty sure your desired use case already exists as an override to the header deck part. https://github.com/ohare93/brain-brew/blob/master/brain_brew/build_tasks/overrides/headers_override.py One can pass

override:
    crowdanki_uuid: [student A’s ID]

Then just define one header for each student, which is permanently set in the build definition. Wouldn’t that work? 🙂

I’d be able to help much better with a link to or copy paste of the build file though 😁