Releases: openzim/python-scraperlib
Releases · openzim/python-scraperlib
v3.4.0
Added
zim.creator.Creator._log_metadata()to log (DEBUG) all metadata set on_metadata(prior to start()) #155- New utility function to confirm ZIM can be created at given location / name #163
Changed
- Migrate the VideoWebmLow and VideoWebmHigh presets to VP9 for smaller file size #79
- New preset versions are v3 and v2 respectively
- Simplify type annotations by replacing Union and Optional with pipe character ("|") for improved readability and clarity #150
- Calling
Creator._log_metadata()onCreator.start()if running in DEBUG #155
Fixed
- Add back the
--runinstalledflag for test execution to allow smooth testing on other build chains #139
3.3.2
3.3.1
3.3.0
Added
- New
disable_metadata_checksparameter inzimscraperlib.zim.creator.Creatorinitializer, allowing to disable metadata check at startup (assuming the user will validate them on its own) #119
Changed
- Rework the VideoWebmLow preset for faster encoding and smaller file size #122
- preset has been bumped to version 2
- when using an S3 cache, all videos using this preset will be reencoded and uploaded to cache again (it will replace the same file encoded with preset version 1)
- When reencoding a video, ffmpeg now uses only 1 CPU thread by default (new arg to
reencodeallows to override this default value) - Using openZIM Python bootstrap conventions (including hatch-openzim plugin) #120
- Add support for Python 3.12, drop Python 3.7 support #118
- Replace "iso-369" by "iso639-lang" library
- Replace "file-magic" by "python-magic" library for Alpine Linux support and better maintenance
Fixed
- Fixed type hints of
zimscraperlib.zim.Itemand subclasses, andzimscraperlib.image.optimization:convert_image
3.2.0
3.1.1
3.1.0
3.0.0
zim.creator.Creator and zim.filesystem.make_zim_file
Added
zim.creator.Creator.config_metadatamethod (returning Self) exposing all mandatory Metdata, all standard ones and allowing extra text metdadata.zim.creator.Creator.config_dev_metadatamethod setting stub metdata for all mandatory ones (allowing overrides)zim.metadatamodule with a list of per-metadata validation functionszim.creator.Creator.validate_metadata(called onstart) to verify metadata respects the spec (and its recommendations)zim.filesystem.make_zim_fileaccepts a new optionallong_descriptionparam.i18n.is_valid_iso_639_3to check ISO-639-3 codesimage.probing.is_valid_imageto check Image format and size
Changed
zim.creator.Creatormain_pathargument now mandatoryzim.creator.Creator.startnow fails on missing required or invalid metadatazim.creator.Creator.add_metadatanows enforces validation checkszim.filesystem.make_zim_filerenamed itsfavicon_pathparam toillustration_pathzim.creator.Creator.config_indexinglanguageargument now optionnal whenindexing=Falsezim.creator.Creator.config_indexingnow validateslanguageis ISO- 639-3 whenindexing=True
Removed
zim.creator.Creator.update_metadata. See.config_metadata()insteadzim.creator.Creatorlanguageargument. See.config_metadata()insteadzim.creator.Creatorkeyword arguments. See.config_metadata()insteadzim.creator.Creator.add_default_illustration. See.config_metadata()insteadzim.archibe.Archive.media_counter(deprecated in2.0.0)
2.1.0
Added
zim.creator.Creator(language=)can be specified asList[str].["eng", "fra"],["eng"],"eng,fra", "eng" are all valid values.
Changed
- Fixed
zim.providers.URLProviderreturning incomplete streams under certain circumstances (from openzim/kolibri#40) - Fixed
zim.creator.Creatornot supporting multiple values in for Language metadata, as required by the spec
2.0.0
- Using pylibzim v2.1.0 (using libzim 8.1.0)
Added
- [libzim]
Entry.get_redirect_entry() - [libzim]
Item.get_indexdata()to implement custom IndexData per entry (writer) - [libzim]
Archive.media_count
Changed
- [libzim]
Archive.article_countupdated to match scraperlib's version Archive.article_counternow deprecated. Now returnsArchive.article_countArchive.media_counternow deprecated. Now returnsArchive.media_count
Removed
- [libzim]
lzmacompression algorithm