Randomize buried duration between a range

Is your feature request related to a problem? Please describe.
I have certain cards (Notes with different content) that I deem siblings and so wouldn’t want them all (may be two a day is fine) to be showing up in the same day.

During review, I consistently bury these cards if “enough” have been encountered earlier in the same day. After the days review, I obviously wouldn’t want all the said buried cards to appear the following day (will end up doing the same burying exercise) since buried cards appear the following day by default; so, I select all the the buried cards and set a due date for them using a range (say 1-5). This is done with the hope the affected cards will be randomly dispersed in the future with the given range.

For the most part the approach works, but sometimes I forget to disperse the buried cards and they all show up with reviews the following day.

Describe the solution you’d like
Perhaps, burying can have a range setting attached to it (eg. 1-5) such that, each time I hit bury for a given card, a random duration within the specified range is assigned to the card instead of the 1 day default for all buried cards.

1 Like

It may not be exactly what you’re describing, but in spirit I believe this is essentially the function of the ‘disperse siblings’ function of the FSRS Helper add-on:

https://ankiweb.net/shared/info/759844606

image

“Siblings”, as defined in what you refer to, does not apply in my case. Like I mentioned, cards that am calling siblings do not come from the same note (the content does vary).

Ah, sorry I missed that detail.

May or may not solve your problem but you can reschedule a card and give a range

Obviously it’s not exactly what you’re looking for, but might help in any case. I do this often enough that I have it mapped to a remote key and it’s a cinch. :slight_smile:

I currently do same as described.

During review, I consistently bury these cards if “enough” have been encountered earlier in the same day. After the days review, I obviously wouldn’t want all the said buried cards to appear the following day (will end up doing the same burying exercise) since buried cards appear the following day by default; so, I select all the the buried cards and set a due date for them using a range (say 1-5). This is done with the hope the affected cards will be randomly dispersed in the future with the given range.

I would one day like to see the ability to set non-sibling cards are “siblings” (perhaps we’ll need a better term).

Then it becomes a one-time operation, you just set the cards siblings for once and it becomes sibling.


Actually, @Sweetins can you not merge all these different notes together? You’ll need a new note type that can contain all the relevant information together. Well, even if there is no explicit structure to the information I have an idea how to do this (have seperate fields for c1, c2, etc. in a cloze note type and use conditional replacements to show only the relevant fields).

Actually, @Sweetins can you not merge all these different notes together? You’ll need a new note type that can contain all the relevant information together. Well, even if there is no explicit structure to the information I have an idea how to do this (have seperate fields for c1, c2, etc. in a cloze note type and use conditional replacements to show only the relevant fields)

The number of cards I deem as siblings in a given instance vary widely (can go like 100 cards or more) and each card comes from a note containing 22 fields. Can’t really begin to think how such a merged note will look like.

I randomize my review and only begin to bury members of a given sibling group when I have seen enough for the day. Seeing too many of a group (above say 3) makes it easy in some cases to predict the others.

Source Siblings Bury (Cousins) works somehow but it doesn’t yet accommodate enough flexibilities as I would prefer if am doing it manually.

I believe this idea has been around for a while… has there been any particular reason why siblings always have to come from the same note?

I don’t know but my best guess is because the process would be cumbersome so not a lot of people would actually find any use of this.

My guess is that it’s the technical implementation difficulty that’s the stopper here; it so often is.

I guess it the same reason why cards can be buried for just but a day. Hmm

It been attempted in an add-on but it just lacks the spices FSRS brings to bare

Even if you can convince dae that this is a good idea, it won’t be done unless someone comes in with the actual code. So, there’s that too.

Just realised there is such thing as User Action Button (Setting>Appearance>App bar
button) on Ankidriod.

Could this be configured to Set Due Date (Between a range 1-5) for cards on the go when pressed during review?

User Actions are defined in JS on card templates – AnkiDroid User Manual. I’m not sure whether they can access card management functionality.

Just realised there is such thing as User Action Button (Setting>Appearance>App bar
button) on Ankidriod.

Could this be configured to Set Due Date (Between a range 1-5) for cards on the go when pressed during review?

Setting due date in a button

Yes, you could actually define a function in the card template that sets due date (AnkiDroid JS API reschedule-card-with-x-days) to whatever you want.

  • Note that this is a manual reschedule and not burying so it’ll be more effort to undo it compared to burying. You should be able to undo a single reschedule immediately after doing it during review but there’s no button to undo all manual reschedules made recently like there is for unburying. You’d have to search for all the cards you rescheduled and reschedule them again.

  • Right now this API is only on AnkiDroid, the desktop addon that tries to mirror it only has a portion of the API functions, namely those that fetch data and none of the ones that make edits: GitHub - krmanik/AnkiJS-API: Anki JavaScript API to get cards informations in reviewer window

User actions

You don’t necessarily need to use the User actions on AnkiDroid. Those are for assigning a function to physical button or gesture on your phone or controller. If you just want a button in the card template that you tap/click, you don’t need to assign the function to a user action variable, you’d instead create a <button> in your template with the function on its onclick

1 Like

I believe it should be straightforward but forgive me for asking; do you mean I just need to put some like <button onclick="api.ankiSetCardDue(5);">Reschedule card in 5 days</button> in both my front and back template and thats it? Am a bit of a novice.

If I wanted a range as I mentioned, would I then just have to put 1-5 in place of the 5?

Actually not entirely straightforward. AnkiDroid JS API requires some setup code: AnkiDroid Javascript API · ankidroid/Anki-Android Wiki · GitHub
Fortunately in this case you don’t need to deal with Promises like you would with the API functions that return a value.

Then, to set a random number, you’ll need to add some more javascript.

You can fill in the email in developer: "your@email.here" part in the below code, if you want, but actually the only requirement there is that it’s not empty.


<button class="due-date-btn" onclick="setCardDue(randomIntegerBetween(1,5));">
  Reschedule card in 1-5 days
</button>

<script>
  try {
    var jsApiContract = { version: "0.0.3", developer: "your@email.here" };
    var api = new AnkiDroidJS(jsApiContract);
  } catch {
    // If we are not on AnkiDroid, hide the button since it won't work
    document.querySelector(".due-date-btn").style.display = "none";
  }

  function setCardDue(due) {
    try {
      // AnkiDroid
      api.ankiSetCardDue(due);
    } catch {
      // desktop, except that this doesn't exist yet in the addon https://github.com/krmanik/AnkiJS-API :(
      // pycmd(`AnkiJS.ankiSetCardDue(${due})`);
    }
  }

  function randomIntegerBetween(start,end) {
    return Math.floor(Math.random() * (end - start + 1)) + start;
  }
</script>

Next time when AnkiDroid updates the JS API version from 0.0.3 to 0.0.4 you’ll see a prompt when reviewing to go and update the version number (and fix code that’s broken if they changed how the API works).

Feel like this could be done by allowing tags to be toggled as “sibling.” Tag all the related cards with whatever label, right-click the tag and toggle “sibling.”

3 Likes

Quite unfortunate… didn’t take long for me to realize I will equally need that as well. Thanks all the same. Much grateful.