kerrickstaley / genanki

A Python 3 library for generating Anki decks
MIT License
1.99k stars 150 forks source link

Generate random id if not id passed #98

Closed Bapt5 closed 2 years ago

Bapt5 commented 2 years ago

@kerrickstaley I coded this functionality to allow the user to generate a random id if he wants to create different decks at each execution which is my case.

kerrickstaley commented 2 years ago

I don't think this is a good default. If we generate random deck IDs for users when they do not pass an ID, then they will not understand the importance of having a fixed deck ID.

If you want a random deck ID each time, it's easy enough to pass random.randrange(1 << 30, 1 << 31) yourself when constructing the Deck.

Hope this makes sense :)

Bapt5 commented 2 years ago

@kerrickstaley No It don't make sense. In my case it's useless to have a unique id.

Bapt5 commented 2 years ago

@kerrickstaley I think I will create my own library with useful functionalities because you don't want to ask other people's proposals.