An sbt plugin for viewing cat pictures. Because if sbt is going to download the entire Internet, it damn well ought to include some cat pictures.
Add the following to your sbt project/plugins.sbt
file:
resolvers += Resolver.url(
"bintray-thricejamie-sbt-plugins",
url("http://dl.bintray.com/thricejamie/sbt-plugins"))(
Resolver.ivyStylePatterns)
addSbtPlugin("com.37pieces" % "sbt-meow" % "0.2")
NOTE this plugin targets sbt 0.13.
Your project now supports the meow
task which will download a random cat picture from the web and render it to your terminal in brilliant ASCII.
> meow
Bam. Cat picture.
By default, The Cat API only serves the first 1000 pictures in its collection. However, if you register for an API key and add it to your project configuration, you can get access to to full collection of cat images.
Add the following setting to your build.sbt
file (substituting your key for the XXXXXX
) and revel in the bounty:
meowCatApiKey := "XXXXXX"
Currently only tested with any thoroughness using bash on OS X. Linux seems mostly happy. Results on Windows will likely be less than impressive.
- The Cat API for providing a ready source of cat images.
- The scala-ascii-art repo for some inspiration and algorithm ideas.
- This really nice gist for a great color translation table that I adapted to my needs.
Copyright (c) 2014-2016 Jamie Paulson
Published under The MIT License, see LICENSE