Package: dinosay
dinosaydinosayis a humble, simple, nice and paleolithic alternative tocowsay.How did the idea come about?The idea came from my two children.
To make them learn the syllables and then how to assemble them to form words,
I used cowsay on my terminal, so that they learned while having fun.
One day, they asked me: "Dad, isn't there a way to make a dinosaur talk too?" (both are dinosaur fans, like me).
So I usedcowsay -f ~/dinosaur.cow, but I made a very simple one.
The next day, I thought about how to reproduce it in python (my primary programming language) and opened this project.Differencesdinosayis an alternative and not a replacement. The library is not meant to be cowsay's rewrite.
If you are looking for this then you need to go topycowsay.Featuresdinosayimplements most of the functionality of cowsay, adding freedom in the individual elements.
For example, you can add thetongueelement or replace the eyes by specifying theeyeparameter.
If you have suggestions or new implementations, or you are an ASCII designer and would like your template to be added
to the dinosaur library, open anissueusing thedinosay-enhancementissue template,
attaching your creation if possible. Below you will find instructions for building your template.InstallationUnlike its cousin cowsay,dinosayis written in python.dinosaycan be used on the command line or as a python module, to give a dinosaur touch!For install package, see below:$pipinstalldinosay# for python enviroment$dnfcoprenablematteoguadrini/dinosay$dnfinstallpython-dinosay-y# for Red Hat, CentOS, Mageia and fedora$wgethttps://github.com/MatteoGuadrini/dinosay/releases/download/<version>/dinosay-<version>-1.noarch.rpm-Odinosay.rpm$yast-idinosay.rpm# for SLES and OpenSUSE$apt-getinstallalien# for debian based and ubuntu based, see here$alien-idinosay.rpm$gitclonehttps://github.com/MatteoGuadrini/dinosay.git&&cddinosay$pythonsetup.pyinstall# for otherCommand lineFrom the command line,dinosaylooks like this:$dinosay--helpusage: dinosay [-h] [--version] (-d DINOSAUR | -r | -f FILE | -l) [-c COLOR] [-b BEHAVIOR] [-i][-t] [-e EYE] [-w WRAP][message]print messages via ASCII dinosaurspositional arguments:message               message to printoptional arguments:-h, --help            show this help message and exit--version, -v         show program's version number and exit-d DINOSAUR, --dinosaur DINOSAURdinosaur to print-r, --random          random dinosaur to print-f FILE, --file FILE  file containing ASCII to print-l, --list            list of all dinosaurs and parts-c COLOR, --color COLORcolor dinosaur-b BEHAVIOR, --behavior BEHAVIORbehavior of dinosaur-i, --idea            idea's speech bubble-t, --tongue          shape of the tongue-e EYE, --eye EYE     shape of the eye-w WRAP, --wrap WRAP  length of the message_____     __     __   __     ______     ______     ______     __  __/\  __-.  /\ \   /\ "-.\ \   /\  __ \   /\  ___\   /\  __ \   /\ \_\ \\ \ \/\ \ \ \ \  \ \ \-.  \  \ \ \/\ \  \ \___  \  \ \  __ \  \ \____ \\ \____-  \ \_\  \ \_\\"\_\  \ \_____\  \/\_____\  \ \_\ \_\  \/\_____\\/____/   \/_/   \/_/ \/_/   \/_____/   \/_____/   \/_/\/_/   \/_____/$dinolistDINOSAY list elements and dinosaurs===================================DINOSAURS - ALIAS:          BEHAVIOR:      EYE:                 COLORS:- tyrannosaurus - trex      - normal       - classic:  O O      - purple- dimetrodon - dim          - happy        - borg:     = =      - cyan- ankylosaur - anky         - joking       - stoned:   * *      - darkcyan- hypsilophodon - hypsi     - lazy         - glass:    0-0      - blue- stegosaurus - stego       - tired        - hypno:    @ @      - green- deinonychus - deino       - nerd         - rage:     ° °      - yellow- pterodactyl - ptero       - cyborg       - ko:       x x      - red- archaeopteryx - archa     - dead         - happy:    ^ ^      - default- maiasaur - maia           - trance       - closed:   - -- pleisiosaur - plei        - stoned- brachiosaur - brachio- corythosaur - cory- parasaurolophus - para- triceratops - tricePython moduleInstead, using it as a python module, we'll do it like this:fromdinosayimportdinoprint,DINO_TYPEmsg="Hi, I'm dinosay!"dinoprint(msg,DINO_TYPE['tyrannosaurus'])Or like this:fromdinosayimportdinostring,DINO_ALIASmsg="Hi, I'm dinosay!"returndinostring(message,DINO_ALIAS['brachio'],'happy')Custom templateIf you want to build a custom template to parse to cowsay'sfileparameter, then you should follow these guidelines.The template will have to use ASCII characters, and can use some substitution variables.
The variables are included in this table:NameDescription$comicVariable indicating the positioning of the message to be printed. IMPORTANT! if it is missing, the message will NOT be printed.$eyesVariable indicating the substitution characters of the eyes. The pattern must be the following:character-space-character.$eyeSame as$eyesbut only prints the first character, so it represents a single eye.$tongueVariable indicating language substitution characters. It can be single, or multiple, for example\_\.Simple template exampleThis is a simple template:$cat<<EOF>>/tmp/trex.ascii$comicO_/  >-  >   ^\/   >  ^ /($eye)  > ^ /   / / /_____                        |            \\|///  __ \                      _/      /     / _//  /  | |                    /       /     / /_/  |___/ /                  _/      ------_/ /==_|  \____/                 _/       /  ______/\   \                 __/           |\|   \_          ____/              / \      _\    \________/                  |\  \----/_V\_                              / \_______ V\__                /       \ /          V\               \        \\______         \_       \\__________\_      \/    /    \_    ||   _/       \   |/  _/          \  ||  /            |  |\  \__          |   \__/\____=\       /\_____=\EOF$dinosay-f/tmp/trex.ascii-ehappy"I'm a crazy dinosaur"Open sourcedinosayis a open source project. Any contribute, It's welcome.A great thanks.For donations, press thisFor meForTelethonThe Telethon Foundation is a non-profit organization recognized by the Ministry of University and Scientific and Technological Research.
They were born in 1990 to respond to the appeal of patients suffering from rare diseases.
Come today, we are organized to dare to listen to them and answers, every day of the year.Adopt the futureAcknowledgmentsThanks to Mark Lutz for writing theLearning PythonandProgramming Pythonbooks that make up my python foundation.Thanks to Kenneth Reitz and Tanya Schlusser for writing theThe Hitchhiker’s Guide to Pythonbooks.Thanks to Dane Hillard for writing thePractices of the Python Probooks.Special thanks go to my wife, who understood the hours of absence for this development.
Thanks to my children, for the daily inspiration they give me and to make me realize, that life must be simple.Thanks Python!