mirror of
https://github.com/mjsarfatti/beddu.git
synced 2025-06-26 17:08:01 +02:00
Fix Demo README section
This commit is contained in:
parent
16c840efff
commit
881d91b43b
1 changed files with 16 additions and 19 deletions
35
README.md
35
README.md
|
@ -22,21 +22,17 @@ And you will easily be able to build things like:
|
||||||
- **Visual Indicators**: Spinners, checkmarks, and error symbols
|
- **Visual Indicators**: Spinners, checkmarks, and error symbols
|
||||||
- **Line Manipulation**: Replace previous output for dynamic updates
|
- **Line Manipulation**: Replace previous output for dynamic updates
|
||||||
|
|
||||||
## Installation
|
## Installation and Usage
|
||||||
|
|
||||||
Clone the repository or download `beddu.sh` to your project:
|
**Beddu** is meant to be sourced in your own script.
|
||||||
|
|
||||||
|
1. Download `beddu.sh` to your project:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
# Clone the repository
|
$ curl -O https://raw.githubusercontent.com/mjsarfatti/beddu/main/beddu.sh
|
||||||
git clone https://github.com/mjsarfatti/beddu.git
|
|
||||||
|
|
||||||
# Or just download the compiled script
|
|
||||||
curl -O https://raw.githubusercontent.com/mjsarfatti/beddu/main/beddu.sh
|
|
||||||
```
|
```
|
||||||
|
|
||||||
## Usage
|
2. Source the `beddu.sh` file in your script:
|
||||||
|
|
||||||
Source the `beddu.sh` file in your script:
|
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
@ -46,9 +42,18 @@ source "/path/to/beddu.sh"
|
||||||
pen bold blue "Hello, world!"
|
pen bold blue "Hello, world!"
|
||||||
```
|
```
|
||||||
|
|
||||||
|
## Demo
|
||||||
|
|
||||||
|
To see it in action, clone the repository, then run `make demo`. This will run the same interactive demo that you can see in the video above (please note that a 12MB wikimedia.org random file will be downloaded during the demo to showcase the functionality - a prompt will let you delete it at the end):
|
||||||
|
|
||||||
|
```bash
|
||||||
|
$ git clone https://github.com/mjsarfatti/beddu.git
|
||||||
|
$ make demo
|
||||||
|
```
|
||||||
|
|
||||||
## Examples
|
## Examples
|
||||||
|
|
||||||
More can be seen by looking at the [demo](./beddu.sh) file, but here is a quick overview:
|
More can be seen by looking at the [demo](./demo/demo.sh) file, but here is a quick overview:
|
||||||
|
|
||||||
### Text Formatting and Colors
|
### Text Formatting and Colors
|
||||||
|
|
||||||
|
@ -114,14 +119,6 @@ sleep 1
|
||||||
check "Task completed!" # We can directly `check`, `warn`, or `throw` after a `spin` call - the message will always replace the spin line
|
check "Task completed!" # We can directly `check`, `warn`, or `throw` after a `spin` call - the message will always replace the spin line
|
||||||
```
|
```
|
||||||
|
|
||||||
## Demo
|
|
||||||
|
|
||||||
To see it in action paste the following command in your terminal:
|
|
||||||
|
|
||||||
```bash
|
|
||||||
curl -s https://raw.githubusercontent.com/mjsarfatti/beddu/main/demo/demo.sh | bash
|
|
||||||
```
|
|
||||||
|
|
||||||
## Function Reference
|
## Function Reference
|
||||||
|
|
||||||
### Text Formatting
|
### Text Formatting
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue