From d57ff612733abdb806b6d41201b644b7d2573386 Mon Sep 17 00:00:00 2001 From: Markus Fleschutz Date: Thu, 5 Aug 2021 14:45:53 +0200 Subject: [PATCH] Rename to write-joke.ps1 --- README.md | 4 ++-- Scripts/speak-joke.ps1 | 6 ++---- Scripts/{next-joke.ps1 => write-joke.ps1} | 6 +++--- 3 files changed, 7 insertions(+), 9 deletions(-) rename Scripts/{next-joke.ps1 => write-joke.ps1} (83%) diff --git a/README.md b/README.md index 6e5b9110..21f6e8bb 100644 --- a/README.md +++ b/README.md @@ -26,7 +26,7 @@ Mega Collection of PowerShell Scripts * [speak-french.ps1](Scripts/speak-french.ps1) - speaks the given text with a French text-to-speech (TTS) voice * [speak-german.ps1](Scripts/speak-german.ps1) - speaks the given text with a German text-to-speech (TTS) voice * [speak-italian.ps1](Scripts/speak-italian.ps1) - speaks the given text with an Italian text-to-speech (TTS) voice -* [speak-joke.ps1](Scripts/speak-joke.ps1) - speaks the next joke by text-to-speech (TTS) +* [speak-joke.ps1](Scripts/speak-joke.ps1) - speaks a random Chuck Norris joke by text-to-speech (TTS) * [speak-test.ps1](Scripts/speak-test.ps1) - performs a speak test by text-to-speech (TTS) * [speak-text.ps1](Scripts/speak-text.ps1) - speaks the given text by text-to-speech (TTS) * [speak-time.ps1](Scripts/speak-time.ps1) - speaks the current time by text-to-speech (TTS) @@ -218,7 +218,6 @@ Mega Collection of PowerShell Scripts * [locate-ipaddress.ps1](Scripts/locate-ipaddress.ps1) - prints the geographic location of the given IP address * [locate-zip-code.ps1](Scripts/locate-zip-code.ps1) - prints the geographic location of the given zip-code * [moon.ps1](Scripts/moon.ps1) - prints the current moon phase -* [next-joke.ps1](Scripts/next-joke.ps1) - gets the next random Juck Norris joke * [reboot-fritzbox.ps1](Scripts/reboot-fritzbox.ps1) - reboots the FRITZ!box device * [scan-ports.ps1](Scripts/scan-ports.ps1) - scans the network for open/closed ports * [send-email.ps1](Scripts/send-email.ps1) - sends an email message @@ -242,6 +241,7 @@ Mega Collection of PowerShell Scripts * [write-braille.ps1](Scripts/write-braille.ps1) - writes the given text in Braille * [write-green.ps1](Scripts/write-green.ps1) - writes the given text in a green foreground color * [write-lowercase.ps1](Scripts/write-lowercase.ps1) - writes the given text in lowercase letters +* [write-joke.ps1](Scripts/write-joke.ps1) - writes a random Juck Norris joke * [write-marquee.ps1](Scripts/write-marquee.ps1) - writes the given text as marquee * [write-morse-code.ps1](Scripts/write-morse-code.ps1) - writes the given text in Morse code * [write-motd.ps1](Scripts/write-motd.ps1) - writes the message of the day (MOTD) diff --git a/Scripts/speak-joke.ps1 b/Scripts/speak-joke.ps1 index 7ee10f91..4a0295ef 100755 --- a/Scripts/speak-joke.ps1 +++ b/Scripts/speak-joke.ps1 @@ -2,7 +2,7 @@ .SYNOPSIS speak-joke.ps1 .DESCRIPTION - Speaks the next joke by text-to-speech (TTS) + Speaks a random Chuck Norris joke by text-to-speech (TTS) .EXAMPLE PS> .\speak-joke.ps1 .LINK @@ -13,9 +13,7 @@ #> try { - $PathToRepo = "$PSScriptRoot/.." - - $Table = import-csv "$PathToRepo/Data/jokes.csv" + $Table = import-csv "$PSScriptRoot/../Data/jokes.csv" $Generator = New-Object System.Random $Index = [int]$Generator.next(0,66) diff --git a/Scripts/next-joke.ps1 b/Scripts/write-joke.ps1 similarity index 83% rename from Scripts/next-joke.ps1 rename to Scripts/write-joke.ps1 index 33418ac1..192e6de5 100755 --- a/Scripts/next-joke.ps1 +++ b/Scripts/write-joke.ps1 @@ -1,10 +1,10 @@ <# .SYNOPSIS - next-joke.ps1 + write-joke.ps1 .DESCRIPTION - Prints the next random Juck Norris joke + Writes a random Juck Norris joke to the console. .EXAMPLE - PS> .\next-joke.ps1 + PS> .\write-joke.ps1 .LINK https://github.com/fleschutz/PowerShell .NOTES