Added Documentation

This commit is contained in:
Stephen Toth 2023-09-30 18:14:59 -04:00
parent 1c53c5f054
commit 0ccd2ace10
2 changed files with 13 additions and 11 deletions

View File

@ -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
```

View File

@ -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);