ts-animal
v0.1.5
Published
ts-animal is a sophisticated Command Line Interface (CLI) package designed to showcase captivating ASCII animation art within the animal category. We invite you to immerse yourself in our TypeScript-powered animal world, where creativity meets technology.
Downloads
59
Readme
ts-animal
🤹♀️ Introduction
ts-animal
is a sophisticated Command Line Interface (CLI) package designed to showcase captivating ASCII animation art within the animal category. We invite you to immerse yourself in our TypeScript-powered animal world, where creativity meets technology. Welcome to a realm where animated artistry comes to life in the command line environment. 🌐🦁
Installation
If you want to try it out before installing globally, you can (1) start with npx (2) or check out codesandbox
$ npm i -g ts-animal
# or start with npx
$ npx ts-animal dance tiger
⭐️ Getting started: ASCII Animal
$ ts-animal dance tiger
🔍 Options: ASCII Animal
$ ts-animal dance tiger --repeat=3 --speed=1800 --color=red
⭐️ Getting started: Progress Bar
Below example is showing how to add progress feature with your cli.
const { makeProgress } = require("ts-animal/progress");
const { update, done, show } = makeProgress({ animal: 'tiger', start: 30, displayBar: true });
show();
const something = () =>
new Promise((resolve) => {
setTimeout(() => {
resolve(Math.round(Math.random()));
}, 1000);
});
(async () => {
const items = Array.from({ length: 50 });
for (const _ of items) {
const res = await something();
update();
if (res) {
done();
return;
}
}
})();
🔍 Options: Progress
const { makeProgress } = require("ts-animal/progress");
const { update, done, show } = makeProgress({
animal: 'tiger',
start: 0,
end: 100,
displayBar: true
});
🏰 Run locally with repository
$ pnpm i
$ pnpm dance {animal}
# ex
$ pnpm dance tiger
$ pnpm dance rabbit
✨ How to contribute
- make animal named folder in src/zoo.
- make frames as text files in zoo folder. No matter txt files name, but make sure files name and frames are sorted.
- please check first npx run list, to prevent duplicated name.
🔖 Our animals
- 🐯 tiger: https://asciiart.cc/view/12694
- 🐰 rabbit: https://bento.me/tolluset
- 🐱 cat
- 🐾 bear-sleeping, bunny-angry, cat-coffee, rabbit-blink, sheep-fire : ascii-animal-generator GPTs
🤖 Contributors
🫶 Support
ascii-animal generator
We have GPTs that help us draw ASCII art.
- https://chat.openai.com/g/g-e3MZC7wjL-ascii-animal-generator
ts-animal Devbox
There is CodeSandbox where you can try out packages without global installation.
- fork the devbox
- use terminal
💌 Stay in touch
E-mail - [email protected]
💎 License
ts-animal with MIT licensed.