{ "info": { "author": "Simon Lars\u00e9n", "author_email": "slarse@kth.se", "bugtrack_url": null, "classifiers": [], "description": "pdfebc - PDF ebook compressor\n*****************************\n\n`Docs`_\n\n.. image:: https://travis-ci.org/slarse/pdfebc.svg?branch=master\n :target: https://travis-ci.org/slarse/pdfebc\n :alt: Build Status\n.. image:: https://codecov.io/gh/slarse/pdfebc/branch/master/graph/badge.svg\n :target: https://codecov.io/gh/slarse/pdfebc\n :alt: Code Coverage\n.. image:: https://readthedocs.org/projects/pdfebc/badge/?version=latest\n :target: http://pdfebc.readthedocs.io/en/latest/?badge=latest\n :alt: Documentation Status\n.. image:: https://badge.fury.io/py/pdfebc.svg\n :target: https://badge.fury.io/py/pdfebc\n :alt: PyPi Version\n.. image:: https://img.shields.io/badge/python-3.6-blue.svg\n :target: https://badge.fury.io/py/pdfebc\n :alt: Supported Python Versions\n\n.. contents::\n\nOverview\n========\n``pdfebc`` is a CLI tool that uses ``Ghostscript`` to compress PDF documents to a size that befits \nan ebook reader, such as a Kindle. The CLI works by targeting a source and output directory (if \nnot specified by the user, defults to use ``.`` for source and ``pdfebc_out`` for output), and then\ncompresses all PDF files in the source directory and puts the results in the output directory. \nThere is also functionality for sending the compressed documents to a pre-configured e-mail \naddress using Google's SMTP server (which can easily be swapped for any SMTP server by editing \nthe source code, see **Requirements** below). Files that are less than 1 MB in size are not \ncompressed, as I have found that compressing such small files often leads to them increasing \nin size several times over instead (I have yet to figure out why). Do note that ``Ghostscript`` \nis fairly slow, so expect large files to take a while to compress.\n\nAs an example use case, I mainly use ``pdfebc`` as an easy way to compress lecture slides and \nsimilar study materials, send them to my Kindle and then clean up the output.\n\nPurpose of the project\n======================\nThe core functionality of ``pdfebc`` was already done when I started this little project. As \nsuch, the main purpose here isn't to provide the functionality, but to do so in a robust way, \nwith proper documentation, testing and continuous integration. It is, essentially, my first \nforay into using stuff like ``sphinx``, ``Travis-CI`` and ``ReadTheDocs``, so there's bound to be \nsome weirdness here and there. I am also diving deeper into how to use ``git`` and trying new\nthings, so the commit history is a bit inconsistent.\n\nRequirements\n============\n* Python 3.6\n - Strictly speaking, 3.5 should also work fine, but the tests use 3.6 features so the\n build is only tested for 3.6.\n* ``Ghostscript``\n - ``pdfebc`` requires ``Ghostscript`` for the PDF compression. The default binary is ``gs``,\n but this can be specified via the CLI.\n* A Gmail account (for sending e-mails)\n - By default, ``pdfebc`` uses Google's SMTP server to send e-mails. If you don't intend\n to use the send functionality, then you may disregard this requirement.\n - It is possible to use a different SMTP server by changing the ``SMTP_SERVER`` variable in the\n ``pdfebc.utils`` module. Note that TLS is enabled and will likely cause sending e-mails\n using a local server that does not have TLS impossible.\n\nInstall\n=======\nOption 1: Install from PyPi with ``pip``\n----------------------------------------\nThe latest release of ``pdfebc`` is on PyPi, and can thus be installed as usual with ``pip``.\nI strongly discourage global ``pip`` installs (i.e. ``sudo pip install ``), as this\nmay land you with incompatible packages in a very short amount of time. A per-user install\ncan be done like this:\n\n1. Execute ``pip install --user pdfebc`` to install the package.\n2. Type ``echo \"$PATH\"`` and verify that ``$HOME/.local/bin`` is on the ``PATH``.\n - If it is not, add it by adding ``export PATH=\"$PATH:$HOME/.local/bin`` to your shell configuration\n file (e.g. ``$HOME/.bashrc`` for ``bash``).\n - Then execute ``source ``\n3. Currently, you must add the configuration file manually. Please have a look at the\n `sample configuration`_ file for details. To find out where to place the file, run \n ``pdfebc -h``. This should cause a message to appear, telling you where to put the file.\n This lazy way of handling the setup of the configuration will be replaced with a step-by-step\n config creator in version ``0.3.0``. **Note:** When using a Gmail account, I strongly recommend\n using an `App password`_ instead of the actual account password.\n4. Verify the installation by executing ``pdfebc -h``. You should see usage information printed to stdout,\n with no errors.\n\nOption 2: Clone the repo and the install with ``pip``\n-----------------------------------------------------\nIf you want the dev version, you will need to clone the repo, as only release versions are uploaded\nto PyPi. Unless you are planning to work on this yourself, I suggest going with the release version.\n\n1. Clone the repo with ``git``:\n - ``git clone https://github.com/slarse/pdfebc``\n2. ``cd`` into the project root directory and install with ``pip``.\n - ``pip install --user .``, global installs are not recommended.\n - Or just ``pip install .`` if you use ``virtualenv``.\n - For development, use ``pip install -e .`` in a ``virtualenv``.\n3. Currently, you must add the configuration file manually. Please have a look at the\n `sample configuration`_ file for details. To find out where to place the file, run \n ``pdfebc -h``. This should cause a message to appear, telling you where to put the file.\n This lazy way of handling the setup of the configuration will be replaced with a step-by-step\n config creator in version ``0.3.0``. **Note:** When using a Gmail account, I strongly recommend\n using an `App password`_ instead of the actual account password.\n4. Verify the installation by executing ``pdfebc -h``. You should see usage information printed to stdout,\n with no errors.\n\nLicense\n=======\nThis software is licensed under the MIT License. See the `license file`_ file for specifics.\n\nContributing\n============\nI am currently not looking for contributions. At this point, this is a practice project for me,\nand even if I were looking for outside help the test suite is nowhere near comprehensive enough\nfor that yet. Sorry!\n\nTODO\n====\n* Improve code coverage.\n* Add more negative tests.\n\n.. _Docs: http://pdfebc.readthedocs.io/en/latest/\n.. _App password: https://support.google.com/accounts/answer/185833?hl=en\n.. _license file: LICENSE\n.. _sample configuration: config.cnf\n", "description_content_type": null, "docs_url": null, "download_url": "https://github.com/slarse/pdfebc/archive/v0.2.0.tar.gz", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/slarse/pdfebc", "keywords": "", "license": "MIT License\n\nCopyright (c) 2017 Simon Lars\u00e9n\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n", "maintainer": "", "maintainer_email": "", "name": "pdfebc", "package_url": "https://pypi.org/project/pdfebc/", "platform": "", "project_url": "https://pypi.org/project/pdfebc/", "project_urls": { "Download": "https://github.com/slarse/pdfebc/archive/v0.2.0.tar.gz", "Homepage": "https://github.com/slarse/pdfebc" }, "release_url": "https://pypi.org/project/pdfebc/0.2.0/", "requires_dist": null, "requires_python": "", "summary": "Application to compress PDF documents into an ebook reader-friendly size.", "version": "0.2.0" }, "last_serial": 2942854, "releases": { "0.1.0": [ { "comment_text": "", "digests": { "md5": "60f18c24fdf803a054a25b8e0598b612", "sha256": "4bd14dc25f1c5b7941f3520d0c99e4c010b82a0477e8707cdabf07b362fb7786" }, "downloads": -1, "filename": "pdfebc-0.1.0.tar.gz", "has_sig": false, "md5_digest": "60f18c24fdf803a054a25b8e0598b612", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7865, "upload_time": "2017-06-04T19:17:42", "url": "https://files.pythonhosted.org/packages/ea/fd/641e753cb29861b6f05d221444d1a8b111831d63cb71002f88d66ef0ec07/pdfebc-0.1.0.tar.gz" } ], "0.1.1": [ { "comment_text": "", "digests": { "md5": "960901a532889f8513717a57d1c109b7", "sha256": "943382670fed516d2dd7adaac57cccd82f87fda089506a45530902a83aaf3e44" }, "downloads": -1, "filename": "pdfebc-0.1.1.tar.gz", "has_sig": false, "md5_digest": "960901a532889f8513717a57d1c109b7", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8624, "upload_time": "2017-06-04T19:39:16", "url": "https://files.pythonhosted.org/packages/ea/e4/d4d216ffe9e84ad8236dfe3696079078dcac4113bfda59dffa0f63eb4b13/pdfebc-0.1.1.tar.gz" } ], "0.1.2": [ { "comment_text": "", "digests": { "md5": "1c1e14487303bac344c3e3ad90a8d6dd", "sha256": "d84fd11fab156d58c63fc72a8223f0120ab483d6d96f12254842a99092cfb879" }, "downloads": -1, "filename": "pdfebc-0.1.2.tar.gz", "has_sig": false, "md5_digest": "1c1e14487303bac344c3e3ad90a8d6dd", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8982, "upload_time": "2017-06-06T12:11:49", "url": "https://files.pythonhosted.org/packages/e9/5f/66ea9a95b2c1491816f9f72efaceab04c4f8da2e0e4d874d74a6b9ff5255/pdfebc-0.1.2.tar.gz" } ], "0.2.0": [ { "comment_text": "", "digests": { "md5": "b68b3de519e1268867161da75d5379ed", "sha256": "7032105d25bb8a5d84fd694d4630a8d3c174ce9a860d70386d5c382eee60add9" }, "downloads": -1, "filename": "pdfebc-0.2.0.tar.gz", "has_sig": false, "md5_digest": "b68b3de519e1268867161da75d5379ed", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 14728, "upload_time": "2017-06-11T22:42:54", "url": "https://files.pythonhosted.org/packages/64/07/34dbeaca5bc2cc9c3fd81b6a1248029428711f7f17d7bd90f86bace1099e/pdfebc-0.2.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "b68b3de519e1268867161da75d5379ed", "sha256": "7032105d25bb8a5d84fd694d4630a8d3c174ce9a860d70386d5c382eee60add9" }, "downloads": -1, "filename": "pdfebc-0.2.0.tar.gz", "has_sig": false, "md5_digest": "b68b3de519e1268867161da75d5379ed", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 14728, "upload_time": "2017-06-11T22:42:54", "url": "https://files.pythonhosted.org/packages/64/07/34dbeaca5bc2cc9c3fd81b6a1248029428711f7f17d7bd90f86bace1099e/pdfebc-0.2.0.tar.gz" } ] }