Expand description
Code for cleaning up ISBNs.
This module contains two families of functions:
- The simple character-cleaning functions clean_isbn_chars and clean_asin_chars.
- The full multi-ISBN parser parse_isbn_string.
When a string is a relatively well-formed ISBN (or ASIN), the character-cleaning functions are fine. Some sources, however (such as the Library of Congress) have messy ISBNs that may have multiple ISBNs in one string, descriptive tags, and all manner of other messes. The multi-ISBN parser exposed through parse_isbn_string supports cleaning these ISBN strings using a PEG-based parser.
Modules§
Structs§
- Single ISBN parsed from a string.
Enums§
- Result of parsing an ISBN string.
Statics§
- IGNORES 🔒Regular expressions for unparsable ISBN strings to ignore. This cleans up warning displays.
Functions§
- Crude ASIN cleanup.
- Crude ISBN cleanup.
- Parse an ISBN string.