Swiftpack.co - AlwaysRightInstitute/cows as Swift Package

Swiftpack.co is a collection of thousands of indexed Swift packages. Search packages.
See all packages published by AlwaysRightInstitute.
AlwaysRightInstitute/cows 1.0.10
🐮 ASCII cows for Swift
⭐️ 89
🕓 3 years ago
.package(url: "https://github.com/AlwaysRightInstitute/cows.git", from: "1.0.10")

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: 89
Last commit: 3 years ago
Advertisement: IndiePitcher.com - Cold Email Software for Startups

Release Notes

Wasmercowic
3 years ago

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

Swiftpack is being maintained by Petr Pavlik | @ptrpavlik | @swiftpackco | API | Analytics