Swiftpack.co - Package - AlwaysRightInstitute/cows

Swiftpack.co is a collection of thousands of indexed Swift packages. Search packages.

AlwaysRightInstitute/cows

🐮 ASCII cows for Swift

cows

Swift3 Swift4 Swift5 macOS tuxOS Wasm

400+ ASCII 🐮s

The list is just an array of strings and can be used wherever.

Examples

         (__)
         (oo)
  /-------\/
 / |     ||
+  ||----||
   ~~    ~~
     Cow


       \(:)/
       (o|o)
  /-----\_/
 /|      |
^ ||----||
  ^^    ^^
 Klingon Cow


                 ________________
         ^__^   /                \
         (oo)  ( Milk is logical. )
  /-------\/ --'\________________/
 / |     ||
*  ||W---||
   ^^    ^^
Mr Spock's cow


      (__)
    /   oo      ______
   |  /\_|     |      \
   |  |___     |       |
   |   ---@    |_______|
*  |  |   ----   |    |
 \ |  |_____
  \|________|
        CompuCow


        ___________________________
       | (__)  (__)  (__)   (__)  |
       | ( oo  ( oo  ( oo   ( oo  |
_______| /\_|  /\_|  /\_|   /\_|  |________
|                                         |
|   _____                        _____    |
|___|   |________________________|   |____|
    |___|                        |___|
              Cow-pooling


  /--------------------/
 / |     ||           /          (__)
*  ||----||          /-----------(oo)
   ^^    ^^                       \/
        Network Virtual Cow
(with separate frontend and backend)


         (__)               (__)  |    |  (__)
         (--)               (--)  |    |  (--)
  /-------\/   /o    /-------\/   |    I   \/-------\
 / |  M  |----< o   / |  L  |----<T    I>----|  D  | \
*  ||----|   /  o  *  ||----|     I    I     |----||  *
   ^^    ^      |     ^^    ^          |     ^    ^^
                |                      |
              Teenage Mutant Ninja Cows

                                  @
               (__)    (__) _____/
            /| (oo) _  (oo)/----/_____    *
  _o\______/_|\_\/_/_|__\/|____|//////== *- *  * -
 /_________   \   00 |   00 |       /== -* * -
[_____/^^\_____\_____|_____/^^\_____]     *- * -
      \__/                 \__/
               Cow-mobile

Usage

import cows

cows.allCows

let someCow = vaca()

API

allCows

Returns an array of cows.

Usage:

#!/usr/bin/swift sh
import cows // @AlwaysRightInstitute

for cow in cows.allCows {
  print("Cow:")
  print(cow)
  print("---")
}

vaca()

Returns a random cow.

Usage:

#!/usr/bin/swift sh
import cows // @AlwaysRightInstitute

print(cows.vaca())

vaca Commandline Tool

The Swift 5 package now includes a commandline tool called vaca. When invoked w/ no arguments it returns a random cow. Otherwise it tries to lookup a cow matching the argument.

Example:

$ swift run vaca
        iiiiIiiii
         '|o o|`
   ________\_/
 / |        |
#  ||ww____||
   ||      ||
   ~~      ~~
 Happy Hannucow!

$ swift run vaca compiler
          (__)
        /  .\/.     ______
       |  /\_|     |      \
       |  |___     |       |
       |   ---@    |_______|
    *  |  |   ----   |    |
     \ |  |_____
      \|________|
CompuCow Discovers Bug in Compiler

Related

  • Original:
    • cows - Node.js cows, the original
    • vaca - Get a random ASCII cow 🐮
    • cows-docker - ASCII cows on Docker

License

MIT © Sindre Sorhus Noze.io port: MIT © ZeeZide GmbH

Github

link
Stars: 83
Last commit: 1 week ago

Releases

Wasmercowic - 2021-01-11T15:52:17

A new version with many cowtastic features, most importantly compatibility w/ SwiftWasm.

  • it properly uses Swift 5 for compilation, when available
  • it now uses Swift's .random function, when available (instead of importing arch specific versions)
  • now includes a vaca CLI tool