Ecosyste.ms: Awesome

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

Awesome Lists | Featured Topics | Projects

https://github.com/splurf/donut.live

Tribute to parrot.live, with donuts.
https://github.com/splurf/donut.live

curl donut rust rust-networking terminal

Last synced: about 1 month ago
JSON representation

Tribute to parrot.live, with donuts.

Awesome Lists containing this project

README

        

# donut.live

A tribute to [parrot.live](https://github.com/hugomd/parrot.live). Here it is in donut form.

## Demo - Try It
```
curl donut.rustychads.com
```



## Description
HTTP server that distributes frames of a rotating donut to every [curl](https://en.wikipedia.org/wiki/CURL) client.
- The program can also be provided a custom GIF file (via the `--gif` flag). In this case, each frame from the GIF will be automatically converted into ASCII art. These frames will then be distributed with a frame rate based on the original delay of each frame. If the delay of each frame isn't properly set, then a manual frame rate is required. This can be fixed with the `--fps` flag.

## Usage
```
Usage: donut-live [OPTIONS]

Options:
-a, --addr IP address [default: 127.0.0.1]
-p, --port Port number [default: 8080]
--path URI location path [default: /]
-g, --gif Custom provided GIF
--fps Custom Frames/sec
-c, --colored Enable/Disable color
-f, --force-colored Ensure 'COLORTERM' and 'CLICOLOR_FORCE' are set
-h, --help Print help
-V, --version Print version
```

## Other Live Demos
- `bad-apple.rustychads.com`
- `shrek.rustychads.com`

## Todo
+ Improve [trim_frames](https://github.com/splurf/donut.live/blob/44165a131ca8e5f2eb8917dce019a0e39a4d0ecc/src/base/donut.rs#L96) by removing **all** possible redundant ASCII-whitespace from every frame.

## Notes
+ This works for terminals that support [ANSI Escape Sequences](https://en.wikipedia.org/wiki/ANSI_escape_code).

## Credit
+ The [gen_frame](https://github.com/splurf/donut.live/blob/44165a131ca8e5f2eb8917dce019a0e39a4d0ecc/src/base/donut.rs#L15) function within `util.rs` heavily references the original [donut.c](https://www.a1k0n.net/2011/07/20/donut-math.html) script.