View your notes as a static html site. https://notes.alv.cx
This repository has been archived on 2024-01-02. You can view files and clone it, but cannot push or open issues or pull requests.
Go to file
2021-06-29 20:23:20 +01:00
templates add extra content to notes landing page 2021-06-29 19:06:34 +01:00
.gitignore add .gitignore 2021-06-29 14:11:30 +01:00
.notes2web.conf add development config 2021-05-01 13:05:22 +01:00
Makefile fix makefile 2021-06-29 14:58:22 +01:00
notes2web.py add ability to manually set/override index.html contents with a markdown file 2021-06-29 20:23:20 +01:00
readme.md remove yq from readme.md 2021-06-29 19:28:21 +01:00
requirements.txt convert script to python 2021-06-29 14:35:21 +01:00
screenshot.png add yq depencency, screenshot 2021-05-01 12:04:45 +01:00
styles.css add blockquote styling 2021-06-29 19:04:42 +01:00

notes2web

View your notes as a static html site.

Why?

I want to be able to view my notes in a more convenient way. I was already writing them in Pandoc markdown and could view them as PDFs but that wasn't quite doing it for me:

  • It was inconvenient to flick through multiple files of notes to find the right PDF
  • It was annoying to sync to my phone
  • PDFs do not scale so they were hard to read on smaller screens
  • Probably more reasons I can't think of right now

Install

  1. Install Pandoc

    On arch:

    # pacman -S pandoc
    
  2. Run make install as root

Usage

$ notes2web.py NOTES_DIRECTORY_1

Output of notes2web.py --help:

usage: notes2web.py [-h] [-o OUTPUT_DIR] [-t TEMPLATE] [-H TEMPLATE_TEXT_HEAD]
                    [-f TEMPLATE_TEXT_FOOT] [-i TEMPLATE_INDEX_HEAD]
                    [-I TEMPLATE_INDEX_FOOT] [-s STYLESHEET]
                    [-e EXTRA_INDEX_CONTENT]
                    notes

positional arguments:
  notes

optional arguments:
  -h, --help            show this help message and exit
  -o OUTPUT_DIR, --output-dir OUTPUT_DIR
  -t TEMPLATE, --template TEMPLATE
  -H TEMPLATE_TEXT_HEAD, --template-text-head TEMPLATE_TEXT_HEAD
  -f TEMPLATE_TEXT_FOOT, --template-text-foot TEMPLATE_TEXT_FOOT
  -i TEMPLATE_INDEX_HEAD, --template-index-head TEMPLATE_INDEX_HEAD
  -I TEMPLATE_INDEX_FOOT, --template-index-foot TEMPLATE_INDEX_FOOT
  -s STYLESHEET, --stylesheet STYLESHEET
  -e EXTRA_INDEX_CONTENT, --extra-index-content EXTRA_INDEX_CONTENT

The command will generate a website in the output-dir directory (./web by default). It will then generate a list of all note files and put it in index.html.

Then you just have to point a webserver at output-dir.

Uninstall

# make uninstall