#bookbrainz

/

      • Ankit_Matth joined the channel
      • Ankit_Matth has quit
      • jwillikers[m]
        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?
      • kellnerd[m]
        Nope, I am looking in Jira
      • monkey[m] looks in the MB codebase
      • He, there is BB-780 already
      • BrainzBot
        BB-780: “B0CQKH14BB” not recognised as valid ASIN https://tickets.metabrainz.org/browse/BB-780
      • Ankit_Matth joined the channel
      • jwillikers[m]
        Pending what MB has, here's what I've got, amazon\..*?/(?:\..*?/)*?([a-zA-Z\d]{10}) and for validation ^[a-zA-Z\d]{10}$
      • Ankit_Matth has quit
      • monkey[m]
        Here are the lines in MB codebase I see are related:
      • `([0-9B][0-9A-Z]{9})(?:[^0-9A-Z]|$)` from https://github.com/metabrainz/musicbrainz-serve... and another file
      • And this one from a "cat number looks like ASIN" report: https://github.com/metabrainz/musicbrainz-serve...
      • Perl for the first one, JS for the second
      • kellnerd[m]
      • monkey[m]
        I do see the starting "B" int here, but also the catch-all below deosn't have it
      • kellnerd[m]
        (GitHub's blame feature refuses to work, so I didn't find out when it has been changed)
      • I think "B" was historically used for books without ISBN-10
      • And as Amazon expanded it became a weird mess 😁
      • zemeles[m]
        I found info at a publisher's website about a book, it's various editions and the times it has been printed so far
      • Can I create a new edition for the various print dates based on the website?
      • Or should I only add books I own?
      • ApeKattQuest joined the channel
      • ApeKattQuest has quit
      • ApeKattQuest joined the channel
      • Ankit_Matth joined the channel
      • Ankit_Matth has quit
      • vardhan has quit