fbngrm / anki-pdf

Convert anki decks to PDF documents

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

anki-pdf

anki-pdf converts anki-decks to PDF files.

Features

  • Chose fields from your anki-cards and format them individually
  • Front and back sides of the cards can be configured and formatted
  • Supports image embedding
  • Different strategies for overflowing text

Installation

go get https://github.com/fbngrm/anki-pdf

Binaries will be located in the anki-pdf/bin directory. Builds use the latest commit hash of the master branch or tag.

cd anki-pdf
make build
./bin/anki-pdf --version

Install the program in your $GOPATH.

cd anki-pdf
make install
anki-pdf --version

Generate a PDF

Two input files are required to generate a PDF file.

  1. A JSON representation of your anki-deck, generated with CrowdAnki
  2. A YAML configuration file which tells teh program how to render the PDF.

CrowdAnki

Follow the export instructions to create the JSON file.

Configuration

The example/ directory contains configuration files which should be used as a starting point.

anki-pdf -c path/to/anki-deck.yaml -a path/to/anki-deck.json -f path/to/fonts [-m path/to/media]

Fonts

To add new fonts, follow the instructions of gofpdf. If you use UFT-8 encoded text, set utf8: true in the configuration file of the anki-deck.

Error reports

Before the program terminates, an error report will be printed. To optimize the formatting and reduce overflow errors, adjust the configuration for the overflowing fields or chose a different error handling strategy.

About

Convert anki decks to PDF documents


Languages

Language:Go 96.9%Language:Makefile 3.1%