No description
Find a file
2014-10-13 14:12:25 +01:00
debian/DEBIAN Provide a --no-body option along with tests (closes ). 2014-10-12 21:17:06 +01:00
.gitignore Add basic Debian packaging ability. 2014-10-12 14:16:21 +01:00
email2pdf Improve precision of tests and fix exit code bug. 2014-10-12 21:52:41 +01:00
email2pdf_unittest Improve precision of tests and fix exit code bug. 2014-10-12 21:52:41 +01:00
getmailrc.sample Switch example to use SSL (secure by default). 2014-10-13 14:09:02 +01:00
jpeg444.jpg Attach and embed images (relates to issue ). 2014-10-05 00:08:12 +01:00
LICENSE.txt Add license. 2014-09-20 12:17:53 +01:00
Makefile 'clean' doesn't need to be a dependency of 'builddeb'. 2014-10-13 14:12:25 +01:00
README.md Add steps for developing and hacking. 2014-10-12 16:15:18 +01:00

email2pdf

Python script to convert emails to PDF from the command-line. Type email2pdf --help for more information on usage and options available.

Dependencies

  • wkhtmltopdf - if on Ubuntu, install the .deb from http://wkhtmltopdf.org/ rather than using apt-get to minimise the dependencies you need to install (in particular, to avoid needing a package manager).

  • getmail - getmail is not strictly a dependency, but when it is combined with email2pdf, it can be used to retrieve new emails from a remote IMAP server and automatically convert them to PDFs locally. The getmailrc.sample file in the repository can be used as a starting point for your own getmailrc to do this. Note that the sample will need editing, of course - see the getmail documentation for more information on that. Also, it is configured by default to delete remote emails from the server once they are converted - be careful with that. You might want to consider setting up your crontab something like this:

    @hourly getmail --verbose | logger
    

    This will ensure that getmail is invoked hourly to fetch email, and log its output to syslog.

Building & Packaging for Debian

Some basic Debian packaging is included. Simply run sudo apt-get install build-essential && make builddeb to build a Debian package.

Developing & Hacking

Debian

  • Install all the package dependencies listed in the control file.

OSX (instructions not yet complete)

  • Install Homebrew
  • brew install python3
  • pip3 install reportlab
  • pip3 install --allow-unverified magic --allow-external magic magic