From 0ccd2ace1005612ab50fc934919c157e0a36e5d4 Mon Sep 17 00:00:00 2001 From: Stephen Toth Date: Sat, 30 Sep 2023 18:14:59 -0400 Subject: [PATCH] Added Documentation --- README.md | 22 ++++++++++++---------- src/branding.c | 2 +- 2 files changed, 13 insertions(+), 11 deletions(-) diff --git a/README.md b/README.md index e74de1a..08cad21 100644 --- a/README.md +++ b/README.md @@ -23,28 +23,28 @@ sudo apt update; sudo apt install build-essential libreadline-dev make One-liner to shell for Debain-based distros: ```sh -sudo apt update; sudo apt install build-essential libreadline-dev make git && git clone https://git.stephenltoth.com/icaema/colorwrap.git && cd colorwrap && make && make test; +sudo apt update; sudo apt install build-essential libreadline-dev make git && git clone https://git.stephenltoth.com/icaema/colorwrap.git && cd colorwrap && make && make run; ``` Run: ```sh bin/cterm /bin/sh # or -make test +make run # they do the same thing ``` ## Usage ```sh -make test +make run # or make traces ``` -As of right now there are only 7 hardcoded replacements (for color) in the src/main.c file -Listed here: +As of right now there are only 7 hardcoded replacements (for color) in the src/main.c file. +These are actually regex patterns. ```c // all are temporary "^d" //-> Magenta @@ -55,7 +55,6 @@ Listed here: "alpine" //-> Magenta "z9Da0Da1" //-> Red ``` -~~I know its not regex matching yet, just go with it~~ In the testing directory, there are some test files for doing `ls -al` and a `long` file for being long (with some keywords being sprinkled in). @@ -71,10 +70,11 @@ If you need to use these kinds of applications, do not use this program to wrap ## Installation -Normal Build: `make` +Normal build: `make` -Debug Build: `make debug` +Debug build: `make debug` +Run unit tests: `make test` ## Example @@ -88,11 +88,13 @@ Location of Documentation |-- Makefile <- Project makefile |-- README <- Project README |-- bin <- Compiled binaries -| `-- run <- Project main executable +| |-- cterm <- Project main executable +| `-- testsuite <- Unit testing executable |-- build <- Static objects and intermediate files |-- docs <- Documentation |-- include <- Header files |-- lib <- Dynamic objects |-- src <- Source files -`-- tests <- Unit tests +|-- tests <- Unit tests +`-- testing <- Various dynamic testing files ``` diff --git a/src/branding.c b/src/branding.c index b140ea2..6e0e09b 100644 --- a/src/branding.c +++ b/src/branding.c @@ -22,7 +22,7 @@ void printbranding(){ sprintf(pre_print_lines[0], "%s v%d.%d.%d" , PROJECT_NAME, VERSION_MAJOR, VERSION_MINOR, VERSION_BUILD); //sprintf(pre_print_lines[0], "%s v%d.%d.%d.%d" , PROJECT_NAME, VERSION_MAJOR, VERSION_MINOR, VERSION_HOTFIX, VERSION_BUILD); sprintf(pre_print_lines[1], "(c) never"); - sprintf(pre_print_lines[2], "%d rules loaded", 9); //TODO: actually use the number of rules loaded + sprintf(pre_print_lines[2], "%d rules loaded", 7); //TODO: actually use the number of rules loaded if (GITBRANCH) sprintf(pre_print_lines[3], "%s", GITBRANCH);