c_simple_http/Changelog.md

104 lines
2.9 KiB
Markdown
Raw Permalink Normal View History

2024-11-07 04:34:06 +00:00
# Changelog
2024-11-08 05:37:54 +00:00
## Upcoming Changes
2024-11-29 03:11:29 +00:00
## Version 1.7
Fix usage of indexing in `IF`.
Note this is used like `{{{!IF SomeVar[2]==true}}}`.
2024-11-29 02:39:18 +00:00
## Version 1.6
Fix usage of `IF` with a `FOREACH` variable when the `IF` is nested in the
`FOREACH` and is referring to a variable expanded by `FOREACH`.
2024-11-25 08:39:04 +00:00
## Version 1.5
2024-11-25 05:20:28 +00:00
Add flag `--generate-static-enable-overwrite`. This flag enables overwriting of
files from static-dir to generate-dir (if static-dir was specified). Previous
implementation relied on `--generate-enable-ovewrite` for this behavior.
2024-11-25 07:04:44 +00:00
Minor refactorings related to `printf` and `uintX_t`/`size_t` types.
2024-11-21 05:14:09 +00:00
## Version 1.4
2024-11-18 08:10:41 +00:00
Implemented "IF", "ELSEIF", "ELSE", "ENDIF", and "INDEX" for templates.
2024-11-21 05:06:09 +00:00
IF is used like: `{{{!IF Variable==SomeString}}}`.
2024-11-21 12:05:11 +00:00
Not equals can also be used: `{{{!IF Variable!=OtherString}}}`.
2024-11-21 05:06:09 +00:00
ELSEIF is used like: `{{{!ELSEIF Variable==AnotherString}}}`.
2024-11-21 12:05:11 +00:00
Not equals can also be used: `{{{!ELSEIF Variable!=AnotherOtherString}}}`.
2024-11-21 05:06:09 +00:00
ELSE is used like: `{{{!ELSE}}}`.
ENDIF is used like: `{{{!ENDIF}}}`.
2024-11-18 08:10:41 +00:00
INDEX is used like: `{{{!INDEX ArrayVar[2]}}}`.
2024-11-20 07:16:25 +00:00
Implemented "FOREACH" and "ENDFOREACH" for templates.
FOREACH is used like:
2024-11-21 05:06:09 +00:00
PATH=/
2024-11-20 07:16:25 +00:00
HTML='''
{{{!FOREACH ArrayVar}}}
{{{ArrayVar}}}
{{{!ENDFOREACH}}}'''
ArrayVar=FirstValue
ArrayVar=SecondValue
ArrayVar=ThirdValue
For multiple variables to expand in FOREACH:
2024-11-21 05:06:09 +00:00
PATH=/
HTML='''
{{{!FOREACH ArrayVar!ArrayVarSecond!ArrayVarThird}}}
{{{ArrayVar}}}
{{{ArrayVarSecond}}}
{{{ArrayVarThird}}}
{{{!ENDFOREACH}}}'''
ArrayVar=FirstVarOnce
ArrayVar=FirstVarTwice
ArrayVarSecond=SecondVarOnce
ArrayVarSecond=SecondVarTwice
ArrayVarThird=ThirdVarOnce
ArrayVarThird=ThirdVarTwice
2024-11-20 07:16:25 +00:00
Implemented nestable "IF" and "FOREACH" expressions in templates. In other
words, there can be `{{{!IF}}}` inside other IF/FOREACH blocks, and vice versa.
2024-11-14 01:41:43 +00:00
## Version 1.3
2024-11-12 08:18:21 +00:00
Fix internal erronous buffer declaration.
2024-11-12 08:26:33 +00:00
Fix internal missing NULL check.
2024-11-12 03:04:30 +00:00
## Version 1.2
Add the `--generate-dir=<DIR>` option, which will generate all html into the
given directory. This requires `--config=<CONFIG_FILE>`.
`--generate-enable-overwrite` is required to overwrite existing files when using
`--generate-dir=<DIR>`.
If `--enable-static-dir=<DIR>` is also specified with generate, then the files
in the given directory will be copied into the directory specified with
`--generate-dir=<DIR>`.
2024-11-08 06:20:08 +00:00
## Version 1.1
2024-11-08 05:37:54 +00:00
Some refactoring of code handling parsing the config file.
Remove buffer-size-limit on config file entries.
2024-11-07 04:34:06 +00:00
## Version 1.0
First release.
Features:
- Serve templated html files via a config.
- Reload configuration on SIGUSR1 or by listening (enabled by cmd parameter).
- Cache served html (enabled by cmd parameter).
- Serve static files from "static-dir" (enabled by cmd parameter).
2024-11-25 05:20:28 +00:00
<!--
vim: textwidth=80 et sw=2 ts=2 sts=2
-->