Skip to content

Commit 73ab551

Browse files
update docs
1 parent f213497 commit 73ab551

File tree

3 files changed

+33
-21
lines changed

3 files changed

+33
-21
lines changed

README.md

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ Table of contents
1717
* [Installation](#installation)
1818
* [Usage](#usage)
1919
* [Software](#software)
20-
* [Demo](#demo)
20+
* [Example](#example)
2121

2222
Installation
2323
-----------------------------------------------
@@ -55,7 +55,7 @@ It's also available in the Arch Linux user repo AUR
5555
Usage
5656
-------------------------------------------
5757

58-
Source the library from your bash shell scripts like so:
58+
Source the library functions from your bash shell scripts like so:
5959

6060
```sh
6161
LIBPATH="/usr/lib/bashmultitool/"
@@ -65,26 +65,21 @@ do
6565
done
6666
```
6767

68-
There are eight files in library and they are independent of each other
69-
you can source them individually if you wish, however the prompt file *is*
70-
dependent on print. Each file has one function, To access functions from your shell scripts type:
68+
To access library functions from your shell scripts type:
7169

7270
```sh
73-
[function-name] [keyword] [options]
74-
75-
[section] [sub-section] [options]
76-
```
71+
# [function-name] [keyword] [options]
72+
# eg
73+
74+
bmtPrintFunc b_red "Hello World"
75+
```
7776

7877
Software
7978
-----------------------------------------
8079

8180
Eight separate markdown help files with detailed information,
8281
in documentation folder are available.
83-
For shortcut to each help file click on link in 2nd table in *software* section below.
84-
85-
The repo also contains a *test folder* where test files used in development are available,
86-
one for each library file.
87-
82+
For shortcut to each help file click on link in 2nd table in *software* section below. The repo also contains a *test folder* where test files used in development are available, one for each library file.
8883
A script to print library meta data is also installed.
8984

9085
| Installed File Path | Description |
@@ -105,13 +100,18 @@ A script to print library meta data is also installed.
105100
| bmtTime | btmTimeFunc | 701-709 | Time related | [bmtTime help file](documentation/bmtTime.md)|
106101
| bmtMisc | bmtMiscFunc | 801-804 | Miscellaneous | [bmtMisc help file](documentation/bmtMisc.md)|
107102

108-
The library contains eight section's, Each section has one file with one function.
109-
which contains 43 sub-sections in total.
103+
The library contains eight section's, Each section has one file with one function.
104+
Which contains 50 sub-sections in total.
110105
The sections are grouped per logical function.
111106
Printing, prompting, Linux related, file related,
112107
data related, time related , network related and miscellaneous.
108+
The sections are mostly independent of each other
109+
you can source them individually if you wish, however the prompt file *is*
110+
dependent on print. Each file has one function,
113111

114-
Output
112+
Example
115113
----------------------------
116114

115+
Output of basic example file in example folder, showing basic usage.
116+
117117
![ScreenShot](https://raw.githubusercontent.com/gavinlyonsrepo/bashmultitool/master/documentation/screenshot/example.png)

documentation/bmtPrompt.md

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@ Keyword is line, first option the character, second option is colour,
2424
if no colour passed default is "bold cyan"
2525

2626
```sh
27-
bmtPromptFunc line "="
28-
bmtPromptFunc line "8" red
27+
bmtPromptFunc line "="
28+
bmtPromptFunc line "8" red
2929
```
3030

3131
202) yes-no-quit prompt y/n/q
@@ -92,8 +92,9 @@ bmtPromptFunc quitno no
9292
Returns 0 for no , 2 for quit , 50 for bad user option
9393

9494
208) Wish to continue loop prompt
95-
Exits program if user presses N , continues if user presses yes
96-
Message optional and custom.
95+
Exits program if user presses N , continues if user presses yes.
96+
Param1 Message Custom. Param2 is colour,
97+
if no colour passed default is "bold cyan"
9798

9899
```sh
99100
bmtPromptFunc wishtocontinue "Do you wish to contine?"
@@ -106,6 +107,10 @@ bmtPromptFunc centertext "Hello World."
106107
107108
210) Print an event status , Installing bashMultiTool ...... [OK]
108109
110+
* Param 1 text on left
111+
* Param 2 text on right
112+
* Param 3 colour , if no colour passed default is "bold cyan"
113+
109114
```sh
110115
bmtPromptFunc eventstatus "Installing bashMultiTool" "OK"
111116
````

documentation/bmtTime.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,3 +79,10 @@ percentage completed.
7979
sleep 2
8080
echo " "
8181
```
82+
83+
709) Convert Epoch time to date format
84+
85+
```sh
86+
bmtTimeFunc dateformat "1651084921" "%FT%T%z"
87+
# prints ~ 2022-04-27T19:42:01+0100
88+
```

0 commit comments

Comments
 (0)