aboutsummaryrefslogtreecommitdiff
path: root/debug
diff options
context:
space:
mode:
authorCraig Jennings <c@cjennings.net>2026-05-29 18:45:11 -0500
committerCraig Jennings <c@cjennings.net>2026-05-29 18:45:11 -0500
commit506ab6e7f7b41097aaa832d168bd427788be3296 (patch)
tree930a079a148c5a0020b3d1901e681240d15a0103 /debug
parentbb28cfa331d3cba9ae9f265f7c448b5bd6b4fa6c (diff)
downloadrulesets-506ab6e7f7b41097aaa832d168bd427788be3296.tar.gz
rulesets-506ab6e7f7b41097aaa832d168bd427788be3296.zip
feat(scripts): add drill-to-anki.py template script (org-drill to Anki .apkg)
Generalizes the health-drill-to-anki.py converter into a template script under claude-templates/.ai/scripts/. Every project's startup rsync now picks it up at .ai/scripts/drill-to-anki.py. The converter walks an org-drill file. Top-level * Section headings become Anki tags. Each ** Card name :drill: entry becomes a card with the heading as Front and the body as Back (newlines converted to <br>). Parameterized from the original health-specific version: - Input file is a positional argument (was hardcoded health-drill.org). - Deck name defaults to the org file's #+TITLE if present, else the input basename in Title Case (was hardcoded "Health Drill"). - Output path defaults to ~/sync/org/drill/<input-basename>.apkg (was hardcoded health-drill.apkg in the same dir). - Deck and model IDs are derived from the deck name via SHA-256, so re-running against the same source produces stable IDs. Anki imports update existing cards in place rather than duplicating. Dependencies via PEP 723 inline script metadata. The shebang is #!/usr/bin/env -S uv run --script. First run resolves and caches genanki>=0.13. Subsequent runs are instant. There is no venv to maintain and no PEP 668 friction. Smoke tested against ~/projects/health/health-drill.org. The script wrote 43 cards into the Health Drill deck, matching the original script's output. Inbox source: 2026-05-29-1114-from-health-todo-b-org-drill-anki-export-updated.org. Craig confirmed all projects will likely have org-drill files, justifying template-tier promotion.
Diffstat (limited to 'debug')
0 files changed, 0 insertions, 0 deletions