# livejrnl-rs
An application to render [jrnl.sh](https://jrnl.sh) journals as a static website. Written in Rust and licensed under the [GPLv3 license](LICENSE).
## Project Status
This is a work in progress.
## Usage
```shell
jrnl --format json | livejrnl-rs -o $HOME/Websites/livejrnl-rs/
```
All [jrnl command line parameters](https://jrnl.sh/en/stable/reference-command-line/) apply here, as long as you use `--format json` somewhere before the pipe, it should work.
## Configuration
Create a default config file by running the following command when using for the first time:
`livejrnl-rs -h`
A default config will be created at `$HOME/.config/livejrnl-rs/config.toml`
Alternatively, you can create the file yourself and paste the following, editing to suit your needs:
```toml
site_name = 'livejrnl-rs'
base_url = 'localhost'
author = 'me'
template = '/dev/null'
template_index = 'index.html.template'
site_description = 'This is a site rendered with livejrnl-rs.'
site_language = 'en'
```
### Configuration Key Reference
| `site_name` | `String` | The name of your website |
| `base_url` | `String` | The web address to use for link generation |
| `author` | `String` | Who are you? |
| `template` | `String` | Path to the directory with the template |
| `template_index` | `String` | Relative path to the template to use to generate `index.html` |
| `site_description` | `String` | What is your site about? |
| `site_language` | `String` | What [language](https://www.w3schools.com/tags/ref_language_codes.asp) is your site in? |
## Templates
This section needs work. TODO.
## Remarks
This is my first Rust application. The code here may not be the best practices. I welcome issues that bring it up, and would love a nudge in the right direction on how to fix them. :)