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 runningkodb 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
Built Distribution
File details
Details for the file kodb-0.1.1.tar.gz
.
File metadata
- Download URL: kodb-0.1.1.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
Algorithm | Hash digest | |
---|---|---|
SHA256 | 53b64fe57f60cc064b9daf502cd0a4815ecfd9f532dca45e2804af81d2bacd69 |
|
MD5 | e0140996d12a825d8f5a66381c6ebc7c |
|
BLAKE2b-256 | 994d542f58fb343c91873fb628e3b2a159abd250bebf7f8ba86aa04b9d8bf8d2 |
File details
Details for the file kodb-0.1.1-py3-none-any.whl
.
File metadata
- Download URL: kodb-0.1.1-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
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5b427006cd42e00fdadadd9c67020b64f78cf25fa0ca9eeb4c1a50ceaeb8dab6 |
|
MD5 | 490e7395f5afcdcd5d59cf4249778148 |
|
BLAKE2b-256 | 0006b1dc2df70d18a570161caf3667628ac68bb42031e74328720acc16df63d5 |