Package: pdfebc-core
DocsContentsOverviewPurpose of the projectRequirementsInstallOption 1: Install from PyPi withpipOption 2: Clone the repo and the install withpipLicenseContributingOverviewpdfebcis planned to be a set of tools for compressing PDF files to e-reader friendly sizes,
and optionally sending them via e-mail to for example a Kindle. This package contains the core
functions that may be utilized by different user interfaces. Currently, I am planning to create
a CLI, a web interface and a desktop GUI. This is very much a practice project for me, but one
that is alos useful to me (at least the CLI version, the others are just practice).As an example use case, I mainly usepdfebcas an easy way to compress lecture slides and
similar study materials, send them to my Kindle and then clean up the output.Purpose of the projectThe core functionality ofpdfebc, along with a basic CLI, was already done when I started
this little project. As such, the main purpose here isn’t to provide the functionality,
but to do so in a robust way, with proper documentation, testing and continuous integration.
This is also an exercise in writing a program’s business logic in such a way so that any
interface can be slapped on top of it. This is also one of my first forays into using stuff likesphinx,Travis-CIandReadTheDocs, so there’s bound to be some weirdness here and
there. I am also diving deeper into how to usegitand trying new things, so the commit
history may suffer from some inconsistencies.RequirementsAside from the Python omdules listed inrequirements.txt, the following requirements must be
met:Python 3.6Strictly speaking, 3.5 should also work fine, but the tests use 3.6 features so the
build is only tested for 3.6.GhostscriptpdfebcrequiresGhostscriptfor the PDF compression. The default binary isgs,
but this can be specified via the CLI.A Gmail account (for sending e-mails)By default,pdfebcuses Google’s SMTP server to send e-mails. The program can however
be configured to use any SMTP server by maniupulating theconfig.cnffile (please see
thissample configurationfor formatting). Currently, the server must support TLS.InstallOption 1: Install from PyPi withpipThe latest release ofpdfebc-coreis on PyPi, and can thus be installed as usual withpip.
I strongly discourage system-widepipinstalls (i.e.sudo pip install <package>), as this
may land you with incompatible packages in a very short amount of time. A per-user install
can be done like this:Executepip install--userpdfebc-coreto install the package.Currently, you must add the configuration file manually. Please have a look at thesample configurationfile for details. Where to put the configuration file is
machine-dependent, and decided by theappdirspackage. Runapdirs.user_config_dir('pdfebc')in the Python interpreter to find the correct directory.
Note that you must first importappdirsfor it to be available in the interpreter.Note:When using a Gmail account, I strongly recommend
using anApp passwordinstead of the actual account password.Option 2: Clone the repo and the install withpipIf you want the dev version, you will need to clone the repo, as only release versions are uploaded
to PyPi. Unless you are planning to work on this yourself, I suggest going with the release version.Clone the repo withgit:git clonehttps://github.com/slarse/pdfebc-corecdinto the project root directory and install withpip.pip install--user., this will create a local install for the current user.Or justpip install .if you usevirtualenv.For development, usepip install-e.in avirtualenv.Currently, you must add the configuration file manually. Please have a look at thesample configurationfile for details. Where to put the configuration file is
machine-dependent, and decided by theappdirspackage. Runapdirs.user_config_dir('pdfebc')in the Python interpreter to find the correct directory.
Note that you must first importappdirsfor it to be available in the interpreter.Note:When using a Gmail account, I strongly recommend
using anApp passwordinstead of the actual account password.LicenseThis software is licensed under the MIT License. See thelicense filefile for specifics.ContributingI am currently not looking for contributions. At this point, this is a practice project for me,
and even if I were looking for outside help the test suite is nowhere near comprehensive enough
for that yet. Sorry!