dsh-checkdigit v0.2.0
New tool: isbn_convert
- Convert ISBN-10 to ISBN-13 (prepend the 978 Bookland prefix, recompute the EAN-13 check digit) and ISBN-13 back to ISBN-10 (978 prefix only; 979-prefixed ISBN-13s have no ISBN-10 equivalent and are reported as such).
- The source check digit is verified before conversion;
Xcheck digits are supported (0-8044-2957-X→978-0-8044-2957-3). - Hyphen grouping from the input is preserved in the
formattedoutput.
New schemes
cas— CAS Registry Number (chemical substances): digit × position-from-right sum mod 10. Auto-detected in its hyphenatedXXXX-XX-Xshape (7732-18-5= water).aba— US ABA routing transit number: 3-7-1 weighted sum mod 10. Auto-detected for 9-digit values that satisfy the ABA check, before the CUSIP fallback (021000021,091000019, …).
Quality
- 67 tests green (16 new); all anchor values come from an independent Python implementation cross-checked against published real-world identifiers (water
7732-18-5, glucose50-99-7, real routing numbers, the Wikipedia ISBN worked example). - Zero runtime dependencies unchanged; dist committed for git installs.
Install / upgrade:
dsh plugin --profile web add github:TYEclipse/dsh-checkdigitdsh-checkdigit v0.2.0(中文)
新工具 isbn_convert
- ISBN-10 → ISBN-13(加 978 Bookland 前缀并重算 EAN-13 校验位)与 ISBN-13 → ISBN-10(仅 978 前缀;979 前缀无 ISBN-10 等价物,会如实报告)。
- 转换前先验证源校验位;支持
X校验位(0-8044-2957-X→978-0-8044-2957-3)。 - 输入的连字符分组在
formatted输出中保留。
新方案
cas—— CAS 化学文摘号:各位数×从右起位置求和模 10;连字符式XXXX-XX-X形态可自动识别(7732-18-5即水)。aba—— 美国银行路由号:3-7-1 加权和模 10;9 位数字通过 ABA 校验者自动识别(先于 CUSIP 兜底)。
质量
- 67 测试全绿(新增 16);全部锚点来自独立 Python 实现并与公开真实例交叉验证(水
7732-18-5、葡萄糖50-99-7、真实路由号、Wikipedia ISBN 示例)。 - 零运行时依赖不变;dist 已提交支持 git 安装。