Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/vincent0700/vincent0700-cli
npx vincent0700-cli
https://github.com/vincent0700/vincent0700-cli
Last synced: about 1 month ago
JSON representation
npx vincent0700-cli
- Host: GitHub
- URL: https://github.com/vincent0700/vincent0700-cli
- Owner: Vincent0700
- License: mit
- Created: 2021-01-14T10:39:18.000Z (almost 4 years ago)
- Default Branch: master
- Last Pushed: 2021-06-01T16:57:57.000Z (over 3 years ago)
- Last Synced: 2024-04-29T19:45:04.048Z (8 months ago)
- Language: JavaScript
- Homepage:
- Size: 244 KB
- Stars: 16
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# vincent0700-cli
This is an experimental cli tool to show my profile. Welcome!
## ▩ Preview
[![](./demo.gif)](https://asciinema.org/a/BiZMPXylayQIftIJeR1uXdxBe)
## ▩ Usage
> Tips: Your NodeJs version should be greater than v12 to run this command.
```javascript
$ npx vincent0700-cli
```I have tested it successfully on my macOS terminal. If you're on Windows, perhaps you need to use [Windows Terminal](https://github.com/microsoft/terminal) instead of cmd.exe.
It's just experimental and don't be too critical (ノへ ̄、) If you can't use it, don't be worry. You can also find me through [Telegram](https://t.me/vincent0700) and [Gmail](mailto:[email protected]).
## ▩ How it works
I have serialized each frame of the GIF and saved it as binary file. Then I use url-loader to load each frame and put base64 data into source file. So that i don't need to package image libs into my bundle to parse gif at runtime. It only depends on [chalk](https://github.com/chalk/chalk). So the next step is to render frame by frame.
I use `process.stdout.cursorTo(0, 0)` to draw each frame instead of `console.clear()` to fixed screen splash while repainting. Here is the wiki:
- [Node.js Documentation - TTY](https://nodejs.org/api/tty.html)