All Projects → gavinlyonsrepo → Bashmultitool

gavinlyonsrepo / Bashmultitool

A library for bash shell program containing useful functions. Can be imported into scripts to create colourful and functional scripts and TUIs.

Programming Languages

shell
77523 projects
bash
514 projects
script
160 projects

Projects that are alternatives of or similar to Bashmultitool

Vlany
Linux LD_PRELOAD rootkit (x86 and x86_64 architectures)
Stars: ✭ 804 (+2877.78%)
Mutual labels:  cli, tui, library
Simple Sh Datascience
A collection of Bash scripts and Dockerfiles to install data science Tool, Lib and application
Stars: ✭ 32 (+18.52%)
Mutual labels:  bash-script, library, ubuntu
Printooth
A well documented, high-level Android interface that makes printing via bluetooth printers easier
Stars: ✭ 231 (+755.56%)
Mutual labels:  printer, library, print
Python Progressbar
Progressbar 2 - A progress bar for Python 2 and Python 3 - "pip install progressbar2"
Stars: ✭ 682 (+2425.93%)
Mutual labels:  cli, library
Tml
🌈💻🎨 A tiny markup language for terminal output. Makes formatting output in CLI apps easier!
Stars: ✭ 634 (+2248.15%)
Mutual labels:  cli, tui
Papis
Powerful and highly extensible command-line based document and bibliography manager.
Stars: ✭ 636 (+2255.56%)
Mutual labels:  cli, library
So
A terminal interface for Stack Overflow
Stars: ✭ 694 (+2470.37%)
Mutual labels:  cli, tui
Dive
A tool for exploring each layer in a docker image
Stars: ✭ 28,957 (+107148.15%)
Mutual labels:  cli, tui
Pixterm
Draw images in your ANSI terminal with true color
Stars: ✭ 782 (+2796.3%)
Mutual labels:  cli, color
Przm
🎨 A simple, yet feature rich color picker and manipulator
Stars: ✭ 17 (-37.04%)
Mutual labels:  tui, color
Wp Print
Displays a printable version of your WordPress blog's post/page.
Stars: ✭ 16 (-40.74%)
Mutual labels:  printer, print
Devdash
🍱 Highly Configurable Terminal Dashboard for Developers and Creators
Stars: ✭ 939 (+3377.78%)
Mutual labels:  cli, tui
Sultan
Sultan: Command and Rule over your Shell
Stars: ✭ 625 (+2214.81%)
Mutual labels:  bash-script, cli
Imgcat
It's like cat, but for images.
Stars: ✭ 577 (+2037.04%)
Mutual labels:  cli, color
Wordops
Install and manage a high performance WordPress stack with a few keystrokes
Stars: ✭ 649 (+2303.7%)
Mutual labels:  cli, ubuntu
Summoner
🔮 🔧 Tool for scaffolding batteries-included production-level Haskell projects
Stars: ✭ 577 (+2037.04%)
Mutual labels:  cli, tui
Wunderbar
Simple horizontal bar chart printer for your terminal
Stars: ✭ 572 (+2018.52%)
Mutual labels:  cli, library
Tabulate
Table Maker for Modern C++
Stars: ✭ 862 (+3092.59%)
Mutual labels:  cli, library
Transity
Keep track of your 💵, 🕘, 🐖, 🐄, 🍻 on your command line
Stars: ✭ 528 (+1855.56%)
Mutual labels:  cli, tui
Nve
Run any command on specific Node.js versions
Stars: ✭ 531 (+1866.67%)
Mutual labels:  cli, library

Overview

  • Name: bashmultitool
  • Title : Bash Shell library for commonly used functions.
  • Description: A Bash Shell library file for commonly used functions can be imported into shell scripts to create functional and colorful scripts and Terminal users interfaces(TUI).
  • Author: Gavin Lyons
  • Communication: Upstream repo at github site below or [email protected]
  • URL: bashmultitool
  • History: See changelog.md in documentation section for version control history.
  • Copyright: Copyright (C) 2018 Gavin Lyons. See LICENSE.md in documentation section.

