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.
notes2web/readme.md

58 lines
1.4 KiB
Markdown
Raw Normal View History

2021-04-30 21:01:08 +00:00
# notes2web
View your notes as a static html site.
2021-05-01 11:04:45 +00:00
![](./screenshot.png)
2021-04-30 21:01:08 +00:00
## Install
2021-05-01 11:04:45 +00:00
0. Install [Pandoc](https://pandoc.org/index.html) and [yq](https://github.com/mikefarah/yq)
On arch:
```
# pacman -S pandoc yq
```
2021-04-30 21:08:24 +00:00
1. Run `make install` as root
2021-04-30 21:01:08 +00:00
## Usage
```
2021-06-29 18:17:44 +00:00
$ notes2web.py NOTES_DIRECTORY_1
2021-04-30 21:01:08 +00:00
```
2021-06-29 18:17:44 +00:00
Output of `notes2web.py --help`:
2021-06-29 13:35:21 +00:00
2021-05-01 10:48:04 +00:00
```
2021-06-29 18:17:44 +00:00
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`.
2021-05-01 10:48:04 +00:00
2021-06-29 18:17:44 +00:00
Then you just have to point a webserver at `output-dir`.
2021-05-01 10:48:04 +00:00
2021-04-30 21:01:08 +00:00
## Uninstall
```
# make uninstall
```