commit 7163891bf4947d27a9ad4891f204bd889992fc91
parent 4c38fdb59098d2183a8ced3cc3b42ada169cd508
Author: nibo <nibo@relim.de>
Date: Fri, 31 Jan 2025 18:49:01 +0100
Add README.md
Diffstat:
| A | DEVELOPMENT_NOTES | | | 42 | ++++++++++++++++++++++++++++++++++++++++++ |
| D | README | | | 42 | ------------------------------------------ |
| A | README.md | | | 85 | +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
3 files changed, 127 insertions(+), 42 deletions(-)
diff --git a/DEVELOPMENT_NOTES b/DEVELOPMENT_NOTES
@@ -0,0 +1,42 @@
+## stderr messages
+
+Text of the form '* failed' is a message for the developer.
+The text before ' failed' is always a function name.
+These messages will be printed by the macro LOG_DEBUG and
+are only enabled when compiling with 'make debug'.
+
+Furthermore text printed to stderr is either an ERR, WARN or INFO.
+An ERR means the program can't continue execution because something is wrong.
+A WARN means the program continues execution but recommends changing something.
+An INFO is just a valuable information.
+ERR, WARN and INFO messages can be directed at the developer or user.
+
+## functions that free
+
+A function that frees memory is named '*_free'. It has to be safe
+to pass a null pointer.
+
+## memory leaks
+
+If the program encounters an ERR message memory doesn't have to be freed.
+Because of the convention that the program exits when there is an ERR
+message there is no need to free because the operating system takes
+care of that anyway.
+
+There is one more case where memory leaks are tolerated. The library
+fontconfig produces memory leaks according to valgrind. Fixing these
+memory leaks is out of the scope of this project.
+
+## font handling
+
+If you specify a font somewhere and that font can't be found on your
+system lorid will show an error and terminate instead of finding
+an alternate font.
+
+#### cho_style_font_desc_parse()
+
+This function implements part of the Pango Markup described at
+'https://docs.gtk.org/Pango/type_func.FontDescription.from_string.html'.
+
+The website states: "FAMILY-LIST is a comma-separated list of families optionally terminated by a comma".
+My function cho_style_font_desc_parse() allows only one family name.
diff --git a/README b/README
@@ -1,42 +0,0 @@
-## stderr messages
-
-Text of the form '* failed' is a message for the developer.
-The text before ' failed' is always a function name.
-These messages will be printed by the macro DEBUG_MSG and
-are only enabled when compiling with 'make debug'.
-
-Furthermore text printed to stderr is either an ERR, WARN or INFO.
-An ERR means the program can't continue execution because something is wrong.
-A WARN means the program continues execution but recommends changing something.
-An INFO is just a valuable information.
-ERR, WARN and INFO messages can be directed at the developer or user.
-
-## functions that free
-
-A function that free's memory is named '*_free'. It has to be safe
-to pass a null pointer.
-
-## memory leaks
-
-If the program encounters an ERR message memory doesn't have to be freed.
-Because of the convention that the program exits when there is an ERR
-message there is no need to free because the operating system takes
-care of that anyway.
-
-There is one more case where memory leaks are tolerated. The library
-fontconfig produces memory leaks according to valgrind. Fixing these
-memory leaks is out of the scope of this project.
-
-## font handling
-
-If you specify a font somewhere and that font can't be found on your
-system lorid will show an error and terminate instead of finding
-an alternate font.
-
-#### cho_style_font_desc_parse()
-
-This function implements part of the Pango Markup described at
-'https://docs.gtk.org/Pango/type_func.FontDescription.from_string.html'.
-
-The website states: "FAMILY-LIST is a comma-separated list of families optionally terminated by a comma".
-My function cho_style_font_desc_parse() allows only one family name.
diff --git a/README.md b/README.md
@@ -0,0 +1,85 @@
+# lorid
+
+lorid is a command line program that implements the chordpro standard.
+It is written on Linux but looking at the dependencies you could possibly run
+it on other systems too.
+
+## Dependencies
+
+Currently I don't distribute a binary of lorid. You have to build it yourself.
+Maybe you get away with running the below commands.
+
+### pdfio
+
+Website: `https://www.msweet.org/pdfio/`
+
+1. Download the archive from `https://github.com/michaelrsweet/pdfio/releases/latest`
+2. Then inside the project folder run:
+
+```
+./configure --enable-shared
+make
+make install
+```
+
+### toml-c
+
+Website: `https://github.com/arp242/toml-c`
+
+```
+git clone https://github.com/arp242/toml-c.git
+cd toml-c/
+make
+make install
+```
+
+### libgrapheme
+
+Website: `https://libs.suckless.org/libgrapheme/`
+
+```
+git clone https://git.suckless.org/libgrapheme
+cd libgrapheme/
+./configure
+make
+make install
+```
+
+### fontconfig
+
+Website: `https://www.freedesktop.org/wiki/Software/fontconfig/`
+
+You probably already have it installed. You can verify that by running:
+```
+[~] ls -l /usr/lib/libfontconfig*
+lrwxrwxrwx 1 root root 18 Jan 23 02:37 /usr/lib/libfontconfig.so -> libfontconfig.so.1
+lrwxrwxrwx 1 root root 23 Jan 23 02:37 /usr/lib/libfontconfig.so.1 -> libfontconfig.so.1.15.0
+-rwxr-xr-x 1 root root 321496 Jan 23 02:37 /usr/lib/libfontconfig.so.1.15.0
+[~]
+```
+If an '*.so' file exists it's already installed.
+
+In case it's not installed:
+
+1. Download the latest release from `https://www.freedesktop.org/software/fontconfig/release/`
+2. Then inside the project folder run:
+
+```
+./configure --sysconfdir=/etc --prefix=/usr --mandir=/usr/share/man
+make
+make install
+```
+
+## Installation
+
+```
+make
+make install
+```
+
+## Documentation
+
+```
+man 1 lorid
+man 5 lorid_config
+```