11Overview
22--------------------------------------------
33* Name: bashMultiTool
4- * Description: A Bash Shell library file for commonly used functions
4+ * Description:
5+
6+ A Bash Shell library file for commonly used functions
57can be imported into shell scripts to create functional and colorful
68scripts and Terminal users interfaces(TUI).
9+ The library allows user to redefine commonly used functions every time you write a shell script, the library may save a part of the development time.
10+
711* Author: Gavin Lyons
12+ * GNU bash: version 5.1.16
813
914Table of contents
1015---------------------------
1116
1217 * [ Installation] ( #installation )
13- * [ Dependencies] ( #dependencies )
1418 * [ Usage] ( #usage )
15- * [ Files] ( #files )
1619 * [ Software] ( #software )
17-
20+ * [ Demo] ( #demo )
21+
1822Installation
1923-----------------------------------------------
2024
21- ** Linux debian based systems built on Ubuntu 20 .04 LTS (Focal Fossa )**
25+ ** Linux debian based systems built on Ubuntu 22 .04 LTS (Jammy Jellyfish )**
2226
2327A Personal Package Archives (PPA) has been created on Ubuntu
2428package building and hosting section of launchpad site
@@ -35,27 +39,22 @@ sudo apt install bashmultitool
3539** For other linux systems**
3640
3741Download latest fixed release and run the makefile as per
38- terminal commands below for version 1.7 latest release at time of writing
42+ terminal commands below for version 2.0 latest release at time of writing
3943Note: If you install with this method you will not be informed of updates
4044by system.
4145
4246``` sh
43- curl -sL https://github.com/gavinlyonsrepo/bashmultitool/archive/1.7 .tar.gz | tar xz
44- cd bashmultitool-1.7
47+ curl -sL https://github.com/gavinlyonsrepo/bashmultitool/archive/2.0 .tar.gz | tar xz
48+ cd bashmultitool-2.0
4549sudo make install
4650```
4751** Arch based System**
4852
4953It's also available in the Arch Linux user repo AUR
5054
51- Dependencies
52- -------------------------------------
53- 1 . GNU bash, version 4.4.18-2
54-
55- 2 . The check website section requires netcat installed. [ Netcat] ( https://en.wikipedia.org/wiki/Netcat )
56-
5755Usage
5856-------------------------------------------
57+
5958Source the library from your bash shell scripts like so:
6059
6160``` sh
@@ -64,100 +63,55 @@ for MYFILE in "$LIBPATH"*;
6463do
6564 source " $MYFILE "
6665done
67-
68-
6966```
7067
71- There are six files in library and they are independent of each other
68+ There are eight files in library and they are independent of each other
7269you can source them individually if you wish, however the prompt file * is*
73- dependent on print.
74-
75- Each file has one function, To access functions from your shell scripts type:
76-
77-
70+ dependent on print. Each file has one function, To access functions from your shell scripts type:
7871
7972``` sh
80- [functionname] [keyword] [options]
73+ [function-name] [keyword] [options]
74+
75+ [section] [sub-section] [options]
8176```
8277
83- Six separate markdown help files with detailed information,
78+ Software
79+ -----------------------------------------
80+
81+ Eight separate markdown help files with detailed information,
8482in documentation folder are available.
85- For shortcut to each file click on link in 2nd table in * Files and setup* section below.
86- The repo also contains a test folder where test files used in development are available.
83+ For shortcut to each help file click on link in 2nd table in * software* section below.
8784
88- A script to print library meta data for test and debug is also installed.
85+ The repo also contains a * test folder* where test files used in development are available,
86+ one for each library file.
8987
90- Files and setup
91- -----------------------------------------
88+ A script to print library meta data is also installed.
9289
93- | File Path | Description |
90+ | Installed File Path | Description |
9491| ------ | ------ |
95- | /usr/bin/bashmultitool.sh | Script to print library meta data |
96- | /usr/lib/bashmultitool/bashmultitool/* | 6 library files see next table|
97- | /usr/lib/bashmultitool/doc/README.md | help |
98- | /usr/lib/bashmultitool/doc/documentation/license.md | copyright |
99- | /usr/lib/bashmultitool/doc/documentation/changelog.md | history |
100-
92+ | /usr/bin/bashmultitool | Script to print library meta data |
93+ | /usr/lib/bashmultitool/bashmultitool/* | 8 library files see next table|
94+ | /usr/lib/bashmultitool/doc/README.md | readme |
95+ | /usr/lib/bashmultitool/doc/bmt* .md | 8 Documentation files see next table |
10196
10297| Library file | Function | Sections | Content | Doc link |
10398| ---- | ---- | ---- | ---- | ---- |
10499| bmtPrint | bmtPrintFunc | 101 | Printing text | [ bmtPrint help file] ( documentation/bmtPrint.md ) |
105- | bmtPrompt | bmtPromptFunc | 201-207 | Prompts | [ bmtPrompt help file] ( documentation/bmtPrompt.md ) |
106- | bmtMisc | bmtMiscFunc | 301-304 | Miscellaneous | [ bmtMisc help file] ( documentation/bmtMisc.md ) |
107- | bmtLinux | bmtLinuxFunc | 401-404 | Linux related | [ bmtLinux help file] ( documentation/bmtLinux.md ) |
108- | bmtFiles | bmtFilesFunc | 501-505 | File related | [ bmtFiles help file] ( documentation/bmtFiles.md ) |
109- | bmtData | btmDataFunc | 601-606 | Data related | [ bmtData help file] ( documentation/bmtData.md ) |
110-
111-
112- Software
113- ----------------------
114- The library contains six files and six functions,
115- which contains 27 sections in total.
116- The sections are grouped in six files as per logical function.
100+ | bmtPrompt | bmtPromptFunc | 201-210 | Prompts | [ bmtPrompt help file] ( documentation/bmtPrompt.md ) |
101+ | bmtNetwork | bmtNetworkFunc | 301-302 | Network related | [ bmtNetwork help file] ( documentation/bmtNetwork.md ) |
102+ | bmtLinux | bmtLinuxFunc | 401-408 | Linux related | [ bmtLinux help file] ( documentation/bmtLinux.md ) |
103+ | bmtFiles | bmtFilesFunc | 501-509 | File related | [ bmtFiles help file] ( documentation/bmtFiles.md ) |
104+ | bmtData | btmDataFunc | 601-607 | Data related | [ bmtData help file] ( documentation/bmtData.md ) |
105+ | bmtTime | btmTimeFunc | 701-709 | Time related | [ bmtTime help file] ( documentation/bmtTime.md ) |
106+ | bmtMisc | bmtMiscFunc | 801-804 | Miscellaneous | [ bmtMisc help file] ( documentation/bmtMisc.md ) |
107+
108+ The library contains eight section's, Each section has one file with one function.
109+ which contains 43 sub-sections in total.
110+ The sections are grouped per logical function.
117111Printing, prompting, Linux related, file related,
118- data related and miscellaneous.
112+ data related, time related , network related and miscellaneous.
119113
114+ Output
115+ ----------------------------
120116
121- ## Section numbered list
122-
123- * 101 Coloured printed text, 8 colours, 7 modes. 56 options in total.
124-
125- Colours: Black, Red, Green, Yellow, Blue, Purple, Cyan, White.
126-
127- Modes: normal, bold, underline, background, high intensity,
128- bold high intensity, background high intensity.
129-
130- Example Output:
131-
132- ![ ScreenShot] ( https://raw.githubusercontent.com/gavinlyonsrepo/bashmultitool/master/documentation/screenshot/colour_print_example.png )
133-
134- * 201 Horizontal lines across terminal in any colour
135- * 202 yes-no-quit [ y/n/q] prompt
136- * 203 YES-no [ Y/n] prompt
137- * 204 yes-NO [ y/N] prompt
138- * 205 Anykey to continue prompt in any colour
139- * 206 QUIT-no [ Q/n] prompt
140- * 207 quit-NO [ q/N] prompt
141-
142- * 301 Check if a website is up
143- * 302 Spinner Animation for long non-verbose commands
144- * 303 Stopwatch / timer
145- * 304 Weather forecast
146-
147- * 401 Check package installed
148- * 402 Linux distro family checker
149- * 403 Set text editor $EDITOR if not set
150- * 404 log file handler
151-
152- * 501 Make and enter a formated directory
153- * 502 check if directory exists and empty
154- * 503 directory exists
155- * 504 file exists
156- * 505 device exists
157-
158- * 601 integer user input check
159- * 602 alphabet user input check
160- * 603 alphanumeric user input check
161- * 604 convert string to lowercase
162- * 605 convert string to uppercase
163- * 606 trim whitespace from string
117+ ![ ScreenShot] ( https://raw.githubusercontent.com/gavinlyonsrepo/bashmultitool/master/documentation/screenshot/example.png )
0 commit comments