fake sushi

Post it generator

Web Print SI17

POST-IT GENERATOR

~~TO AUGMENT OUR PRODUCTIVITY HERE IS A SCRIPT THAT~~
Generate post-it blocks from markdown files.

Install

Clone the repo

git clone https://git.xpub.nl/kamo/postit-gen.git

Move to the cloned folder

cd postit-gen

Create a virtual environment

python3 -m venv venv

and activate it

. venv/bin/activate

Then you can install the repo

pip3 install -e .

How to use

The package offers two scripts: template.py and generate.py.

template.py generate a template folder with a markdown file that can be used as a starting point for formatting the contents.

python3 template.py -f test

Will generate a test folder, with the markdown template for the contents.

The contents.md file has these properties:

All these parameters are formatted in YAML.

After setting all the parameters to match your needs, you can fill the contents. ATM you can insert text and images, in the form of a list.

contents:
    - A flat with no floors
    - Hello, where are you, what can you see from there?
    - type: image
      src: game.png

Usually each entry of the list will be considered as a string. If you want to insert an image you will need to provide a type: image, and a src: <filename>.

In this way:

contents:
    - type: image
      src: <filename>

Once you inserted your contents, you can run the generate.py script, specifying the working folder from which you want to take the contents.

python3 generate.py -f test

It will take the contents inside the test folder and will generate a ready-to-print HTML file, serving it with a simple http-server at http://localhost:8000/test. Opening that link you can preview your post-it blocks. Each entry of the contents list is now a page in the document (in the print mode!)

TODO: link css file in the template to work directly on the preview.