Created
February 13, 2019 18:52
-
-
Save nohwnd/4f7713a3548a9bb376b47c0a0129d930 to your computer and use it in GitHub Desktop.
Ascii art from api
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function Get-Banner { | |
param ( | |
[Parameter(Mandatory)] | |
[String] $Text | |
) | |
if (-not $fonts) { | |
$fonts = (Invoke-RestMethod -Method GET -Uri 'http://artii.herokuapp.com/fonts_list') -split "`n" | |
} | |
$f = Get-Random -Minimum 0 -Maximum $fonts.Length | |
$font = $fonts[$f] | |
$escapedFont = [Uri]::EscapeUriString($font) | |
$escapedText = [Uri]::EscapeUriString($Text) | |
$banner = Invoke-RestMethod -Method GET -Uri "http://artii.herokuapp.com/make?text=$escapedText&font=$escapedFont" | |
Write-Host $banner -ForegroundColor Magenta | |
} | |
foreach ($none in 1.. 10) { | |
Get-Banner -Text "PSPowerHour" | |
Start-Sleep -Seconds 1 | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment