Giter Site home page Giter Site logo

fish's Introduction

Ever wanted to have animating fishes for progress bars in your command-line script?

Ever thought about doing it but then realizing you have better things to do with your time than to write meaningless ASCII animation programs?

Now you can have the best of both worlds: introducing fish, the module that makes any program look awesome and display useful data while churning away on some good 'ole data.

Usage? Simple enough:

>>> import fish
>>> while churning:
...     churn_churn()
...     fish.animate()

As a boy, I often dreamed of birds going back and forth as progress bars, so I decided to implement just that:

>>> import fish
>>> bird = fish.Bird()
>>> while churning:
...     churn_churn()
...     bird.animate()

Want to show the current record number?:

>>> from fish import ProgressFish
>>> fish = ProgressFish()
>>> for i, x in enumerate(churning):
...     churn_churn()
...     fish.animate(amount=i)

Want to show numeric progress when you know the total number?:

>>> from fish import ProgressFish
>>> fish = ProgressFish(total=len(data))
>>> for i, datum in enumerate(data):
...     churn_churn()
...     fish.animate(amount=i)

See a demo on YouTube.

The default fish is a simple bass at a pretty good velocity for an ASCII fish.

Possibilities are endless here, gentlemen:

The only limit is yourself.

—zombo.com

Fork on GitHub

fish's People

Contributors

chmullig avatar garrison avatar jnordberg avatar lericson avatar nyanshell avatar

Watchers

 avatar  avatar

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.