Typademic turns distraction freely written markdown files into beautiful PDFs.
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
.circleci
.github
docs
logs
tests
typademic
.coveragerc
.dockerignore
.gitignore
.travis.yml
CONTRIBUTING.rst
Dockerfile
LICENSE.rst
README.rst
app.py
docker-compose.yml
generate_ssl.sh
requirements.txt
secrets.example.env
setup.cfg
setup.py
tox.ini

README.rst

typademic

Typademic turns distraction freely written markdown files into beautiful PDFs. Built with love, Google Fonts, Pandoc, and LaTeX.

Docs CircleCI Build Status codecov Maintainability Requirements Status GitHub issues GitHub forks GitHub stars GitHub license

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

Prerequisites

Install all this to use all functions of typademic.

Mac with Homebrew

brew install python openssl mactex pandoc pandoc-citeproc wget

wget https://raw.githubusercontent.com/qrpike/Web-Font-Load/master/install.sh | bash

Ubuntu 18.04

  sudo apt-get update -y
  sudo apt-get install -y texlive-full wget

  wget https://raw.githubusercontent.com/qrpike/Web-Font-Load/master/install.sh | bash

  wget https://github.com/jgm/pandoc/releases/download/2.3.1/pandoc-2.3
.1-1-amd64.deb
  sudo dpkg -i pandoc-2.3.1-1-amd64.deb

  pip install --upgrade pip

Ubuntu 16.04

  sudo add-apt-repository ppa:jonathonf/python-3.6
  sudo apt-get update -y
  sudo apt-get install -y python3.6 texlive-full pandoc pandoc-citeproc wget

  wget https://raw.githubusercontent.com/qrpike/Web-Font-Load/master/install.sh | bash

  wget https://github.com/jgm/pandoc/releases/download/2.3.1/pandoc-2.3
.1-1-amd64.deb
  sudo dpkg -i pandoc-2.3.1-1-amd64.deb

  pip install --upgrade pip

Installing

virtualenv venv
source venv/bin/activate
pip install -r requirements.txt

Start the development server

python app.py

Running the tests

pip install tox
tox

Deployment (BEGINNER)

  1. Install Docker CE.
  2. Export your secrets and start the latest typademic docker image.
export GOOGLE_ANALYTICS=UA-YOURGOOGLECODE
export SECRET_KEY=SOMESECRETKEY
docker run --name typademic \
    -p 443:8000 \
    -e "GOOGLE_ANALYTICS=${GOOGLE_ANALYTICS}" \
    -e "SECRET_KEY=${SECRET_KEY}" \
    -v "/home/web/uploads" \
    -v "/home/web/logs" \
    maehr/typademic:latest
  1. Go to https://localhost/ (If you did not add valid SSL certificates, ignore the error message.)

Deployment (ADVANCED)

  1. Add your custom SSL certificates (key.pem and crt.pem) to the root directory. Otherwise private certificates will be issued.
  2. Create a secrets.env and add your env vars.
cp secrets.example.env secrets.env
nano secrets.env
  1. Change docker-compose.yml accordingly.
# uncomment this line for production use
# env_file: ./secrets.env

# comment this line for production use
environment:
  - GOOGLE_ANALYTICS=${GOOGLE_ANALYTICS}
  - SECRET_KEY=${SECRET_KEY}
  1. Start typademic and go to https://localhost/
docker-compose up

Built With

Contributing

Please read CONTRIBUTING.rst for details on our code of conduct, and the process for submitting pull requests to us.

Versioning

We use SemVer for versioning. For the versions available, see the tags on this repository.

Authors

  • Moritz Mähr - Initial work - maehr

See also the list of contributors who participated in this project.

License

This project is licensed under the MIT License - see the LICENSE.rst file for details

Acknowledgments