Update descriptions

This commit is contained in:
Markus Fleschutz 2021-09-25 19:43:22 +02:00
parent 9a1bdd9ac5
commit 9748042e05
28 changed files with 80 additions and 81 deletions

View File

@ -2,9 +2,9 @@
.SYNOPSIS
take-screenshot.ps1 [<directory>]
.DESCRIPTION
Takes a single screenshot and saves it into the current/given directory.
Takes a single screenshot and saves it into the current/given directory
.EXAMPLE
PS> .\take-screenshot.ps1 C:\Temp
PS> ./take-screenshot C:\Temp
.NOTES
Author: Markus Fleschutz · License: CC0
.LINK

View File

@ -1,17 +1,17 @@
<#
.SYNOPSIS
take-screenshots.ps1 [<directory>] [<interval>]
take-screenshots.ps1 [<TargetDir>] [<Interval>]
.DESCRIPTION
Takes screenshots every 60 seconds and saves them into the current/given directory.
Takes screenshots and saves them into a target directory (per default every 60 seconds)
.EXAMPLE
PS> .\take-screenshots.ps1 C:\Temp 60
PS> ./take-screenshots C:\Temp 60
.NOTES
Author: Markus Fleschutz · License: CC0
.LINK
https://github.com/fleschutz/PowerShell
#>
param([string]$Directory = "$PWD", [int]$Interval = 60)
param([string]$TargetDir = "$PWD", [int]$Interval = 60) # in seconds
function TakeScreenshot { param([string]$FilePath)
Add-Type -Assembly System.Windows.Forms
@ -28,7 +28,7 @@ try {
do {
$Time = (Get-Date)
$Filename = "$($Time.Year)-$($Time.Month)-$($Time.Day)-$($Time.Hour)-$($Time.Minute)-$($Time.Second).png"
$FilePath = (Join-Path $Directory $Filename)
$FilePath = (Join-Path $TargetDir $Filename)
write-output "Saving screenshot to $FilePath..."
TakeScreenshot $FilePath

View File

@ -2,9 +2,9 @@
.SYNOPSIS
translate-file.ps1 [<file>] [<source-lang>] [<target-lang>]
.DESCRIPTION
Translates the given text file into another language and prints the result.
Translates the given text file into another language and prints the result
.EXAMPLE
PS> .\translate-file.ps1 C:\Memo.txt en de
PS> ./translate-file C:\Memo.txt en de
.NOTES
Author: Markus Fleschutz · License: CC0
.LINK

View File

@ -2,9 +2,9 @@
.SYNOPSIS
translate-files.ps1 [<file-pattern>]
.DESCRIPTION
Translates the given text files into any supported language.
Translates the given text files into any supported language
.EXAMPLE
PS> .\translate-files.ps1 C:\Temp\*.txt
PS> ./translate-files C:\Temp\*.txt
.NOTES
Author: Markus Fleschutz · License: CC0
.LINK

View File

@ -2,9 +2,9 @@
.SYNOPSIS
translate-text.ps1 [<text>] [<source-lang>] [<target-lang>]
.DESCRIPTION
Translates the given text into other languages.
Translates the given text into other languages
.EXAMPLE
PS> .\translate-text.ps1 "Hello World" de en
PS> ./translate-text "Hello World" de en
.NOTES
Author: Markus Fleschutz · License: CC0
.LINK

View File

@ -2,7 +2,7 @@
.SYNOPSIS
turn-volume-down.ps1 [<percent>]
.DESCRIPTION
Turns the audio volume down (-10% by default).
Turns the audio volume down (-10% by default)
.EXAMPLE
PS> ./turn-volume-down
.NOTES

View File

@ -2,9 +2,9 @@
.SYNOPSIS
wakeup.ps1 [<MAC-address>] [<IP-address>]
.DESCRIPTION
Sends a magic packet to a computer to wake him up (requires Wake-On-LAN).
Sends a magic packet to a computer to wake him up (requires Wake-On-LAN)
.EXAMPLE
PS> .\wakeup.ps1 11:22:33:44:55:66 192.168.100.100
PS> ./wakeup 11:22:33:44:55:66 192.168.100.100
.NOTES
Author: Markus Fleschutz · License: CC0
.LINK

View File

@ -1,10 +1,10 @@
<#
.SYNOPSIS
weather-report.ps1 [<geo-location>]
weather-report.ps1 [<GeoLocation>]
.DESCRIPTION
Prints the local weather report.
Prints the local weather report
.EXAMPLE
PS> .\weather-report.ps1 Paris
PS> ./weather-report Paris
.NOTES
Author: Markus Fleschutz · License: CC0
.LINK

View File

@ -1,10 +1,10 @@
<#
.SYNOPSIS
weather.ps1 [<geo-location>]
weather.ps1 [<GeoLocation>]
.DESCRIPTION
Prints the current weather forecast.
Prints the current weather forecast
.EXAMPLE
PS> .\weather.ps1 Paris
PS> ./weather Paris
.NOTES
Author: Markus Fleschutz · License: CC0
.LINK

View File

@ -4,7 +4,7 @@
.DESCRIPTION
Prints a description of the given abbreviation.
.EXAMPLE
PS> .\what-is.ps1 CIA
PS> ./what-is CIA
.NOTES
Author: Markus Fleschutz · License: CC0
.LINK

View File

@ -2,9 +2,9 @@
.SYNOPSIS
write-animated.ps1 [<line1>] .. [line9>] [<speed>]
.DESCRIPTION
Writes animated text.
Writes animated text
.EXAMPLE
PS> .\write-animated.ps1 "Hello World"
PS> ./write-animated "Hello World"
.NOTES
Author: Markus Fleschutz · License: CC0
.LINK

View File

@ -2,16 +2,16 @@
.SYNOPSIS
write-big.ps1 [<text>]
.DESCRIPTION
Writes the given text in big letters.
Writes the given text in big letters
.EXAMPLE
PS> .\write-big.ps1 "Hello World"
PS> ./write-big "Hello World"
.NOTES
Author: Markus Fleschutz · License: CC0
.LINK
https://github.com/fleschutz/PowerShell
#>
param([string]$Text = "")
param([string]$text = "")
Set-StrictMode -Version Latest
@ -402,9 +402,9 @@ function BigChar { param([string]$Char, [int]$Row)
}
try {
if ($Text -eq "" ) { [String]$Text = read-host "Enter text to write" }
if ($text -eq "" ) { [String]$text = read-host "Enter text to write" }
[char[]]$ArrayOfChars = $Text.ToUpper()
[char[]]$ArrayOfChars = $text.ToUpper()
write-output ""
for ($Row = 1; $Row -lt 5; $Row++) {
$Line = ""

View File

@ -2,9 +2,9 @@
.SYNOPSIS
write-blue.ps1 [<text>]
.DESCRIPTION
Writes the given text in a blue foreground color.
Writes the given text in a blue foreground color
.EXAMPLE
PS> .\write-blue.ps1 "Hello World"
PS> ./write-blue "Hello World"
.NOTES
Author: Markus Fleschutz · License: CC0
.LINK

View File

@ -2,16 +2,16 @@
.SYNOPSIS
write-braille.ps1 [<text>]
.DESCRIPTION
Writes the given text in Braille.
Writes the given text in Braille
.EXAMPLE
PS> .\write-braille.ps1 "Hello World"
PS> ./write-braille "Hello World"
.NOTES
Author: Markus Fleschutz · License: CC0
.LINK
https://github.com/fleschutz/PowerShell
#>
param([string]$Text = "")
param([string]$text = "")
function BrailleA { param([int]$Row)
switch($Row) {
@ -344,10 +344,9 @@ function BrailleChar { param([string]$Char, [int]$Row)
}
try {
if ($Text -eq "" ) {
[String]$Text = read-host "Enter text to write"
}
[char[]]$ArrayOfChars = $Text.ToUpper()
if ($text -eq "" ) { $text = read-host "Enter text to write" }
[char[]]$ArrayOfChars = $text.ToUpper()
write-output ""
for ($Row = 1; $Row -lt 4; $Row++) {
$Line = ""

View File

@ -8,16 +8,16 @@
.PARAMETER Year
If specified, will output an entire year.
.EXAMPLE
PS> write-calendar
PS> ./write-calendar
Outputs the current month.
.EXAMPLE
PS> write-calendar 2013
PS> ./write-calendar 2013
Outputs the calendar for 2013.
.EXAMPLE
PS> write-calendar 04 2011
PS> ./write-calendar 04 2011
Outputs the calendar for April, 2011.
.EXAMPLE
PS> write-calendar 7
PS> ./write-calendar 7
Outputs the calendar for July of this year.
.NOTES
Author: Markus Fleschutz · License: CC0

View File

@ -2,9 +2,9 @@
.SYNOPSIS
write-chart.ps1
.DESCRIPTION
Writes a chart.
Writes a chart
.EXAMPLE
PS> .\write-chart.ps1
PS> ./write-chart
.NOTES
Author: Markus Fleschutz · License: CC0
.LINK

View File

@ -2,9 +2,9 @@
.SYNOPSIS
write-green.ps1 [<text>]
.DESCRIPTION
Writes the given text in a green foreground color.
Writes the given text in a green foreground color
.EXAMPLE
PS> .\write-green.ps1 "Hello World"
PS> ./write-green "Hello World"
.NOTES
Author: Markus Fleschutz · License: CC0
.LINK

View File

@ -2,9 +2,9 @@
.SYNOPSIS
write-joke.ps1
.DESCRIPTION
Writes a random Juck Norris joke to the console.
Writes a random Juck Norris joke to the console
.EXAMPLE
PS> .\write-joke.ps1
PS> ./write-joke
.NOTES
Author: Markus Fleschutz · License: CC0
.LINK

View File

@ -2,9 +2,9 @@
.SYNOPSIS
write-lowercase.ps1 [<text>]
.DESCRIPTION
Writes the given text in lowercase letters.
Writes the given text in lowercase letters
.EXAMPLE
PS> .\write-lowercase.ps1 "Hello World"
PS> ./write-lowercase "Hello World"
.NOTES
Author: Markus Fleschutz · License: CC0
.LINK

View File

@ -2,16 +2,16 @@
.SYNOPSIS
write-marquee.ps1 [<text>] [<speed>]
.DESCRIPTION
Writes the given text as marquee.
Writes the given text as marquee
.EXAMPLE
PS> .\write-marquee.ps1 "Hello World"
PS> ./write-marquee "Hello World"
.NOTES
Author: Markus Fleschutz · License: CC0
.LINK
https://github.com/fleschutz/PowerShell
#>
param([string]$Text = "PowerShell is powerful! PowerShell is cross-platform! PowerShell is open-source! PowerShell is easy to learn! Powershell is fully documented", [int]$Speed = 60) # 60 ms pause
param([string]$text = "PowerShell is powerful! PowerShell is cross-platform! PowerShell is open-source! PowerShell is easy to learn! Powershell is fully documented", [int]$speed = 60) # 60 ms pause
function StartMarquee { param([string]$text)
$Length = $text.Length
@ -30,12 +30,12 @@ function StartMarquee { param([string]$text)
$HOST.UI.RawUI.CursorPosition = $StartPosition
$TextToDisplay = $text.Substring($Pos, 80)
write-host -nonewline $TextToDisplay
start-sleep -milliseconds $Speed
start-sleep -milliseconds $speed
}
write-output ""
write-output ""
write-output ""
}
StartMarquee " +++ $Text +++ $Text +++ $Text +++ $Text +++ $Text +++ $Text +++ $Text +++ $Text +++ $Text +++ $Text +++ $Text +++ $Text +++ "
StartMarquee " +++ $text +++ $text +++ $text +++ $text +++ $text +++ $text +++ $text +++ $text +++ $text +++ $text +++ $text +++ $text +++ "
exit 0

View File

@ -2,32 +2,32 @@
.SYNOPSIS
write-morse-code.ps1 [<text>] [<speed>]
.DESCRIPTION
Writes the given text in Morse code.
Writes the given text in Morse code
.EXAMPLE
PS> .\write-morse-code.ps1 "Hello World"
PS> ./write-morse-code "Hello World"
.NOTES
Author: Markus Fleschutz · License: CC0
.LINK
https://github.com/fleschutz/PowerShell
#>
param([string]$Text = "", [int]$OneTimeUnit = 100) # in milliseconds
param([string]$text = "", [int]$speed = 100) # one time unit in milliseconds
function gap { param([int]$Length)
for ([int]$i = 1; $i -lt $Length; $i++) {
write-host " " -nonewline
}
start-sleep -milliseconds ($Length * $OneTimeUnit)
start-sleep -milliseconds ($Length * $speed)
}
function dot {
write-host "." -nonewline
start-sleep -milliseconds $OneTimeUnit # signal
start-sleep -milliseconds $speed # signal
}
function dash {
write-host "_" -nonewline
start-sleep -milliseconds (3 * $OneTimeUnit) # signal
start-sleep -milliseconds (3 * $speed) # signal
}
function Char2MorseCode { param([string]$Char)
@ -73,9 +73,9 @@ function Char2MorseCode { param([string]$Char)
}
try {
if ($Text -eq "" ) { [string]$Text = read-host "Enter text to write" }
if ($text -eq "" ) { [string]$text = read-host "Enter text to write" }
[char[]]$ArrayOfChars = $Text.ToUpper()
[char[]]$ArrayOfChars = $text.ToUpper()
foreach($Char in $ArrayOfChars) {
Char2MorseCode $Char
}

View File

@ -2,9 +2,9 @@
.SYNOPSIS
write-motd.ps1
.DESCRIPTION
Writes the message of the day (MOTD).
Writes the message of the day (MOTD)
.EXAMPLE
PS> .\write-motd.ps1
PS> ./write-motd
.NOTES
Author: Markus Fleschutz · License: CC0
.LINK

View File

@ -2,9 +2,9 @@
.SYNOPSIS
write-quote.ps1
.DESCRIPTION
Writes a random quote to the console.
Writes a random quote to the console
.EXAMPLE
PS> .\write-quote.ps1
PS> ./write-quote
.NOTES
Author: Markus Fleschutz · License: CC0
.LINK

View File

@ -2,9 +2,9 @@
.SYNOPSIS
write-red.ps1 [<text>]
.DESCRIPTION
Writes the given text in a red foreground color.
Writes the given text in a red foreground color
.EXAMPLE
PS> .\write-red.ps1 "Hello World"
PS> ./write-red "Hello World"
.NOTES
Author: Markus Fleschutz · License: CC0
.LINK

View File

@ -2,9 +2,9 @@
.SYNOPSIS
write-rot13.ps1 [<text>]
.DESCRIPTION
Prints the given text encoded or decoded with ROT13.
Writes the given text encoded or decoded with ROT13
.EXAMPLE
PS> .\write-rot13.ps1 "Hello World"
PS> ./write-rot13 "Hello World"
.NOTES
Author: Markus Fleschutz · License: CC0
.LINK

View File

@ -2,23 +2,23 @@
.SYNOPSIS
write-typewriter.ps1 [<text>] [<speed>]
.DESCRIPTION
Writes the given text with the typewriter effect.
Writes the given text with the typewriter effect
.EXAMPLE
PS> .\write-typewriter.ps1 "Hello World"
PS> ./write-typewriter "Hello World"
.NOTES
Author: Markus Fleschutz · License: CC0
.LINK
https://github.com/fleschutz/PowerShell
#>
param([string]$Text = "`nHello World`n-----------`nPowerShell is cross-platform`nPowerShell is open-source`nPowerShell is easy to learn`nPowerShell is fully documented`n`nThanks for watching`n`n:-)`n`n", [int]$Speed = 250) # in milliseconds
param([string]$text = "`nHello World`n-----------`nPowerShell is cross-platform`nPowerShell is open-source`nPowerShell is easy to learn`nPowerShell is fully documented`n`nThanks for watching`n`n:-)`n`n", [int]$speed = 250) # in milliseconds
try {
$Random = New-Object System.Random
$Text -split '' | ForEach-Object {
$text -split '' | ForEach-Object {
write-host -nonewline $_
start-sleep -milliseconds $(1 + $Random.Next($Speed))
start-sleep -milliseconds $(1 + $Random.Next($speed))
}
exit 0
} catch {

View File

@ -2,9 +2,9 @@
.SYNOPSIS
write-uppercase.ps1 [<text>]
.DESCRIPTION
Writes the given text in uppercase letters.
Writes the given text in uppercase letters
.EXAMPLE
PS> .\write-uppercase.ps1 "Hello World"
PS> ./write-uppercase "Hello World"
.NOTES
Author: Markus Fleschutz · License: CC0
.LINK

View File

@ -2,9 +2,9 @@
.SYNOPSIS
write-vertical.ps1 [<text>]
.DESCRIPTION
Writes the given text in vertical direction.
Writes the given text in vertical direction
.EXAMPLE
PS> .\write-vertical.ps1 "Hello World"
PS> ./write-vertical "Hello World"
.NOTES
Author: Markus Fleschutz · License: CC0
.LINK