Giter Site home page Giter Site logo

con-dog / clippy Goto Github PK

View Code? Open in Web Editor NEW
22.0 1.0 5.0 14.55 MB

Create animated ASCII-art for the command line almost instantly!

License: GNU General Public License v3.0

Python 100.00%
python cmd cmdline ascii ascii-art ascii-graphics command-line bash animation art opensource contributions-welcome roguelike roguelike-game game-development cli standard-library tui cui terminal

clippy's Introduction

clippy

Create and play colored 🟥🟩🟦 or colorless ⬛️⬜️ animated, or static, ASCII-art in the command line! Tested in CMD only

clippy can help if you are wanting to;

  • Develop a rogue-like ASCII game
  • Develop word games (animate text)
  • Develeop TUI's or CUI's
  • Develop a Terminal screensaver
  • Create animated logos for your scripts
  • Make ASCII-art
  • Make coloured ASCII art
  • Make animated ASCII art
  • Only use the Python standard library!

Applicability

Tested only in CMD on Windows 10

State

OPEN TO CONTRIBUTIONS

Example Animation

Get this clip From this txt file/s!

.................
........~...v....
.........../|....
.....v..../_|__..
.........\-----/.
~~~~~~~~~`~~~~~~'

How clippy works

clippy looks at all the txt files in a directory, and sequentially prints each file to the console in the same line/column position. If the color flaf is passed, it maps colors onto each frame.

Each txt file acts as a 'frame' of the clip; Minor variations between these text files creates the animation!

Make your own animations

Steps

  1. Create a sub-directory inside the 'art' directory. Eg: under sea/boats. Give it a meaningful name eg: "small_boat_1" for a sailing boat animation
clip
   ├───art
   ├───animals
   ...
   ...
   └───sea
       └───boats
           └───small_boat_1
  1. In this folder create 2 sub-directories: 'ascii' and 'color'
clip
   ├───art
   ├───animals
   ...
   ...
   └───sea
       └───boats
           └───small_boat_1
               ├───ascii
               └───color
  1. In the 'ascii' sub-directory create a base/template txt file. Your ASCII-art template will live in here. Do it yourself or get ideas from https://www.asciiart.eu/ Eg: your base might have some ASCII-art like this in it (or anything you want!)
 clip
  ├───art
  ├───animals
  ...
  ...
  └───sea
      └───boats
          └───small_boat_1
              ├───ascii
              |       └───small_boat_1a.txt
              |       └───small_boat_1b.txt
              |       ...
              |       ...
              |       └───small_boat_1h.txt
              └───color

The text file might look something like this:

.................
........~...v....
.........../|....
.....v..../_|__..
.........\-----/.
~~~~~~~~~`~~~~~~'

  1. Make copies of this file, and in each copy, make some minor changes!

For the example below I've shifted the boat left, and added a seagull:

.....\,/.........
~...v............
.../|............
../_|__..........
.\-----/.........
~`~~~~~~'~~~~~~~~

  1. Run clip.py and pass the relative path of the directory containing your txt files (frames), pass it the speed (1-100), and pass it the number of cycles to run (1-1000)

  2. Enjoy and contribute your art here! Submit a pull request of your art to this repo!

ROADMAP

  1. Update steps and add steps to do color
  2. Build library of ASCII-art and animated ASCII-art
  3. Auto-colour terminal art
  4. Generative ASCII-art

clippy's People

Contributors

con-dog avatar joshjetson avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

clippy's Issues

Default example doesn't work

Am I doing something wrong? I'm running the code exactly as in the readme.

(base) ryan@sisko~/etc/clippy 13:50:42 $ python clip.py art/sea/boats/small_boat_1/ 100 3 -c
sh: color: command not found
sh: cls: command not found
Traceback (most recent call last):
  File "clip.py", line 376, in <module>
    clippy(args.path, args.speed, args.cycles, args.color)
  File "clip.py", line 370, in clippy
    clip = Clip(path, speed, cycles, color)
  File "clip.py", line 205, in __init__
    raise ClipException("""
__main__.ClipException: 
                    Your folder specified by path, must contain a subfolder 
                    called 'ascii'. This ascii subfolder must contain at least 
                    1 txt file. Your folder hierarchy should look similar to:

                    C:.
                    └───art
                        ├───animals
                        ├───buildings
                        │   └───castles
                        ...     └───my_folder
                                    └───ascii
                                        └───my_art_1.txt
                                        └───my_art_2.txt
                                        ...
                                        ...
                                        └───my_art_n.txt

                    
(base) ryan@sisko~/etc/clippy 13:50:43 $ ls art/sea/boats/small_boat_1/ascii/
small_boat_1a.txt	small_boat_1d.txt	small_boat_1g.txt	small_boat_1j.txt	small_boat_1m.txt
small_boat_1b.txt	small_boat_1e.txt	small_boat_1h.txt	small_boat_1k.txt	small_boat_1n.txt
small_boat_1c.txt	small_boat_1f.txt	small_boat_1i.txt	small_boat_1l.txt	small_boat_1o.txt

Thanks for a cute and creative library!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.