An open API service indexing awesome lists of open source software.

https://github.com/dynamotn/dybatpho

My library for bash utility methods and tools
https://github.com/dynamotn/dybatpho

bash bash-script dybatpho library utility

Last synced: 3 months ago
JSON representation

My library for bash utility methods and tools

Awesome Lists containing this project

README

          

# dybatpho

![Bash Script](https://img.shields.io/badge/bash_script-%23121011.svg?style=for-the-badge&logo=gnu-bash&logoColor=white)
[![Coverage Status](https://coveralls.io/repos/github/dynamotn/dybatpho/badge.svg?branch=main)](https://coveralls.io/github/dynamotn/dybatpho?branch=main)
[![CI](https://github.com/dynamotn/dybatpho/actions/workflows/ci.yaml/badge.svg)](https://github.com/dynamotn/dybatpho/actions/workflows/ci.yaml)
[![Latest release](https://img.shields.io/github/release/dynamotn/dybatpho.svg)](https://github.com/dynamotn/dybatpho/releases/latest)

> **dybatpho** โ€“ A powerful collection of bash functions to help you build scripts efficiently, quickly, and maintainably!

---

## ๐Ÿš€ Why choose **dybatpho**?

- **Save time:** A curated set of the most popular & useful functions for working with Bash scripts.
- **Easy integration:** Flexibly use as a submodule, subtree, or manual clone.
- **Battle-tested:** Used in many projects, personal dotfiles, and in real CI/CD workflows.
- **Extensible:** Easily add your own modules or customize to fit your needs.
- **Community-driven:** Always open to feedback, suggestions, and PRs from everyone.

## ๐Ÿ“– What is `dybatpho`?

`dybatpho` is a portmanteau of `ฤ‘i bรกt phแป‘` - meaning "to wander and explore", just like this repo helps you discover and use handy bash functions freely and flexibly.

# โšก๏ธ Quick Start

1. **Add `dybatpho` to your project** (pin the version if needed):

- **Submodule:**

```sh
git submodule add --depth 1 https://github.com/dynamotn/dybatpho.git
git submodule update --remote
```

- **Subtree:**

```sh
git subtree add --prefix main --squash < path > https://github.com/dynamotn/dybatpho.git
git subtree pull --prefix main --squash < path > https://github.com/dynamotn/dybatpho.git
```

- **Manual clone** (for CI/CD, etc.):

```sh
git clone https://github.com/dynamotn/dybatpho.git
```

2. **Source the logic you need:**

```sh
# Source the initialization script
. < path-to-dybatpho > /init.sh
```

> See more [example scripts](example/) or real-world usage in [my dotfiles](https://github.com/dynamotn/dotfiles).

## ๐Ÿ—‚ Directory Structure

```
.
โ”œโ”€โ”€ doc/ # Module documentation
โ”‚ โ”œโ”€โ”€ *.md # Usage guides & Reference for each module
โ”‚ โ””โ”€โ”€ spec/ # Module specifications and design docs
โ”œโ”€โ”€ example/ # Example scripts for users
โ”œโ”€โ”€ scripts/ # Helper scripts (test, doc generation, etc.)
โ”œโ”€โ”€ src/ # Source code of modules
โ”œโ”€โ”€ test/ # Unit tests
โ””โ”€โ”€ init.sh # Initialization script, **must be sourced first**
```

## ๐Ÿ“š Contents & Featured Modules

- [array.sh](doc/array.md) โ€“ Array manipulation
- [string.sh](doc/string.md) โ€“ String operations
- [text.sh](doc/text.md) โ€“ Multi-line text formatting
- [logging.sh](doc/logging.md) โ€“ Easy logging
- [helpers.sh](doc/helpers.md) โ€“ Miscellaneous utilities
- [process.sh](doc/process.md) โ€“ Process management
- [network.sh](doc/network.md) โ€“ Network utilities
- [date.sh](doc/date.md) โ€“ Date and timestamp helpers
- [json.sh](doc/json.md) โ€“ JSON and YAML helpers
- [file.sh](doc/file.md) โ€“ File operations
- [archive.sh](doc/archive.md) โ€“ Archive create/extract/list helpers
- [table.sh](doc/table.md) โ€“ Plain-text and Markdown table rendering
- [cli.sh](doc/cli.md) โ€“ CLI building support

## ๐ŸŽฏ Usage Example

```sh
# Using the log function
. dybatpho/init.sh
dybatpho::register_err_handler
dybatpho::info "Greetings from dybatpho!"
```

See more at [example/](example/).

## ๐Ÿ’ฌ Contribution & Support

- Open an Issue or Pull Request if you'd like to suggest ideas, fix bugs, or contribute new modules!
- All feedback and contributions are welcome.

---

**Get started with dybatpho now to optimize your workflow and save time with your Bash scripts!**



Star dybatpho