Skip to main content

Repacks existing (un)compressed files for higher compression

Project description

About
=====

This tool and library were written to optimize Microsoft Word / Libreoffice ZIP based files. It uses 7-Zip, jpegoptim
and pngquant and recompresses not only host zip file but also all images and other suitable files inside it.

============
Installation
============

At the command line::

$ pip install filerepack

Or, if you don't have pip installed::

$ easy_install filerepack

If you want to install from the latest sources, you can do::

$ git clone https://github.com/ivbeg/filerepack.git
$ cd filerepack
$ python setup.py filerepack




============
Command line
============

Usage: frepacker.py FILENAME

docx to csv convertor (http://github.com/ivbeg/filesrepack)
Repacks ZIP and ZIP'based files and images for better compression

Use command: "frepacker.py <filename>" to run recompression.

Examples
========
frepacker.py CP_CONTRACT_160166.docx

Recompresses CP_CONTRACT_160166.docx including all zip files, images and so on


Code
====


Repacks presentation file "some_presentation.pptx
>>> from filerepack import FileRepacker
>>> rp = FileRepacker()
>>> stats = rp.repack_zip_file(filename="some_presentation.pptx")


Recursively repacks all images .jpg and .png files in directory "some_media_path"
>>> from filerepack import FileRepacker
>>> rp = FileRepacker()
>>> stats = rp.pack_images('some_media_path', recursive=True)



Requirements
============
It works in both Windows and Linux environments.
You need to install 7Zip, jpegoptim and pngquant in your OS PATH settings.


Acknowledgements
================


.. :changelog:

History
=======


0.1.0 (2018-01-14)
------------------
* First public release on PyPI and github code


Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

filerepack-0.1.0.tar.gz (5.1 kB view details)

Uploaded Source

Built Distributions

filerepack-0.1.0-py3.6.egg (10.3 kB view details)

Uploaded Source

filerepack-0.1.0-py3.4.egg (9.8 kB view details)

Uploaded Source

filerepack-0.1.0-py2.py3-none-any.whl (8.0 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file filerepack-0.1.0.tar.gz.

File metadata

  • Download URL: filerepack-0.1.0.tar.gz
  • Upload date:
  • Size: 5.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for filerepack-0.1.0.tar.gz
Algorithm Hash digest
SHA256 6f9705ccf940c17f70c85bf1ac58b1551436be2cd440a3cb608a39315cd13901
MD5 b9baa98f7dc2936b18e21615a52215b3
BLAKE2b-256 3f9550e0e4ded8c38a98651848c7ee28870c61396dbdda6d4b449e37f248bc15

See more details on using hashes here.

File details

Details for the file filerepack-0.1.0-py3.6.egg.

File metadata

File hashes

Hashes for filerepack-0.1.0-py3.6.egg
Algorithm Hash digest
SHA256 3e9bf39e5b89a122afbdfc187cc9f55288db55ebbcf4e298c133e898bdcbe6da
MD5 c01c86b14acc0c4ab4a19b1a86a68fb3
BLAKE2b-256 fd794e4c4a7f4f1b1f7acb7e7e30d1ba7fb1a4a2966eaa7c7ec37084ba1d6ad3

See more details on using hashes here.

File details

Details for the file filerepack-0.1.0-py3.4.egg.

File metadata

File hashes

Hashes for filerepack-0.1.0-py3.4.egg
Algorithm Hash digest
SHA256 4071b3528e82492246f8cf522a993a93fac6dc666db5669965bdd6ea77e7e020
MD5 c534a27d8e2c280e11d13b517d044e73
BLAKE2b-256 4f15d13a01bfba06b85724415c8a3ac7ef015376de667ec64a9627385d393ecc

See more details on using hashes here.

File details

Details for the file filerepack-0.1.0-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for filerepack-0.1.0-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 04e2fd86edea58235fde21fa9d518e00b6cbbbf9a46acba1aa3696ea817e4006
MD5 608d016d783dec4faa3a85bafc58d46c
BLAKE2b-256 64fcb1ccb31cc49d0e2bc883c88651fa0aed76f7973fb14402df42c4faf4f4cc

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page