Go to file
Maas Lalani 09feddcc61
feat: Add gum style command
Style provides a shell script interface for Lip Gloss. It allows you to
use Lip Gloss to style text without needing to use Go. All of the
styling options are available as flags.

Let's make some text glamorous using bash:

```
gum style \
    --foreground "#FF06B7" --border "double" \
    --margin 2 --padding "2 4" --width 50 \
    "And oh gosh, how delicious the fabulous frizzy frobscottle" \
    "was! It was sweet and refreshing. It tasted of vanilla and" \
    "cream, with just the faintest trace of raspberries on the" \
    "edge of the flavour. And the bubbles were wonderful."
```

Output:

```
╔══════════════════════════════════════════════════╗
║                                                  ║
║                                                  ║
║    And oh gosh, how delicious the fabulous       ║
║    frizzy frobscottle was It was sweet and       ║
║    refreshing. It tasted of vanilla and          ║
║    cream, with just the faintest trace of        ║
║    raspberries on the edge of the flavour.       ║
║    And the bubbles were wonderful.               ║
║                                                  ║
║                                                  ║
╚══════════════════════════════════════════════════╝
```
2022-07-07 13:29:10 -04:00
input feat: Add gum input command 2022-07-07 13:28:52 -04:00
internal feat: add stdin input handling and logging helpers 2022-07-07 13:29:10 -04:00
search feat: Add gum search command 2022-07-07 13:29:10 -04:00
spin feat: Add gum spin command 2022-07-07 13:29:10 -04:00
style feat: Add gum style command 2022-07-07 13:29:10 -04:00
.gitignore Initial commit 2022-07-06 12:05:45 -04:00
go.mod Initial commit 2022-07-06 12:05:45 -04:00
go.sum Initial commit 2022-07-06 12:05:45 -04:00
LICENSE Initial commit 2022-07-06 12:05:45 -04:00
main.go Initial commit 2022-07-06 12:05:45 -04:00
pop.go Initial commit 2022-07-06 12:05:45 -04:00
README.md Initial commit 2022-07-06 12:05:45 -04:00

Soda Pop

Command line utilities to make your command-line pop.

Soda Pop provides utilities to help you create shell scripts make your user's shells pop. Powered by Bubbles and Lip Gloss

Interaction

Input

Prompt your users for input with a simple command.

pop input > answer.text

Allow your users to filter through a list of options by fuzzy searching.

echo Gastropoda >> options.text
echo Bivalvia >> options.text
echo Polyplacophora >> options.text
cat options.text | pop search > selection.text

Loading

Display a progress bar while loading.

pop loading --time 5s

Spinners

Display a spinner while taking some running action. We specify the command to run while showing the spinner, the spinner will automatically stop after the command exits.

pop spin --spinner dot --title "Buying Soda Pop..." -- sleep 5
⣽ Buying Soda Pop...

Styling

Pretty print any string with any layout with one command.

pop style \
    --foreground "#FF06B7" --border "double" \
    --margin 2 --padding "2 4" --width 50 \
    "And oh gosh, how delicious the fabulous frizzy frobscottle was!

Result:

╔══════════════════════════════════════════════════╗
║                                                  ║
║                                                  ║
║    And oh gosh, how delicious the fabulous       ║
║    frizzy frobscottle was!                       ║
║                                                  ║
║                                                  ║
╚══════════════════════════════════════════════════╝

Feedback

Wed love to hear your thoughts on this project. Feel free to drop us a note!

License

MIT


Part of Charm.

The Charm logo

Charm热爱开源 • Charm loves open source