openzim / python-scraperlib

Collection of Python code to re-use across Python-based scrapers
GNU General Public License v3.0
18 stars 16 forks source link

Added ZIM Counter metadata parsing support #83

Closed rgaudin closed 2 years ago

rgaudin commented 2 years ago

Archive now supports .counters, .article_counter and .media_counter, providing respectively a parsed dict of the Counter metadata and libkiwix's calculations for articles and medias.

Implemented as copies of libkiwix code in a private module. Tests are duplicates of libkiwix's to ensure compatibility

Also adding an ignore rule for flake8. See https://github.com/psf/black/issues/315

codecov[bot] commented 2 years ago

Codecov Report

Merging #83 (e9f90d9) into master (9d3b500) will not change coverage. The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff            @@
##            master       #83   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           28        29    +1     
  Lines         1067      1140   +73     
=========================================
+ Hits          1067      1140   +73     
Impacted Files Coverage Δ
src/zimscraperlib/zim/_libkiwix.py 100.00% <100.00%> (ø)
src/zimscraperlib/zim/archive.py 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 9d3b500...e9f90d9. Read the comment docs.