{"id":39172801,"url":"https://github.com/point8/minimize-ninja","last_synced_at":"2026-01-17T22:24:48.573Z","repository":{"id":223265991,"uuid":"757408180","full_name":"point8/minimize-ninja","owner":"point8","description":"MinimizeNinja. Compress Apple Keynote presentations files like a 🥷","archived":false,"fork":false,"pushed_at":"2024-02-19T14:38:04.000Z","size":25,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":8,"default_branch":"main","last_synced_at":"2024-02-20T10:55:21.184Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/point8.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2024-02-14T12:41:30.000Z","updated_at":"2024-02-19T14:19:18.000Z","dependencies_parsed_at":"2024-02-19T11:02:04.515Z","dependency_job_id":null,"html_url":"https://github.com/point8/minimize-ninja","commit_stats":null,"previous_names":["point8/minimize-ninja"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/point8/minimize-ninja","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/point8%2Fminimize-ninja","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/point8%2Fminimize-ninja/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/point8%2Fminimize-ninja/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/point8%2Fminimize-ninja/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/point8","download_url":"https://codeload.github.com/point8/minimize-ninja/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/point8%2Fminimize-ninja/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28520339,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-17T22:11:28.393Z","status":"ssl_error","status_checked_at":"2026-01-17T22:11:27.841Z","response_time":85,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2026-01-17T22:24:48.507Z","updated_at":"2026-01-17T22:24:48.567Z","avatar_url":"https://github.com/point8.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# MinimizeNinja\n\nMinimizeNinja. Compress Apple Keynote presentations files like a 🥷\n\n[**Try out!**](https://minimize.ninja/)\n\n## Abstract\n\nWe developed MinimizeNinja out of necessity, because Keynote does not allow creating proper-looking yet reasonably sized PDF files. For certain Keynote files, the resulting PDFs are either too large or they look shitty. You can even get the worst of both and end up with shitty-looking _and_ large files. 🎉\n\nMinimizeNinja is a Python-based command line tool that unpacks Keynote files, analyzes graphic files used inside the presentation and utilizes several optimizations to achieve a smaller Keynote file. Exporting PDFs from these reduced files results in smaller PDFs that still look good. \n\n## Details\n\nMinimizeNinja can be used to optimize Keynote files. Either to reduce the file size of the Keynote file itself (in order to keep this reduced yet still high quality Keynote file) or – more aggressively – to create an even smaller Keynote file with reasonable quality impact to export this to a small PDF file that can be send to other people via mail. In the latter case, keeping this reduced Keynote file is _not_ advisable as the graphics quality will be impacted.\n\nThese optimizations are performed:\n\n1. All TIFF files within the Keynote file are converted to JPEG and PNG, replacing the TIFF by the smaller of the latter. As TIFF files inside Keynote presentations are rarely compressed, this usually saves a lot of space.\n2. Optional, applicable for PDF export: All PNG files are test-converted to JPEG. In case the JPEG variant is smaller than the PNG, the JPEG is being kept. As PNG is a lossless file and JPEG uses lossy (and thus quality-degrading) compression, this will introduce some mild quality loss.\n3. All graphics are checked for the resolution they are used with inside the presentation. In case the image resolution is much larger than the used resolution within the presentation, the files are resized so that they still stay crisp on 4K/Retina displays, but do not waste space unnecessarily. E.g. if you add a 15 megapixel photo as a small stamp graphic inside a Keynote slide of 300 x 400 pixels, MinimizeNinja will resize the file to 600 x 800 pixels (reducing 15 MP -\u003e 0.5 MP).\n4. Image optmization packages like MozJPEG and Oxipng are run on all images. These tools try to compress the files even more, get rid of unnecessary metadata etc. In many cases, these tools can reduce files by additional 5–40% without losing quality.\n\n## Installation and Requirements\n\n### MozJPEG\n\nYou need to install MozJPEG:\n\n```\nbrew install mozjpeg\n```\n\nor using a nix-shell:\n\n```\nnix-shell -p mozjpeg\n```\n\nAfterwards, there will be a message telling you that mozjpeg is keg-only, which\nmeans it was not symlinked into /opt/homebrew. Therefore you need to execute the\nprinted line below to add the mozjpeg binaries to your $PATH.\n\n### PIP \nMake sure you have a somehwat recent version of pip installed and create a virtual environment. Then call \n\n```\npip install .\n```\n\nIf you're on an Apple Silicon Mac you might have to install `python-snappy` before installing this project. \n\n```\nCPPFLAGS=\"-I/opt/homebrew/include -L/opt/homebrew/lib\" pip install python-snappy\n```\n\n\n## Caveats\n\n- Depends on [`keynote_parser`](https://pypi.org/project/keynote-parser/) which in its most current version is not able to\n  unpack certain Keynote files in case these contain tables or charts.\n\n## Troubleshooting\n\n### Q: I get the message \"Unrecognized input file format --- perhaps you need -targa\"\n\nSometimes it happens that you get messages like \n\n```\nERROR    cjpeg was unable to run on ImageFile(…):\nERROR    Unrecognized input file format --- perhaps you need -targa \n```\n\nThis is an error message in case MozJPEG is not able to parse a certain JPEG\nfile for size optimization. Actually, the `-targa` hint is misleading in my\nexperience. These files are _not_ TARGA files and it is unclear to me why\nMozJPEG is not able to parse these files. In every case I checked, these files\nseemed perfectly fine and I could open them with every other tool I tried. You\ncan safely ignore these errors.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpoint8%2Fminimize-ninja","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpoint8%2Fminimize-ninja","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpoint8%2Fminimize-ninja/lists"}