A Terminal (ASCII Art) Processing Interpreter.
Tested on Linux (Ubuntu/Debian based distributions). Mac OS X and Windows (Cygwin/MINGW) should be possible.
- libCaca/ncurses
- Perl (File::Slup and File::copy Modules)
- GNU C++ Compiler
Installing requirements on Ubuntu/Debian:
sudo apt-get install libfile-slurp-perl libcaca0 libcaca-dev git ncurses
###Installation Get Processing-Terminal from Github
git clone https://github.com/rlfbckr/p5terminal
Add processing-terminal to your PATH or add an alias in .bashrc
alias p5terminal="/path/to/processing-terminal/src/p5terminal"
Processing-Terminal consists of two parts:
- C/C++ framework that mimics the Processing-core functions (e.g. draw(), line(), rect(), map())
- A Perl-Script that builds and runs the processing-code (similar to Arduino)
The Perl-Script processing-terminal does the following:
processing-terminal demo.pde
- It reads the given .pde file
- It adds an #include of the processing-terminal.h header file to the first line
- Precompiles the processing code
- generating C function headers
- inserts missing setup() and draw() functions
- translates java syntax to C syntax
- Adds an a main function
- Builds and executable of the precompiled C code
- create a build directory in the current path
- copys the required C files and headers into the build directory
- builds the executable with g++:
- Executes the build
- Restores the terminal (stty sane)
An example build command looks like this
g++ -Wall -g -o build/demo build/p5terminal.c build/demo.c -Wall -lcaca -lpthread