Skip to main content

kmaasrud's opinionated document builder

Project description

:page_facing_up: KODB - kmaasrud's Opinionated Document Builder

This is my personal and (extremely) opinionated document builder script, built around my personal document creation workflow.

When doing scientific writing, I write using pandoc and it's flavor of Markdown. I absolutely adore Pandoc, because of it's immense flexibility and simplicity, that comes without losing the power of LaTeX (if I lack any features, I simply write some inline LaTeX, and it will be parsed perfectly). However, some kind of LaTeX engine is necessary, which usually defaults to the rather bloated and messy TeXLive :vomiting_face: To solve this, I use Tectonic, an excellent and modernized LaTeX engine built in C and Rust (it's much faster). I also need an intuitive Markdown syntax for cross-referencing and to handle bibliography. For this I have a couple of preferred Pandoc filters I regularly use.

In total, this leads to quite a convoluted process, and to keep my head clear, the project requires a strict and clean directory structure. KODB automates everything for me, and ensures a consistent structure and workflow for my scientific writing. This also facilitates easier collaboration.

Installation

To run KODB, a working Python installation, including pip must be available. Install by running

sudo python -m pip install git+https://github.com/kmaasrud/kodb

If you have both Python 2 and 3 installed, be sure to run the above command with python3.

In addition, Tectonic and Pandoc need to be installed. On Debian-based systems, this can be done with these two commands (assuming a working rustup-installation is set up):

sudo apt-get install libfontconfig1-dev libgraphite2-dev libharfbuzz-dev libicu-dev libssl-dev pandoc zlib1g-dev

cargo install tectonic

Instructions for installing on other platforms is found on their respective websites.

Short tutorial

  • You start a document inside an existing directory by running kodb init or in a new directory by running kodb new <project name>.
  • Adding a new section to the document is as easy as running kodb add <section name>.
  • When you're ready to build the PDF, run kodb build.

The document sections are located in the src directory, and are written in Pandoc Markdown. They support cross-referencing through pandoc-xnos. As a ground rule, do not rename the Markdown-files, as this may cause issues. Assets (pictures, figures and similar), should be placed in the assets directory.

The metadata is described in the kodb.yaml file located in the root directory. Here the title of the document, the author(s), the date and more can be declared.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

kodb-0.1.0.tar.gz (10.3 kB view details)

Uploaded Source

Built Distribution

kodb-0.1.0-py3-none-any.whl (12.2 kB view details)

Uploaded Python 3

File details

Details for the file kodb-0.1.0.tar.gz.

File metadata

  • Download URL: kodb-0.1.0.tar.gz
  • Upload date:
  • Size: 10.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/53.1.0 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.9.2

File hashes

Hashes for kodb-0.1.0.tar.gz
Algorithm Hash digest
SHA256 0a09c5242140b360328cb054d4ae97bab51a78f0a2230e06e4225d5ffec3e396
MD5 9ccca7f102f68acb793acbb2a94db088
BLAKE2b-256 f957ef50bed460fef7e3dc605e4c908fc33fb526bd7d53d1deddb37225695f4d

See more details on using hashes here.

File details

Details for the file kodb-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: kodb-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 12.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/53.1.0 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.9.2

File hashes

Hashes for kodb-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 a4f899ed3c42058d2d9c23fe84dc8fa6da44327a30c05c6cab68c83f1b02e5b4
MD5 f1ec1689e9ee5f8681cb7631df194444
BLAKE2b-256 c5d433864346fb40c7c4c203bb73ceac1a151833140d54ac3b1e29c6bbcea832

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page