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.4.tar.gz (10.5 kB view details)

Uploaded Source

Built Distribution

kodb-0.1.4-py3-none-any.whl (12.5 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: kodb-0.1.4.tar.gz
  • Upload date:
  • Size: 10.5 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.4.tar.gz
Algorithm Hash digest
SHA256 fc3da79df8b6385e493956d276497c2dece5666a811eb982e956043f7a99ebcb
MD5 ea54b34ad7ea221a5883ec9dd13c81ae
BLAKE2b-256 9fe62101b41d53b17b63242a93afac0362e8462ae63d5b316fb4e2383fd528ae

See more details on using hashes here.

File details

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

File metadata

  • Download URL: kodb-0.1.4-py3-none-any.whl
  • Upload date:
  • Size: 12.5 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.4-py3-none-any.whl
Algorithm Hash digest
SHA256 af36858dfe2c90da658fb6ae4306c25e706b2393da1618135a24759fd551895a
MD5 561475599555d875a693d705c32c6451
BLAKE2b-256 f24c56c307d5fa7a2891d500ce7e9aedf4d440f7f3fe78cda624856ecf7e48f5

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