Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support filtering a target of extracted files from archive #64

Merged
merged 9 commits into from
Feb 4, 2020

Conversation

miurahr
Copy link
Owner

@miurahr miurahr commented Feb 4, 2020

Introduce two methods for SevenZipFile object.

  • extract(path, targets_list): to support extracting filename filter.
  • reset()

When calling reset(), internal file pointer moves to begining of archive, then worker and decompressor are recreated. You can call extract() again, if you want.

Close: #58

- introduce extract() method for SevenZipFIle class.

Signed-off-by: Hiroshi Miura <miurahr@linux.com>
Signed-off-by: Hiroshi Miura <miurahr@linux.com>
Signed-off-by: Hiroshi Miura <miurahr@linux.com>
Signed-off-by: Hiroshi Miura <miurahr@linux.com>
@miurahr miurahr added this to the v0.6: Decryption support milestone Feb 4, 2020
@codecov
Copy link

codecov bot commented Feb 4, 2020

Codecov Report

Merging #64 into master will decrease coverage by 0.01%.
The diff coverage is 82.24%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #64      +/-   ##
==========================================
- Coverage   83.54%   83.52%   -0.02%     
==========================================
  Files           8        8              
  Lines        2169     2209      +40     
  Branches      356      361       +5     
==========================================
+ Hits         1812     1845      +33     
- Misses        228      236       +8     
+ Partials      129      128       -1
Flag Coverage Δ
#linux 79.65% <82.24%> (-3.2%) ⬇️
#mac 82.84% <82.24%> (+0.17%) ⬆️
#py35 79.65% <82.24%> (+0.23%) ⬆️
#py36 100% <ø> (+16.69%) ⬆️
#py37 100% <ø> (+16.69%) ⬆️
#py38 100% <ø> (+16.66%) ⬆️
#windows 100% <ø> (+19.08%) ⬆️
Impacted Files Coverage Δ
py7zr/helpers.py 87.2% <100%> (+3.38%) ⬆️
py7zr/archiveinfo.py 83.35% <76.66%> (-0.06%) ⬇️
py7zr/py7zr.py 83.51% <80%> (-0.34%) ⬇️
py7zr/compression.py 79.35% <81.08%> (+0.04%) ⬆️

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 31bea5e...13f7c63. Read the comment docs.

@miurahr
Copy link
Owner Author

miurahr commented Feb 4, 2020

Need to write test against 1) helper.calculate_key() with flag 0x3f, 2) test with 7z(bzip2), and 3) test with unsupported algorithm(PPMd) become unexpectedly failure.

Signed-off-by: Hiroshi Miura <miurahr@linux.com>
Signed-off-by: Hiroshi Miura <miurahr@linux.com>
Signed-off-by: Hiroshi Miura <miurahr@linux.com>
@miurahr miurahr self-assigned this Feb 4, 2020
@miurahr miurahr added enhancement New feature or request for extraction Issue on extraction, decompression or decryption labels Feb 4, 2020
@miurahr miurahr merged commit 42d7331 into master Feb 4, 2020
@miurahr miurahr deleted the topic-extraction-filter branch February 22, 2020 13:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request for extraction Issue on extraction, decompression or decryption
Projects
None yet
Development

Successfully merging this pull request may close these issues.

provide method for extracting specific files from an archive
1 participant