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

Uploaded Source

Built Distribution

kodb-0.1.2-py3-none-any.whl (12.3 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: kodb-0.1.2.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.2.tar.gz
Algorithm Hash digest
SHA256 e0650ff1ec37ac22d92db122c13c622c3d8529a4ca8a7ac05b4cf1e2d79c6e6d
MD5 b959a18adbb75a742a95f3b124d02f43
BLAKE2b-256 32d929f7ca8e8358d1826f7aa2f8d278a2c1c18723486191f00192bbf49fb010

See more details on using hashes here.

File details

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

File metadata

  • Download URL: kodb-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 12.3 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.2-py3-none-any.whl
Algorithm Hash digest
SHA256 c192bb18f42b456b9cba7bec5948678309b0c87afcdfd9b9283205d00fa73e78
MD5 1e9cddb5421f6a7930d6acb395849bca
BLAKE2b-256 fa0b3df5ba3b375d7cbab1021854b0fd93196039faf3be349d15ed608ba2855c

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