Skip to content

ggodefroid/wimd

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 

Repository files navigation

It Fucken Wimdy

A simple Node.js server that streams a live ASCII animation directly to your terminal using curl.

The Inspiration

It all started when I discovered the magic command curl -NL party.hotdogstand.lol, which change the color of the terminal with simple ascii color inputs from the server and I decided to create my own version: a fox battling against strong gusts of wind!

How does it work? (Terminal Magic)

There is no dark magic involved, just a clever combination of two standard technologies:

  1. Chunked Streaming (HTTP): Instead of sending a complete web page and then closing the connection, the Node.js server keeps the connection open (Connection: keep-alive) and sends the text piece by piece (Transfer-Encoding: chunked). The terminal therefore receives an endless stream of text.
  2. ANSI Escape Sequences: These are invisible codes sent to the terminal.
    • They allow text coloring (e.g., \x1b[38;5;208m for the fox's orange color).// the thing that hotdogstand is doing.
    • The animation Instead of printing thousands of foxes one below the other, this code instructs the terminal to move its cursor back to the top-left corner. Thus, "Frame 2" overwrites "Frame 1", creating a fluid animation much like a flipbook.

How to test this project locally

If you want to see the fox face the storm on your own computer, follow these steps:

Prerequisites

  • Node.js installed on your machine.
  • A terminal (or command prompt).

Installation & Launch

  1. Clone this repository and navigate into the folder:
    git clone [https://github.com/ggodefroid/wimd.git](https://github.com/ggodefroid/wimd.git)
    cd wimd

About

A simple Node.js server that streams an animated ASCII fox directly to your terminal via curl.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors