standardebooks / tools

The Standard Ebooks toolset for producing our ebook files.
Other
1.42k stars 125 forks source link

Can we remove the leading 0 id check from lint? #121

Closed robinwhittleton closed 5 years ago

robinwhittleton commented 5 years ago

I was trying to fix it as it’s failing on ids that look like entry-1662-01-01 (from Pepys), but actually I’m not sure why the restriction on zeros is there in the first place? It was added in https://github.com/standardebooks/tools/commit/a606a51b644edbd793fbd58d7fe1deb519c4cdf5 but there’s no info on that particular check in the commit message.

acabal commented 5 years ago

We don't want leading zeros because in almost all cases we want IDs to be sequential, when possible, and matching their filename if possible. Leading 0s becomes confusing because sometimes they're there, sometimes they aren't, and how many are there can depend on how many items are in a sequence. In Pepys' case the IDs are not sequential so you can simply ignore the error.

robinwhittleton commented 5 years ago

OK, fair enough :)