Git Product home page Git Product logo

shgif's Introduction

PROJECT IS MOVED

This project is moved to Cj-bc/brick-shgif and changed to Haskell. Please visit there.


Shgif -- shell-gif

shgif is one of the simplest gif-like player made by ASCIIs

description

Shgif is:

  • a Gif-like animation player for .shgif file
  • ASCII animation

Shgif is not:

  • a real-gif player
  • no-gif supported

installation

you can use homebrew and bpkg[WIP] to install shgif:

$ brew tap Cj-bc/shgif
$ brew install shgif
$ bpkg install -g Cj-bc/shgif

bpkg support is in progress...

dependencies

name description
Cj-bc/blib a bash library manager
Cj-bc/libtar treat tar unpack/pack
Cj-bc/libfile parse files into array

usage

# start paying shgif.
# this should have `src` folder on the same directory as `.shgif` file
shgif <yourshgif.shgif>
# start playing shgif with tar/tar.gz
shgif <yourshgif.tar>
shgif <youshgif.tar.gz>

file structure

You should have this directory structure:

projectFile/projectFile.shgif
           /src             /yourAAfile.txt
                            /color         /yourAAfile.txt

where:

projectFile the root directory for the project
projectFile.shgif config file to define how shgif move
src where your AAs are put
yourAAfile.txt your shgif source file
color where your color layer for each src are put
color/yourAAfile.txt color layer of 'yourAAfile.txt'

how to write color layer

You should write color layer for each src file for now. (I'll try to remove this)

the color layer is the file where you can define color for each src. It based on src file, but some feature are added to support color.

how it work

Mainly, it works by defining alias to color. Set the pair of alias and color number at first. then, specify the color to each char using them.

1. Add 2 lines before src

The first/second line in color layer define the pair of color and keyword.

  • First line: setting for foreground color
  • Second line: setting for background color

Note: you can use blink/bold keywords in both lines. When you use this, the specified characters will be blink/bold.

r=10,n=blink
B=231,W=235

Above code sets 'B' to 'background:

shgif's People

Contributors

cj-bc avatar

Watchers

 avatar  avatar

shgif's Issues

Separate to several libraries

This program is actually a by-product of other project(this is not on Github yet)
So, I need to use this methods separately.

support tar archive

It's not good idea to give out directory to show your shgif.
So, Why don't you use tar?

srcの左側の空白を消せるようにする

srcを描く際、例えば目のような形のものを描こうとするとどうしても左側に空白ができてしまう。
これにより、本来消されて欲しくない、先に描画されているところが上書きされてしまう事例がある。

Should we use oo-framework for this project?

The oo-framework is amazing, variable, and really powerfull when we want to make some library.
But is it needed for this small project?
As oo could be included in this repository, there's no problem if the oo go away.
But,, it outputs too many logs when we use bash -x right now(It'll be fixed someday), so that
make maintenance difficult.
Is it a good idea to use it?

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.