Anki Compressor
Compresses images and audio in Anki .apkg files to reduce the overall file size.
Installation
anki-compressor can be installed with Pip, but it requires Pydub and Pillow which have native dependencies that need to be installed. You'll need to include support for libvorbis in the audio library, since all audio is converted to ogg and all images are converted to jpg.
Once you've installed those dependencies, run pip install anki-compressor to install the command line script.
Usage
usage: anki-compressor [-h] -i INPUT [-o OUTPUT] [-q QUALITY] [-b BITRATE]
Compress Anki .apkg file size
optional arguments:
-h, --help show this help message and exit
-i INPUT, --input INPUT
Input .apkg file to compress
-o OUTPUT, --output OUTPUT
Output file to write, defaults to MIN_<INPUT>
-q QUALITY, --quality QUALITY
Quality value for image compression (0-100), defaults to 50
-b BITRATE, --bitrate BITRATE
ffmpeg-compliant bitrate value for audio compression, defaults to 48k
Here's an example of compressing a file input.apkg and writing the output to output.apkg:
anki-compressor -i input.apkg -o output.apkg -q 50 -b 64k
Arguments
-i: Specifies the input file and is required-o: Output file name, defaults toMIN_<INPUT>-q: Image quality on a scale of 1-100 supplied to Pillow's image processing, defaults to 50-b: Bitrate for audio output, defaults to '48k'
Metadata
Release files for anki-compressor 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| anki-compressor-0.1.0.tar.gz | 5.1 kB | Without provenance | Details for anki-compressor-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| anki_compressor-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for anki_compressor-0.1.0-py3-none-any.whl |
Total release size: 10.4 kB
Release files / anki-compressor-0.1.0.tar.gz
| Download URL | anki-compressor-0.1.0.tar.gz |
|---|---|
| Size | 5.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
e19b920dc464f6103d0a36d69bae0ea7415d30bdf3f70bc780bfb994795f87a1
|
|
BLAKE2b-256 checksum How to use checksums |
0c20a850cb293d707fc28534e327d78f885194bd5d139a671a93ee2735ce9ff5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.2.0 pkginfo/1.6.1 requests/2.25.0 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.54.1 CPython/3.8.6
|
Release files / anki_compressor-0.1.0-py3-none-any.whl
| Download URL | anki_compressor-0.1.0-py3-none-any.whl |
|---|---|
| Size | 5.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
b5eafd1d75543a0fa017b72a2f05afadb360a804d2823c06e95535042aef5243
|
|
BLAKE2b-256 checksum How to use checksums |
907b0000d4a971e0efedbfaadae334a771bf0c5d78a549c77d0a6fb57abfbee6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.2.0 pkginfo/1.6.1 requests/2.25.0 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.54.1 CPython/3.8.6
|
Security for anki-compressor 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.