openzim / devdocs

devdocs.io to ZIM scraper
GNU General Public License v3.0
2 stars 0 forks source link

Revisit default ZIM name and filename #15

Closed benoit74 closed 1 month ago

benoit74 commented 1 month ago

By default, the ZIM name (metadata) and filename (on disk) uses the pattern devdocs_{slug_without_version}_{version}.

This does not match our ZIM naming convention, especially since it uses the _ as separator where it has other meaning in our convention and is a bit ugly when the slug has no version (e.g. cpp). It also does not includes current year-month in ZIM filename.

Examples of default name and filename:

josephlewis42 commented 1 month ago

I think we can switch name to devdocs.io_en_{slug} e.g. devdocs.io_en_lua~5.4 or devdocs.io_en_cpp if we don't mind the tilde in the filename, if we do I add a {clean_slug} that replaces it with a dash.

We can also add a separate flag for file name and a {period} placeholder that's the current date in YYYY-MM format.

benoit74 commented 1 month ago

From openZIM naming convention:

The parts must only contain alphanums or - or . characters.

So I think that we "need" the {clean_slug} where you replace everything with does not match this with a -

And we also need the separate flag for file name indeed, with {period} placeholder

Thank you