Raffaelbdl / kuma-browser

Add-on to use JPDB directly inside Anki
MIT License
8 stars 1 forks source link

Card Order #12

Open tobiasarens opened 2 months ago

tobiasarens commented 2 months ago

Hello, thank you very much for this usefull addon!

I have a question regarding the order of cards. After fetching a whole deck for a light novel (with the api key feature), which order are these cards in? I know that you can reorder them with using the frequency list, but I would like to have them in order of appearance (like on jpdb).

Do you know if it is possible? Maybe it is not possible to get the information from the API, but the "default" order does not seem to be the same as on jpdb.

Any thoughts?

Raffaelbdl commented 2 months ago

Hello, thank you for testing the addon !

Sadly I don't think I can access the information about how the cards are sorted using the API. At least it seems to not be random, but I cannot make sense of the order even by looking at the fields individually when generating the cards.

Here is the API https://jpdb.stoplight.io/docs/jpdb/mgsimhgxpjpqe-jpdb-io-public-api if you want to give it a look yourself I might have missed something :hugs: In practice I first call the "List deck vocabulary" api to obtain a list of Ids that I then use to call the "Lookup vocabulary". The order of the notes is the one from the "List deck vocabulary" call.

tobiasarens commented 1 month ago

Indeed it seems that the API does not offer this functionality. I wrote an email to jpdb to ask. I will post the response when I get one.