Skip to content

Releases: openzim/python-scraperlib

3.2.0

16 Dec 18:25
4dc3012
Compare
Choose a tag to compare

Added

  • Add utility function to compute/check ZIM descriptions #110

Changed

  • Using pylibzim 3.4.0

Removed

  • Support for Python 3.7 (EOL)

3.1.1

18 Jul 18:19
4f8c3cc
Compare
Choose a tag to compare

Changed

  • Fixed declared (hint) return type of download.stream_file #104
  • Fixed declared (hint) type of content param for Creator.add_item_for #107

3.1.0

05 May 10:17
Compare
Choose a tag to compare

Changed

  • Using pylibzim 3.1.0
  • ZIM metadata check now allows multiple values (comma-separated) for Language
  • Using yt_dlp instead of youtube_dl

Removed

  • Dropped support for Python 3.6

3.0.0

31 Mar 11:07
Compare
Choose a tag to compare

⚠️ Warning: this release introduce several API changes to zim.creator.Creator and zim.filesystem.make_zim_file

Added

  • zim.creator.Creator.config_metadata method (returning Self) exposing all mandatory Metdata, all standard ones and allowing extra text metdadata.
  • zim.creator.Creator.config_dev_metadata method setting stub metdata for all mandatory ones (allowing overrides)
  • zim.metadata module with a list of per-metadata validation functions
  • zim.creator.Creator.validate_metadata (called on start) to verify metadata respects the spec (and its recommendations)
  • zim.filesystem.make_zim_file accepts a new optional long_description param.
  • i18n.is_valid_iso_639_3 to check ISO-639-3 codes
  • image.probing.is_valid_image to check Image format and size

Changed

  • zim.creator.Creator main_path argument now mandatory
  • zim.creator.Creator.start now fails on missing required or invalid metadata
  • zim.creator.Creator.add_metadata nows enforces validation checks
  • zim.filesystem.make_zim_file renamed its favicon_path param to illustration_path
  • zim.creator.Creator.config_indexing language argument now optionnal when indexing=False
  • zim.creator.Creator.config_indexing now validates language is ISO- 639-3 when indexing=True

Removed

  • zim.creator.Creator.update_metadata. See .config_metadata() instead
  • zim.creator.Creator language argument. See .config_metadata() instead
  • zim.creator.Creator keyword arguments. See .config_metadata() instead
  • zim.creator.Creator.add_default_illustration. See .config_metadata() instead
  • zim.archibe.Archive.media_counter (deprecated in 2.0.0)

2.1.0

06 Mar 16:32
Compare
Choose a tag to compare

Added

  • zim.creator.Creator(language=) can be specified as List[str]. ["eng", "fra"], ["eng"], "eng,fra", "eng" are all valid values.

Changed

  • Fixed zim.providers.URLProvider returning incomplete streams under certain circumstances (from openzim/kolibri#40)
  • Fixed zim.creator.Creator not supporting multiple values in for Language metadata, as required by the spec

2.0.0

06 Dec 15:12
Compare
Choose a tag to compare
  • 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_count updated to match scraperlib's version
  • Archive.article_counter now deprecated. Now returns Archive.article_count
  • Archive.media_counter now deprecated. Now returns Archive.media_count

Removed

  • [libzim] lzma compression algorithm

1.8.0

03 Oct 11:18
Compare
Choose a tag to compare

Added

  • download.get_session() to build a new requests Session

Changed

  • download.stream_file() accepts a session param to use instead of creating one

1.7.0

03 Oct 11:15
Compare
Choose a tag to compare

Added

  • zim.Creator now supports ignore_duplicates: bool parameter to
    prevent duplicates from raising exceptions
  • zim.Creator.add_item, zim.Creator.add_redirect and zim.Creator.add_item_for
    now supports a duplicate_ok: bool parameter to prevent an exception
    should this item/redirect be a duplicate

1.6.3

03 Oct 11:15
Compare
Choose a tag to compare

Added

  • download.stream_file() supports passing headers (scrapers were already using it)

1.6.2

03 Oct 11:14
Compare
Choose a tag to compare

Changed

  • Fixed filesystem.get_content_mimetype() crashing on non-guessable byte stream