From 9a1f0113e09b4699dd83798baf429a9ee3492a6b Mon Sep 17 00:00:00 2001 From: Markus Fleschutz Date: Mon, 27 Sep 2021 08:35:45 +0200 Subject: [PATCH] Update description --- Scripts/speak-date.ps1 | 4 ++-- Scripts/speak-english.ps1 | 4 ++-- Scripts/speak-epub.ps1 | 2 +- Scripts/speak-file.ps1 | 4 ++-- Scripts/speak-french.ps1 | 4 ++-- Scripts/speak-german.ps1 | 2 +- Scripts/speak-italian.ps1 | 4 ++-- Scripts/speak-joke.ps1 | 4 ++-- Scripts/speak-quote.ps1 | 4 ++-- Scripts/speak-spanish.ps1 | 4 ++-- Scripts/speak-test.ps1 | 4 ++-- Scripts/speak-text.ps1 | 10 +++++----- Scripts/speak-time.ps1 | 4 ++-- Scripts/start-calibre-server.ps1 | 4 ++-- Scripts/start-ipfs-server.ps1 | 4 ++-- Scripts/switch-branch.ps1 | 4 ++-- Scripts/switch-shelly1.ps1 | 9 +++++---- Scripts/sync-repo.ps1 | 4 ++-- 18 files changed, 40 insertions(+), 39 deletions(-) diff --git a/Scripts/speak-date.ps1 b/Scripts/speak-date.ps1 index 248139b9..e06f2e72 100755 --- a/Scripts/speak-date.ps1 +++ b/Scripts/speak-date.ps1 @@ -2,9 +2,9 @@ .SYNOPSIS speak-date.ps1 .DESCRIPTION - Speaks the current date by text-to-speech (TTS). + Speaks the current date by text-to-speech (TTS) .EXAMPLE - PS> .\speak-date.ps1 + PS> ./speak-date .NOTES Author: Markus Fleschutz · License: CC0 .LINK diff --git a/Scripts/speak-english.ps1 b/Scripts/speak-english.ps1 index e0c324bd..e552a6e8 100755 --- a/Scripts/speak-english.ps1 +++ b/Scripts/speak-english.ps1 @@ -2,9 +2,9 @@ .SYNOPSIS speak-english.ps1 [] .DESCRIPTION - Speaks the given text with an English text-to-speech (TTS) voice. + Speaks the given text with an English text-to-speech (TTS) voice .EXAMPLE - PS> .\speak-english.ps1 "Hello World" + PS> ./speak-english "Hello World" .NOTES Author: Markus Fleschutz · License: CC0 .LINK diff --git a/Scripts/speak-epub.ps1 b/Scripts/speak-epub.ps1 index 8fd03436..a0068ba1 100755 --- a/Scripts/speak-epub.ps1 +++ b/Scripts/speak-epub.ps1 @@ -4,7 +4,7 @@ .DESCRIPTION Speaks the content of the given Epub file by text-to-speech (TTS). .EXAMPLE - PS> .\speak-epub.ps1 C:\MyBook.epub + PS> ./speak-epub C:\MyBook.epub .NOTES Author: Markus Fleschutz · License: CC0 .LINK diff --git a/Scripts/speak-file.ps1 b/Scripts/speak-file.ps1 index d7037d5e..0201db6b 100755 --- a/Scripts/speak-file.ps1 +++ b/Scripts/speak-file.ps1 @@ -2,9 +2,9 @@ .SYNOPSIS speak-file.ps1 [] .DESCRIPTION - Speaks the content of the given text file by text-to-speech (TTS). + Speaks the content of the given text file by text-to-speech (TTS) .EXAMPLE - PS> .\speak-file.ps1 C:\MyFile.txt + PS> ./speak-file C:\MyFile.txt .NOTES Author: Markus Fleschutz · License: CC0 .LINK diff --git a/Scripts/speak-french.ps1 b/Scripts/speak-french.ps1 index 2413d597..8d5d012e 100644 --- a/Scripts/speak-french.ps1 +++ b/Scripts/speak-french.ps1 @@ -2,9 +2,9 @@ .SYNOPSIS speak-french.ps1 [] .DESCRIPTION - Speaks the given text with a French text-to-speech (TTS) voice. + Speaks the given text with a French text-to-speech (TTS) voice .EXAMPLE - PS> .\speak-french.ps1 Salut + PS> ./speak-french Salut .NOTES Author: Markus Fleschutz · License: CC0 .LINK diff --git a/Scripts/speak-german.ps1 b/Scripts/speak-german.ps1 index d3d87ad2..7f23d825 100755 --- a/Scripts/speak-german.ps1 +++ b/Scripts/speak-german.ps1 @@ -4,7 +4,7 @@ .DESCRIPTION Speaks the given text with a German text-to-speech (TTS) voice. .EXAMPLE - PS> .\speak-german.ps1 Hallo + PS> ./speak-german Hallo .NOTES Author: Markus Fleschutz · License: CC0 .LINK diff --git a/Scripts/speak-italian.ps1 b/Scripts/speak-italian.ps1 index eccdf885..e8ec2373 100755 --- a/Scripts/speak-italian.ps1 +++ b/Scripts/speak-italian.ps1 @@ -2,9 +2,9 @@ .SYNOPSIS speak-italian.ps1 [] .DESCRIPTION - Speaks the given text with an Italian text-to-speech (TTS) voice. + Speaks the given text with an Italian text-to-speech (TTS) voice .EXAMPLE - PS> .\speak-italian.ps1 Ciao + PS> ./speak-italian Ciao .NOTES Author: Markus Fleschutz · License: CC0 .LINK diff --git a/Scripts/speak-joke.ps1 b/Scripts/speak-joke.ps1 index a8188dec..928b21a5 100755 --- a/Scripts/speak-joke.ps1 +++ b/Scripts/speak-joke.ps1 @@ -2,9 +2,9 @@ .SYNOPSIS speak-joke.ps1 .DESCRIPTION - Speaks a random Chuck Norris joke by text-to-speech (TTS). + Speaks a random Chuck Norris joke by text-to-speech (TTS) .EXAMPLE - PS> .\speak-joke.ps1 + PS> ./speak-joke .NOTES Author: Markus Fleschutz · License: CC0 .LINK diff --git a/Scripts/speak-quote.ps1 b/Scripts/speak-quote.ps1 index 919cff50..617e43a0 100755 --- a/Scripts/speak-quote.ps1 +++ b/Scripts/speak-quote.ps1 @@ -2,9 +2,9 @@ .SYNOPSIS speak-quote.ps1 .DESCRIPTION - Speaks a random quote by text-to-speech (TTS). + Speaks a random quote by text-to-speech (TTS) .EXAMPLE - PS> .\speak-quote.ps1 + PS> ./speak-quote .NOTES Author: Markus Fleschutz · License: CC0 .LINK diff --git a/Scripts/speak-spanish.ps1 b/Scripts/speak-spanish.ps1 index 828c79af..48998a86 100755 --- a/Scripts/speak-spanish.ps1 +++ b/Scripts/speak-spanish.ps1 @@ -2,9 +2,9 @@ .SYNOPSIS speak-spanish.ps1 [] .DESCRIPTION - Speaks the given text with a Spanish text-to-speech (TTS) voice. + Speaks the given text with a Spanish text-to-speech (TTS) voice .EXAMPLE - PS> .\speak-spanish.ps1 Hola + PS> ./speak-spanish Hola .NOTES Author: Markus Fleschutz · License: CC0 .LINK diff --git a/Scripts/speak-test.ps1 b/Scripts/speak-test.ps1 index b9c3e761..596ddff6 100755 --- a/Scripts/speak-test.ps1 +++ b/Scripts/speak-test.ps1 @@ -2,9 +2,9 @@ .SYNOPSIS speak-test.ps1 .DESCRIPTION - Performs a text-to-speech (TTS) test. + Performs a text-to-speech (TTS) test .EXAMPLE - PS> .\speak-test.ps1 + PS> ./speak-test .NOTES Author: Markus Fleschutz · License: CC0 .LINK diff --git a/Scripts/speak-text.ps1 b/Scripts/speak-text.ps1 index dd9fe200..2147db75 100755 --- a/Scripts/speak-text.ps1 +++ b/Scripts/speak-text.ps1 @@ -2,22 +2,22 @@ .SYNOPSIS speak-text.ps1 [] .DESCRIPTION - Speaks the given text by text-to-speech (TTS). + Speaks the given text by the default text-to-speech (TTS) voice .EXAMPLE - PS> .\speak-text.ps1 "Hello World" + PS> ./speak-text "Hello World" .NOTES Author: Markus Fleschutz · License: CC0 .LINK https://github.com/fleschutz/PowerShell #> -param([string]$Text = "") +param([string]$text = "") try { - if ($Text -eq "") { $Text = read-host "Enter the text to speak" } + if ($text -eq "") { $text = read-host "Enter the text to speak" } $Voice = new-object -ComObject SAPI.SPVoice - $Result = $Voice.Speak($Text) + [void]$Voice.Speak($text) exit 0 } catch { "⚠️ Error: $($Error[0]) ($($MyInvocation.MyCommand.Name):$($_.InvocationInfo.ScriptLineNumber))" diff --git a/Scripts/speak-time.ps1 b/Scripts/speak-time.ps1 index 51e26cd4..c3e40189 100755 --- a/Scripts/speak-time.ps1 +++ b/Scripts/speak-time.ps1 @@ -2,9 +2,9 @@ .SYNOPSIS speak-time.ps1 .DESCRIPTION - Speaks the current time by text-to-speech (TTS). + Speaks the current time by text-to-speech (TTS) .EXAMPLE - PS> .\speak-time.ps1 + PS> ./speak-time .NOTES Author: Markus Fleschutz · License: CC0 .LINK diff --git a/Scripts/start-calibre-server.ps1 b/Scripts/start-calibre-server.ps1 index 05a788a3..48bc8656 100755 --- a/Scripts/start-calibre-server.ps1 +++ b/Scripts/start-calibre-server.ps1 @@ -2,9 +2,9 @@ .SYNOPSIS start-calibre-server.ps1 [] .DESCRIPTION - Starts a local Calibre server as background process (Web port number is 8099 by default). + Starts a local Calibre server as background process (Web port number is 8099 by default) .EXAMPLE - PS> .\start-calibre-server.ps1 + PS> ./start-calibre-server .NOTES Author: Markus Fleschutz · License: CC0 .LINK diff --git a/Scripts/start-ipfs-server.ps1 b/Scripts/start-ipfs-server.ps1 index 85dd25f0..14f5a684 100755 --- a/Scripts/start-ipfs-server.ps1 +++ b/Scripts/start-ipfs-server.ps1 @@ -2,9 +2,9 @@ .SYNOPSIS start-ipfs-server.ps1 .DESCRIPTION - Starts a local IPFS server as a daemon process. + Starts a local IPFS server as a daemon process .EXAMPLE - PS> .\start-ipfs-server.ps1 + PS> ./start-ipfs-server .NOTES Author: Markus Fleschutz · License: CC0 .LINK diff --git a/Scripts/switch-branch.ps1 b/Scripts/switch-branch.ps1 index 77c1eb99..e95e3804 100755 --- a/Scripts/switch-branch.ps1 +++ b/Scripts/switch-branch.ps1 @@ -2,9 +2,9 @@ .SYNOPSIS switch-branch.ps1 [] [] .DESCRIPTION - Switches to another branch in a Git repository (including submodules). + Switches to another branch in a Git repository (including submodules) .EXAMPLE - PS> .\switch-branch.ps1 main C:\MyRepo + PS> ./switch-branch main C:\MyRepo .NOTES Author: Markus Fleschutz · License: CC0 .LINK diff --git a/Scripts/switch-shelly1.ps1 b/Scripts/switch-shelly1.ps1 index 4182df61..1a71b747 100755 --- a/Scripts/switch-shelly1.ps1 +++ b/Scripts/switch-shelly1.ps1 @@ -1,10 +1,11 @@ <# .SYNOPSIS - switch-shelly1.ps1 [] [] [] + switch-shelly1.ps1 [] [] [] .DESCRIPTION - Switches a Shelly1 device in the local network. + Switches a Shelly1 device in the local network + (Host is either a hostname or IP address, TurnMode is either 'on', 'off', or 'toggle') .EXAMPLE - PS> .\switch-shelly1.ps1 192.168.100.100 toggle 10 + PS> ./switch-shelly1 192.168.100.100 toggle 10 .NOTES Author: Markus Fleschutz · License: CC0 .LINK @@ -20,7 +21,7 @@ try { $Result = Invoke-RestMethod "http://$($Host)/relay/0?turn=$($TurnMode)&timer=$($Timer)" - "✔️ Shelly1 device at $Host switched to $TurnMode for $Timer second(s)" + "✔️ switched Shelly1 device at $Host to $TurnMode for $Timer sec" exit 0 } catch { "⚠️ Error: $($Error[0]) ($($MyInvocation.MyCommand.Name):$($_.InvocationInfo.ScriptLineNumber))" diff --git a/Scripts/sync-repo.ps1 b/Scripts/sync-repo.ps1 index e1876209..81a09a95 100644 --- a/Scripts/sync-repo.ps1 +++ b/Scripts/sync-repo.ps1 @@ -2,9 +2,9 @@ .SYNOPSIS sync-repo.ps1 [] .DESCRIPTION - Synchronizes a Git repository by push & pull (including submodules). + Synchronizes a Git repository by push & pull (including submodules) .EXAMPLE - PS> .\sync-repo.ps1 C:\MyRepo + PS> ./sync-repo C:\MyRepo .NOTES Author: Markus Fleschutz · License: CC0 .LINK