Ascii art in windows power shell

7
CIS 216 Highline Community College Dan Morrill ASCII Art in Windows PowerShell

Transcript of Ascii art in windows power shell

Page 1: Ascii art in windows power shell

CIS 216

Highline Community College

Dan Morrill

ASCII Art in Windows PowerShell

Page 2: Ascii art in windows power shell

The Soapy Frog image converterhttp://

ps1.soapyfrog.com/wp-content/uploads/2007/01/convert-image2textps1.txt

http://ps1.soapyfrog.com/2007/01/07/convert-images-to-text-ascii-art/

Some Free Art to converthttp://www.flickr.com/commons

I recommend Flickr Commons for free copyright images

Items you will need for this Project

Page 3: Ascii art in windows power shell

Pulled from Flickr Commons

This is the image I am using

Page 4: Ascii art in windows power shell

This can be done in any Powershell – might be easier to do this on your desktop./convert-image2text.ps1 imagefile

[ -maxwidth nchars ] [-palette ascii | shade | bw ]

CD to the place you put the image and the PS1 file

Do a DIR to make sure both are in the same spot (in this case I am using the desktop)

Run ./convert-image2text.ps1 image.jpg (or what ever you named it)

*Don’t forget to set your execution policy

Run this command in PowerShell

Page 5: Ascii art in windows power shell

And you have a drawing

Challenge: Can you fix the error?

Page 6: Ascii art in windows power shell

Using the GRRR Code from Soapy Frog – make it workThere are errors in thereUse Online Resources Liberally to help you

debug this gamePlay the game, get the high score, play your

winning songhttp://ps1.soapyfrog.com/2007/08/26/grrr-sou

rce-code-including-invaders/

For your Project

Page 7: Ascii art in windows power shell

Questions?