Table of contents

Installation

Linux debian based systems built on Ubuntu 20.04 LTS (Focal Fossa)

A Personal Package Archives (PPA) has been created on Ubuntu package building and hosting section of launchpad site called bashmultitool.

To install this on your system run commands in terminal

sudo add-apt-repository ppa:typematrix/bashmultitool
sudo apt update
sudo apt install bashmultitool

For other linux systems

Download latest fixed release and run the makefile as per terminal commands below for version 1.7 latest release at time of writing Note: If you install with this method you will not be informed of updates by system.

curl -sL https://github.com/gavinlyonsrepo/bashmultitool/archive/1.7.tar.gz | tar xz
cd  bashmultitool-1.7
sudo make install

Arch based System

It's also available in the Arch Linux user repo AUR

Usage

Source the library from your bash shell scripts like so:

LIBPATH="/usr/lib/bashmultitool/"
for MYFILE in "$LIBPATH"*;
do
	source "$MYFILE"
done


There are six files in library and they are independent of each other you can source them individually if you wish, however the prompt file is dependent on print.

Each file has one function, To access functions from your shell scripts type:

[functionname] [keyword] [options]

Six separate markdown help files with detailed information, in documentation folder are available. For shortcut to each file click on link in 2nd table in Files and setup section below. The repo also contains a test folder where test files used in development are available.

A script to print library meta data for test and debug is also installed.

Files and setup

File Path Description
/usr/bin/bashmultitool.sh Script to print library meta data
/usr/lib/bashmultitool/bashmultitool/* 6 library files see next table
/usr/lib/bashmultitool/doc/README.md help
/usr/lib/bashmultitool/doc/documentation/license.md copyright
/usr/lib/bashmultitool/doc/documentation/changelog.md history
Library file Function Sections Content Doc link
bmtPrint bmtPrintFunc 101 Printing text bmtPrint help file
bmtPrompt bmtPromptFunc 201-207 Prompts bmtPrompt help file
bmtMisc bmtMiscFunc 301-304 Miscellaneous bmtMisc help file
bmtLinux bmtLinuxFunc 401-404 Linux related bmtLinux help file
bmtFiles bmtFilesFunc 501-505 File related bmtFiles help file
bmtData btmDataFunc 601-606 Data related bmtData help file

Features

The library contains six files and six functions, which contains 27 sections in total. The sections are grouped in six files as per logical function. Printing, prompting, Linux related, file related, data related and miscellaneous.

Section numbered list

  • 101 Coloured printed text, 8 colours, 7 modes. 56 options in total.

Colours: Black, Red, Green, Yellow, Blue, Purple, Cyan, White.

Modes: normal, bold, underline, background, hiy, bold hiy, background hiy.

Note: hiy = high intensity.

Example Output:

ScreenShot

  • 201 Horizontal lines across terminal in any colour

  • 202 yes-no-quit [y/n/q] prompt

  • 203 YES-no [Y/n] prompt

  • 204 yes-NO [y/N] prompt

  • 205 Anykey to continue prompt in any colour

  • 206 QUIT-no [Q/n] prompt

  • 207 quit-NO [q/N] prompt

  • 301 Check if a website is up

  • 302 Spinner Animation for long non-verbose commands

  • 303 Stopwatch / timer

  • 304 Weather forecast

  • 401 Check package installed

  • 402 Linux distro family checker

  • 403 Set text editor $EDITOR if not set

  • 404 log file handler

  • 501 Make and enter a formated directory

  • 502 check if directory exists and empty

  • 503 directory exists

  • 504 file exists

  • 505 device exists

  • 601 integer user input check

  • 602 alphabet user input check

  • 603 alphanumeric user input check

  • 604 convert string to lowercase

  • 605 convert string to uppercase

  • 606 trim whitespace from string

Dependencies

  1. GNU bash, version 4.4.18-2

  2. The check website section requires netcat installed. Netcat

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].