commit 8ace6ebe5ca1dbb7a12e906be514567624ba7128
parent cc59a9879c0371a85dd89b1a79e04482cf3db342
Author: nibo <nibo@relim.de>
Date: Wed, 29 Jan 2025 12:13:30 +0100
Improve documentation
Diffstat:
| M | Makefile | | | 6 | +++++- |
| M | lorid_config.5 | | | 102 | +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++-------------------- |
2 files changed, 82 insertions(+), 26 deletions(-)
diff --git a/Makefile b/Makefile
@@ -41,4 +41,8 @@ dist:
cp -r *.c *.h misc/ Makefile README lorid.1 lorid_config.5 lorid-v${VERSION}/
tar czf lorid-v${VERSION}.tar.gz lorid-v${VERSION}/*
rm -rf lorid-v${VERSION}/
-.PHONY: compile static debug clean install uninstall dist
+html:
+ mkdir -p doc/
+ groff -man -Thtml lorid.1 > doc/lorid.1.html
+ groff -man -Thtml lorid_config.5 > doc/lorid_config.5.html
+.PHONY: compile static debug clean install uninstall dist html
diff --git a/lorid_config.5 b/lorid_config.5
@@ -3,43 +3,31 @@
.B ~/.config/lorid/config.toml
- lorid configuration file
.SH DESCRIPTION
-The config file has the TOML file format.
+The config file will be parsed as TOML version 1.0.
Run
.RB ` lorid
.BR --print-default-config `
for an example config.
.SS [notes]
-In this section you can define custom notation systems.
-A few notation systems are predefined. These are:
-.BR common ,
-.BR german ,
-.BR scandinavian ,
-.BR latin ,
-.BR roman
+In this section you can define custom notation systems
+beside the predefined notation systems which are:
+.BR \(dqcommon\(dq ,
+.BR \(dqgerman\(dq ,
+.BR \(dqscandinavian\(dq ,
+.BR \(dqlatin\(dq ,
+.BR \(dqroman\(dq
and
-.BR nashville .
+.BR \(dqnashville\(dq .
A notation system is an array of exactly seven tables.
Each table has the key 'note' and depending on the array position also has the keys 'sharp' and/or 'flat'.
+See the
+.B EXAMPLE
+section to learn how to use it.
To see the predefined notation systems execute
.B lorid
.BR --print-default-config .
-Example:
-
-.RS 4
-.EX
-common = [
- { note = "C", sharp = "C#", },
- { note = "D", sharp = "D#", flat = "Db" },
- { note = "E", flat = "Eb" },
- { note = "F", sharp = "F#", },
- { note = "G", sharp = "G#", flat = "Gb" },
- { note = "A", sharp = "A#", flat = "Ab" },
- { note = "B", flat = "Bb" },
-]
-.EE
-.RE
.SS [parser]
.SS [parser.chords]
mode = String
@@ -191,7 +179,9 @@ In this section you can control the style of various parts of the song or the PD
.BR comment_italic ,
.BR comment_box .
-If you set the color of something you can provide a 4 or 7 characters long hex color code or one of the following predefined color values:
+If you set the color of something you can provide a 4 or 7 characters long hex color code
+as in "#EA2" or "#F1F1F1".
+Alternatively you can provide one of the following predefined color values:
.BR \(dqred\(dq ,
.BR \(dqgreen\(dq ,
.BR \(dqblue\(dq ,
@@ -206,18 +196,39 @@ If you set the color of something you can provide a 4 or 7 characters long hex c
foreground_color = String
+.RS 4
+Set the color of the text.
+.RE
+
background_color = String
+.RS 4
+Set the fill color of the rectangle that will be drawn around the text.
+The rectangle has angularly borders.
+.RE
+
underline_style = String
=> allowed values: "single", "double", "none"
+.RS 4
+In case of "single" a line is drawn under the text.
+In case of "double" two lines are drawn under the text.
+In case of "none" no line is drawn under the text.
+.RE
+
underline_color = String
overline_style = String
=> allowed values: "single", "double", "none"
+.RS 4
+In case of "single" a line is drawn above the text.
+In case of "double" two lines are drawn above the text.
+In case of "none" no line is drawn above the text.
+.RE
+
overline_color = String
strikethrough = Boolean
@@ -228,17 +239,58 @@ boxed = Boolean
.RS 4
Control whether a rectangle is drawn around the text.
+The rectangle has angularly borders.
.RE
boxed_color = String
rise = Float
+.RS 4
+Specify a positive value to increase the text baseline and a negative value to decrease the text baseline.
+.RE
+
href = String
.RS 4
Clicking on the corresponding text tries to open the provided href in a browser.
.RE
+.SH EXAMPLE
+.EX
+# ~/.config/lorid/config.toml
+
+[notes]
+mycustom = [
+ { note = "C", sharp = "C#", },
+ { note = "D", sharp = "D#", flat = "Db" },
+ { note = "E", flat = "Eb" },
+ { note = "F", sharp = "F#", },
+ { note = "G", sharp = "G#", flat = "Gb" },
+ { note = "A", sharp = "A#", flat = "Ab" },
+ { note = "B", flat = "Bb" },
+]
+
+[parser]
+notation_system = "mycustom"
+
+[output]
+notation_system = "german"
+
+[output.toc]
+show = true
+title = "Contents"
+
+[output.page_no]
+alignment = "right"
+
+[output.styles.chorus]
+background_color = "grey"
+
+[output.styles.chorus.font]
+name = "Liberation Mono"
+size = 12.0
+.EE
+
.SH SEE ALSO
.BR lorid (1)