https://github.com/pforret/shini
Bash/shell .INI parser
https://github.com/pforret/shini
bash bashew ini-parser
Last synced: 6 months ago
JSON representation
Bash/shell .INI parser
- Host: GitHub
- URL: https://github.com/pforret/shini
- Owner: pforret
- License: mit
- Created: 2021-08-08T17:11:28.000Z (about 4 years ago)
- Default Branch: master
- Last Pushed: 2022-01-25T18:18:00.000Z (over 3 years ago)
- Last Synced: 2025-03-24T13:36:09.320Z (7 months ago)
- Topics: bash, bashew, ini-parser
- Language: Shell
- Homepage:
- Size: 798 KB
- Stars: 5
- Watchers: 2
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
README






[](https://basher.gitparade.com/package/)# shini


Bash .ini config file parser
## 🔥 Usage
```bash
Program: shini 0.0.4 by peter@forret.com
Updated: Aug 8 20:18:27 2021
Description: Bash .ini parser
Usage: shini [-h] [-q] [-v] [-f] [-l ] [-t ] [-d ]
Flags, options and parameters:
-h|--help : [flag] show usage [default: off]
-q|--quiet : [flag] no output [default: off]
-v|--verbose : [flag] output more [default: off]
-f|--force : [flag] do not ask for confirmation (always yes) [default: off]
-l|--log_dir > : [option] folder for log files [default: /Users/pforret/log/shini]
-t|--tmp_dir > : [option] folder for temp files [default: /tmp/shini]
-d|--default > : [option] name of chapter with default values [default: _default]
: [parameter] action to perform: chapters/setall/listall/get
: [parameter] input file (optional)
: [parameter] chapter name (optional)
: [parameter] key name (optional)
@github.com:pforret/shini.git
### TIPS & EXAMPLES
# use `shini chapters` to list all chapters of a .ini file, e.g. to use in a loop
shini chapters production.ini | while read -r chapter ; do (...) done# use shini setall to set all values of a chapter
shini setall production.ini frontend # and now all the variables in .ini have been set# use shini listall to list all values of a chapter
shini listall production.ini frontend
# key1=value1
# key2=value2# use shini get to get the value of 1 key for a certain chapter
port=$(shini get production.ini frontend http_port)# you can add a chapter with default values
[_default]
http_port=80# use shini check to check if this script is ready to execute and what values the options/flags are
shini check# use shini env to generate an example .env file
shini env > .env# use shini update to update to the latest version
shini check
```## ⚡️ Examples
```bash
> shini .
# start PhpStorm with current folder as project
```## 🚀 Installation
with [basher](https://github.com/basherpm/basher)
$ basher install pforret/shini
or with `git`
$ git clone https://github.com/pforret/shini.git
$ cd shini## 📝 Acknowledgements
* script created with [bashew](https://github.com/pforret/bashew)
© 2021 Peter Forret