I've finally had enough of not being able to enter ASIN's where the third digit is a letter. Can someone point me to the place in the source where the ASIN is verified? I'd like to fix it.
vardhan joined the channel
vardhan has quit
vardhan joined the channel
monkey[m] joined the channel
monkey[m]
Hi jwillikers , the regular expressions used for identifier detection and validation are stored in the database.
Here's the ones used for ASIN: detection: `amazon\..*?/(?:\..*?/)*?(B\d{2}\w{7}|\d{9}[X\d])` and validation: `^(?:B\d{2}\w{7}|\d{9}[X\d])$`
If you come up with a fixed version you can post it here and tag me, and I will modify the database entry.
ApeKattQuest has quit
Ankit_Matth[m]
monkey: Just following up on my draft [proposal](https://community.metabrainz.org/t/gsoc-2025-proposal-for-new-calibre-plugin/752006). Still waiting for your valuable feedback for refinements...
monkey[m]
It's on my list Ankit_Matth , no need for reminders :)
Ankit_Matth[m]
monkey[m]: Sorry for the unintended reminder, and thanks for your response!
jwillikers[m]
<monkey[m]> "Hi jwillikers , the regular..." <- Is there some special significance for the ASIN starting with the letter B?
monkey[m]
Perhaps it is specifically a book-related regex? I have to say I did not write it and have no info regarding its origin or reasoning
That being said, that also means the regex is fairly old and things very well could have changed since with their numbering system
jwillikers[m]
I saw something about that on the web, but not sure it's reliable...
monkey[m]
That was just a guess, who knows if it is (or still is)
jwillikers[m]
I'll just go with what Wikidata uses for ASIN's
monkey[m]
Sounds like a reasonable approach, might be worth checking against existing ASINs in the database too.
kellnerd[m] joined the channel
kellnerd[m]
IIRC the ASIN regex for MBS has been updated a while ago, so we should better compare against that one as well.
monkey[m]
Interesting! Do you know where they are stored, by any chance?