genanki icon indicating copy to clipboard operation
genanki copied to clipboard

[FEATURE REQUEST] Generate due date order

Open darigovresearch opened this issue 4 years ago • 9 comments
trafficstars

Currently when generating decks with genanki all the cards have the due date/order of 0. This can be seen when viewing the deck in the browser.

Would be great to auto-generate the due order within the code if possible or to be able to set the start so that it would start counting from the value given instead of zero.

This is particularly helpful when auto generating flashcards for a course where learning order makes it easier to learn.

Again, would be happy to do a pull request if given guidance on where to insert what in the relevant sections of the codebase.

darigovresearch avatar Mar 21 '21 21:03 darigovresearch

I just tested this locally and it should be fairly straightforward -- we just need to be able to pass due as an argument to Card::write_to_db: https://github.com/kerrickstaley/genanki/blob/fc8148ab5cabeb16e8957ebb3e7d8ec48bed7cf5/genanki/card.py#L6-L27

z1lc avatar May 15 '21 00:05 z1lc

Quick PR to prove out the idea: https://github.com/kerrickstaley/genanki/pull/80

z1lc avatar May 15 '21 01:05 z1lc

@z1lc thanks for taking a look and for making a pull request, there appears to be an error in the pull request. Could you take a look and see if you can resolve it?

It may help to make it easier to merge your pull request

darigovresearch avatar May 15 '21 11:05 darigovresearch

The Travis checks were erroring out and I've switched this repo to use GitHub Actions anyway. I disabled Travis on master and merged master into @z1lc's branch, and it looks like tests are passing now. I'll review the PR.

kerrickstaley avatar May 20 '21 06:05 kerrickstaley

@kerrickstaley I think we can close this issue thanks to our PR? Forgot to mention it in the description so this wasn't auto-resolved.

z1lc avatar Aug 01 '21 03:08 z1lc

How does the due field work? I attempted to set it to the number of days until the card is due using an integer, but when I import the deck into Anki, all cards are marked as "New". Is this a bug or do I have to mark the cards specifically as being "not-new"?

timo-berg avatar Nov 08 '22 09:11 timo-berg