Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Assign card dues per individual card and not just note level #123

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

miniwa
Copy link

@miniwa miniwa commented Oct 20, 2023

Hi! My use case in Anki has me generating more than 1 card for every note in a model. But I also want to make sure the user sees the cards from a specific template before they see any cards generated by the next template.

Currently, this is not possible to do in genanki, as card dues can only be assigned per individual note level. The workaround is to create duplicate notes for each card type, but that leads to lots of duplicate information and is quite clunky to work with.

I tried my best to figure out a way to implement this without murdering your backward compatibility, it's not the cleanest but it does work. If you spot a way to do this with a cleaner API surface I'm all for that.

@codecov-commenter
Copy link

codecov-commenter commented Nov 12, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (0fa4f74) 95.41% compared to head (79a0c13) 95.54%.
Report is 3 commits behind head on main.

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #123      +/-   ##
==========================================
+ Coverage   95.41%   95.54%   +0.13%     
==========================================
  Files          11       11              
  Lines         327      337      +10     
==========================================
+ Hits          312      322      +10     
  Misses         15       15              
Files Coverage Δ
genanki/note.py 97.65% <100.00%> (+0.19%) ⬆️

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants