mirror of
https://github.com/fleschutz/PowerShell.git
synced 2024-11-29 19:33:20 +01:00
Update description
This commit is contained in:
parent
fabe750544
commit
9a1f0113e0
@ -2,9 +2,9 @@
|
|||||||
.SYNOPSIS
|
.SYNOPSIS
|
||||||
speak-date.ps1
|
speak-date.ps1
|
||||||
.DESCRIPTION
|
.DESCRIPTION
|
||||||
Speaks the current date by text-to-speech (TTS).
|
Speaks the current date by text-to-speech (TTS)
|
||||||
.EXAMPLE
|
.EXAMPLE
|
||||||
PS> .\speak-date.ps1
|
PS> ./speak-date
|
||||||
.NOTES
|
.NOTES
|
||||||
Author: Markus Fleschutz · License: CC0
|
Author: Markus Fleschutz · License: CC0
|
||||||
.LINK
|
.LINK
|
||||||
|
@ -2,9 +2,9 @@
|
|||||||
.SYNOPSIS
|
.SYNOPSIS
|
||||||
speak-english.ps1 [<text>]
|
speak-english.ps1 [<text>]
|
||||||
.DESCRIPTION
|
.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
|
.EXAMPLE
|
||||||
PS> .\speak-english.ps1 "Hello World"
|
PS> ./speak-english "Hello World"
|
||||||
.NOTES
|
.NOTES
|
||||||
Author: Markus Fleschutz · License: CC0
|
Author: Markus Fleschutz · License: CC0
|
||||||
.LINK
|
.LINK
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
.DESCRIPTION
|
.DESCRIPTION
|
||||||
Speaks the content of the given Epub file by text-to-speech (TTS).
|
Speaks the content of the given Epub file by text-to-speech (TTS).
|
||||||
.EXAMPLE
|
.EXAMPLE
|
||||||
PS> .\speak-epub.ps1 C:\MyBook.epub
|
PS> ./speak-epub C:\MyBook.epub
|
||||||
.NOTES
|
.NOTES
|
||||||
Author: Markus Fleschutz · License: CC0
|
Author: Markus Fleschutz · License: CC0
|
||||||
.LINK
|
.LINK
|
||||||
|
@ -2,9 +2,9 @@
|
|||||||
.SYNOPSIS
|
.SYNOPSIS
|
||||||
speak-file.ps1 [<file>]
|
speak-file.ps1 [<file>]
|
||||||
.DESCRIPTION
|
.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
|
.EXAMPLE
|
||||||
PS> .\speak-file.ps1 C:\MyFile.txt
|
PS> ./speak-file C:\MyFile.txt
|
||||||
.NOTES
|
.NOTES
|
||||||
Author: Markus Fleschutz · License: CC0
|
Author: Markus Fleschutz · License: CC0
|
||||||
.LINK
|
.LINK
|
||||||
|
@ -2,9 +2,9 @@
|
|||||||
.SYNOPSIS
|
.SYNOPSIS
|
||||||
speak-french.ps1 [<text>]
|
speak-french.ps1 [<text>]
|
||||||
.DESCRIPTION
|
.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
|
.EXAMPLE
|
||||||
PS> .\speak-french.ps1 Salut
|
PS> ./speak-french Salut
|
||||||
.NOTES
|
.NOTES
|
||||||
Author: Markus Fleschutz · License: CC0
|
Author: Markus Fleschutz · License: CC0
|
||||||
.LINK
|
.LINK
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
.DESCRIPTION
|
.DESCRIPTION
|
||||||
Speaks the given text with a German text-to-speech (TTS) voice.
|
Speaks the given text with a German text-to-speech (TTS) voice.
|
||||||
.EXAMPLE
|
.EXAMPLE
|
||||||
PS> .\speak-german.ps1 Hallo
|
PS> ./speak-german Hallo
|
||||||
.NOTES
|
.NOTES
|
||||||
Author: Markus Fleschutz · License: CC0
|
Author: Markus Fleschutz · License: CC0
|
||||||
.LINK
|
.LINK
|
||||||
|
@ -2,9 +2,9 @@
|
|||||||
.SYNOPSIS
|
.SYNOPSIS
|
||||||
speak-italian.ps1 [<text>]
|
speak-italian.ps1 [<text>]
|
||||||
.DESCRIPTION
|
.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
|
.EXAMPLE
|
||||||
PS> .\speak-italian.ps1 Ciao
|
PS> ./speak-italian Ciao
|
||||||
.NOTES
|
.NOTES
|
||||||
Author: Markus Fleschutz · License: CC0
|
Author: Markus Fleschutz · License: CC0
|
||||||
.LINK
|
.LINK
|
||||||
|
@ -2,9 +2,9 @@
|
|||||||
.SYNOPSIS
|
.SYNOPSIS
|
||||||
speak-joke.ps1
|
speak-joke.ps1
|
||||||
.DESCRIPTION
|
.DESCRIPTION
|
||||||
Speaks a random Chuck Norris joke by text-to-speech (TTS).
|
Speaks a random Chuck Norris joke by text-to-speech (TTS)
|
||||||
.EXAMPLE
|
.EXAMPLE
|
||||||
PS> .\speak-joke.ps1
|
PS> ./speak-joke
|
||||||
.NOTES
|
.NOTES
|
||||||
Author: Markus Fleschutz · License: CC0
|
Author: Markus Fleschutz · License: CC0
|
||||||
.LINK
|
.LINK
|
||||||
|
@ -2,9 +2,9 @@
|
|||||||
.SYNOPSIS
|
.SYNOPSIS
|
||||||
speak-quote.ps1
|
speak-quote.ps1
|
||||||
.DESCRIPTION
|
.DESCRIPTION
|
||||||
Speaks a random quote by text-to-speech (TTS).
|
Speaks a random quote by text-to-speech (TTS)
|
||||||
.EXAMPLE
|
.EXAMPLE
|
||||||
PS> .\speak-quote.ps1
|
PS> ./speak-quote
|
||||||
.NOTES
|
.NOTES
|
||||||
Author: Markus Fleschutz · License: CC0
|
Author: Markus Fleschutz · License: CC0
|
||||||
.LINK
|
.LINK
|
||||||
|
@ -2,9 +2,9 @@
|
|||||||
.SYNOPSIS
|
.SYNOPSIS
|
||||||
speak-spanish.ps1 [<text>]
|
speak-spanish.ps1 [<text>]
|
||||||
.DESCRIPTION
|
.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
|
.EXAMPLE
|
||||||
PS> .\speak-spanish.ps1 Hola
|
PS> ./speak-spanish Hola
|
||||||
.NOTES
|
.NOTES
|
||||||
Author: Markus Fleschutz · License: CC0
|
Author: Markus Fleschutz · License: CC0
|
||||||
.LINK
|
.LINK
|
||||||
|
@ -2,9 +2,9 @@
|
|||||||
.SYNOPSIS
|
.SYNOPSIS
|
||||||
speak-test.ps1
|
speak-test.ps1
|
||||||
.DESCRIPTION
|
.DESCRIPTION
|
||||||
Performs a text-to-speech (TTS) test.
|
Performs a text-to-speech (TTS) test
|
||||||
.EXAMPLE
|
.EXAMPLE
|
||||||
PS> .\speak-test.ps1
|
PS> ./speak-test
|
||||||
.NOTES
|
.NOTES
|
||||||
Author: Markus Fleschutz · License: CC0
|
Author: Markus Fleschutz · License: CC0
|
||||||
.LINK
|
.LINK
|
||||||
|
@ -2,22 +2,22 @@
|
|||||||
.SYNOPSIS
|
.SYNOPSIS
|
||||||
speak-text.ps1 [<text>]
|
speak-text.ps1 [<text>]
|
||||||
.DESCRIPTION
|
.DESCRIPTION
|
||||||
Speaks the given text by text-to-speech (TTS).
|
Speaks the given text by the default text-to-speech (TTS) voice
|
||||||
.EXAMPLE
|
.EXAMPLE
|
||||||
PS> .\speak-text.ps1 "Hello World"
|
PS> ./speak-text "Hello World"
|
||||||
.NOTES
|
.NOTES
|
||||||
Author: Markus Fleschutz · License: CC0
|
Author: Markus Fleschutz · License: CC0
|
||||||
.LINK
|
.LINK
|
||||||
https://github.com/fleschutz/PowerShell
|
https://github.com/fleschutz/PowerShell
|
||||||
#>
|
#>
|
||||||
|
|
||||||
param([string]$Text = "")
|
param([string]$text = "")
|
||||||
|
|
||||||
try {
|
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
|
$Voice = new-object -ComObject SAPI.SPVoice
|
||||||
$Result = $Voice.Speak($Text)
|
[void]$Voice.Speak($text)
|
||||||
exit 0
|
exit 0
|
||||||
} catch {
|
} catch {
|
||||||
"⚠️ Error: $($Error[0]) ($($MyInvocation.MyCommand.Name):$($_.InvocationInfo.ScriptLineNumber))"
|
"⚠️ Error: $($Error[0]) ($($MyInvocation.MyCommand.Name):$($_.InvocationInfo.ScriptLineNumber))"
|
||||||
|
@ -2,9 +2,9 @@
|
|||||||
.SYNOPSIS
|
.SYNOPSIS
|
||||||
speak-time.ps1
|
speak-time.ps1
|
||||||
.DESCRIPTION
|
.DESCRIPTION
|
||||||
Speaks the current time by text-to-speech (TTS).
|
Speaks the current time by text-to-speech (TTS)
|
||||||
.EXAMPLE
|
.EXAMPLE
|
||||||
PS> .\speak-time.ps1
|
PS> ./speak-time
|
||||||
.NOTES
|
.NOTES
|
||||||
Author: Markus Fleschutz · License: CC0
|
Author: Markus Fleschutz · License: CC0
|
||||||
.LINK
|
.LINK
|
||||||
|
@ -2,9 +2,9 @@
|
|||||||
.SYNOPSIS
|
.SYNOPSIS
|
||||||
start-calibre-server.ps1 [<port>]
|
start-calibre-server.ps1 [<port>]
|
||||||
.DESCRIPTION
|
.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
|
.EXAMPLE
|
||||||
PS> .\start-calibre-server.ps1
|
PS> ./start-calibre-server
|
||||||
.NOTES
|
.NOTES
|
||||||
Author: Markus Fleschutz · License: CC0
|
Author: Markus Fleschutz · License: CC0
|
||||||
.LINK
|
.LINK
|
||||||
|
@ -2,9 +2,9 @@
|
|||||||
.SYNOPSIS
|
.SYNOPSIS
|
||||||
start-ipfs-server.ps1
|
start-ipfs-server.ps1
|
||||||
.DESCRIPTION
|
.DESCRIPTION
|
||||||
Starts a local IPFS server as a daemon process.
|
Starts a local IPFS server as a daemon process
|
||||||
.EXAMPLE
|
.EXAMPLE
|
||||||
PS> .\start-ipfs-server.ps1
|
PS> ./start-ipfs-server
|
||||||
.NOTES
|
.NOTES
|
||||||
Author: Markus Fleschutz · License: CC0
|
Author: Markus Fleschutz · License: CC0
|
||||||
.LINK
|
.LINK
|
||||||
|
@ -2,9 +2,9 @@
|
|||||||
.SYNOPSIS
|
.SYNOPSIS
|
||||||
switch-branch.ps1 [<BranchName>] [<RepoDir>]
|
switch-branch.ps1 [<BranchName>] [<RepoDir>]
|
||||||
.DESCRIPTION
|
.DESCRIPTION
|
||||||
Switches to another branch in a Git repository (including submodules).
|
Switches to another branch in a Git repository (including submodules)
|
||||||
.EXAMPLE
|
.EXAMPLE
|
||||||
PS> .\switch-branch.ps1 main C:\MyRepo
|
PS> ./switch-branch main C:\MyRepo
|
||||||
.NOTES
|
.NOTES
|
||||||
Author: Markus Fleschutz · License: CC0
|
Author: Markus Fleschutz · License: CC0
|
||||||
.LINK
|
.LINK
|
||||||
|
@ -1,10 +1,11 @@
|
|||||||
<#
|
<#
|
||||||
.SYNOPSIS
|
.SYNOPSIS
|
||||||
switch-shelly1.ps1 [<host>] [<turn-mode>] [<timer>]
|
switch-shelly1.ps1 [<Host>] [<TurnMode>] [<Timer>]
|
||||||
.DESCRIPTION
|
.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
|
.EXAMPLE
|
||||||
PS> .\switch-shelly1.ps1 192.168.100.100 toggle 10
|
PS> ./switch-shelly1 192.168.100.100 toggle 10
|
||||||
.NOTES
|
.NOTES
|
||||||
Author: Markus Fleschutz · License: CC0
|
Author: Markus Fleschutz · License: CC0
|
||||||
.LINK
|
.LINK
|
||||||
@ -20,7 +21,7 @@ try {
|
|||||||
|
|
||||||
$Result = Invoke-RestMethod "http://$($Host)/relay/0?turn=$($TurnMode)&timer=$($Timer)"
|
$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
|
exit 0
|
||||||
} catch {
|
} catch {
|
||||||
"⚠️ Error: $($Error[0]) ($($MyInvocation.MyCommand.Name):$($_.InvocationInfo.ScriptLineNumber))"
|
"⚠️ Error: $($Error[0]) ($($MyInvocation.MyCommand.Name):$($_.InvocationInfo.ScriptLineNumber))"
|
||||||
|
@ -2,9 +2,9 @@
|
|||||||
.SYNOPSIS
|
.SYNOPSIS
|
||||||
sync-repo.ps1 [<repo-dir>]
|
sync-repo.ps1 [<repo-dir>]
|
||||||
.DESCRIPTION
|
.DESCRIPTION
|
||||||
Synchronizes a Git repository by push & pull (including submodules).
|
Synchronizes a Git repository by push & pull (including submodules)
|
||||||
.EXAMPLE
|
.EXAMPLE
|
||||||
PS> .\sync-repo.ps1 C:\MyRepo
|
PS> ./sync-repo C:\MyRepo
|
||||||
.NOTES
|
.NOTES
|
||||||
Author: Markus Fleschutz · License: CC0
|
Author: Markus Fleschutz · License: CC0
|
||||||
.LINK
|
.LINK
|
||||||
|
Loading…
Reference in New Issue
Block a user