/MarkdownCheater

A simple script and some CSS to help people make their own cheatsheets with markdown

Primary LanguageShellMIT LicenseMIT

Markdown Cheater

Markdown Cheater is the combination of a simple shell script and some CSS to allow for easy cheatsheets creation using markdown. It is using pandoc to generate the pdf and ImageMagick's convert for the images.

Vim cheatsheet example

Pattern

To create your own cheatsheets you should use this pattern:

:::
	:: Move around
	<kbd>j</kbd>| Go down 
	<kbd>k</kbd>| Go up
	<kbd>l</kbd>| Go left
	<kbd>h</kbd>| Go right
	\::

	:: Commands
	`:w`| Save file 
	`:q`| Quit
	`:wq`| Save and quit
	\::
\:::

Everything you want to be styled as a cheatsheet should be wrapped in a container looking like this:

:::
[...]
\:::

And each section should be wrapped like this:

:: Title
	First| Explaination for First
	Second| Explaination for Second
\::

Of course outside of the ::: block you can use normal markdown.

Usage

./generate.sh -i INPUT.md [-o OUTPUT.pdf] [-c IMAGE.png] [--papersize a3]

Dependencies

I don't like how it looks !

You can just plug about anything on the css. If you want to force the mosaic effect, you can play with this line on the style.css file:

:root {
  --page-height: calc(2 * 1150px); 
}

The 1150px is close to the height of one page in the default configuration. That means here it should wrap on two a4 pages.