mirror of
https://github.com/fleschutz/PowerShell.git
synced 2025-03-25 05:26:47 +01:00
Add show-credits.ps1
This commit is contained in:
parent
1a9fdfb337
commit
d9ab4a2fbc
@ -157,6 +157,7 @@ SHA1.ps1, prints the SHA1 checksum of the given file
|
||||
SHA256.ps1, prints the SHA256 checksum of the given file
|
||||
simulate-matrix.ps1, simulates the Matrix (fun)
|
||||
simulate-presence.ps1, simulates the human presence against burglars
|
||||
show-credits.ps1, shows the credits
|
||||
speak-countdown.ps1, starts a countdown by text-to-speech (TTS)
|
||||
speak-date.ps1, speaks the current date by text-to-speech (TTS)
|
||||
speak-english.ps1, speaks the given text with an English text-to-speech (TTS) voice
|
||||
|
|
@ -202,6 +202,7 @@ Mega Collection of PowerShell Scripts
|
||||
* [send-tcp.ps1](Scripts/send-udp.ps1) - sends a TCP message to the given IP address and port
|
||||
* [send-udp.ps1](Scripts/send-udp.ps1) - sends a UDP datagram message to the given IP address and port
|
||||
* [set-timer.ps1](Scripts/set-timer.ps1) - sets a timer for a countdown
|
||||
* [show-credits.ps1](Scripts/show-credits.ps1) - shows the credits
|
||||
* [simulate-matrix.ps1](Scripts/simulate-matrix.ps1) - simulates the Matrix (fun)
|
||||
* [simulate-presence.ps1](Scripts/simulate-presence.ps1) - simulates the human presence against burglars
|
||||
* [switch-shelly1.ps1](Scripts/switch-shelly1.ps1) - switches a Shelly1 device in the local network
|
||||
|
32
Scripts/show-credits.ps1
Executable file
32
Scripts/show-credits.ps1
Executable file
@ -0,0 +1,32 @@
|
||||
<#
|
||||
.SYNTAX show-credits.ps1
|
||||
.DESCRIPTION shows the credits
|
||||
.LINK https://github.com/fleschutz/PowerShell
|
||||
.NOTES Author: Markus Fleschutz / License: CC0
|
||||
#>
|
||||
|
||||
try {
|
||||
clear-host
|
||||
|
||||
""
|
||||
& "$PSScriptRoot/write-big.ps1" " CREDITS"
|
||||
""
|
||||
|
||||
& "$PSScriptRoot/write-animated.ps1" "Typos: Markus Fleschutz"
|
||||
& "$PSScriptRoot/write-animated.ps1" "Keyboard: Rapoo 12335 E9270P WL Ultra-Slim Touch"
|
||||
& "$PSScriptRoot/write-animated.ps1" "Operating Systems: Windows 10 20H2 & Ubuntu Server 20.04 LTS"
|
||||
& "$PSScriptRoot/write-animated.ps1" "Windows Terminal: version 1.7.1033.0"
|
||||
& "$PSScriptRoot/write-animated.ps1" "PowerShell: version 5.1 & 7.1.3"
|
||||
& "$PSScriptRoot/write-animated.ps1" "PowerShell Scripts: version 1.0"
|
||||
& "$PSScriptRoot/write-animated.ps1" "GitHub: github.com/fleschutz/PowerShell"
|
||||
& "$PSScriptRoot/write-animated.ps1" "Executive Producer: Markus Fleschutz"
|
||||
& "$PSScriptRoot/write-animated.ps1" "Special Thanks: Andrea Fleschutz"
|
||||
& "$PSScriptRoot/write-animated.ps1" "Copyright: (c) 2020. All Rights Reserved"
|
||||
& "$PSScriptRoot/write-animated.ps1" "No Animals Were Harmed in the Making of This Film"
|
||||
|
||||
& "$PSScriptRoot/write-big.ps1" " Thanx 4 watching"
|
||||
exit 0
|
||||
} catch {
|
||||
write-error "ERROR: line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])"
|
||||
exit 1
|
||||
}
|
@ -7,6 +7,8 @@
|
||||
|
||||
param($Line1 = "", $Line2 = "", $Line3 = "", $Line4 = "", $Line5 = "", $Line6 = "", $Line7 = "", $Line8 = "", $Line9 = "", [int]$Speed = 50) # 50 ms pause
|
||||
|
||||
$TerminalWidth = 120 # characters
|
||||
|
||||
function WriteAnimatedLine { param([string]$Line, [int]$Speed)
|
||||
[int]$Start = 1
|
||||
[int]$End = $Line.Length
|
||||
@ -15,7 +17,7 @@ function WriteAnimatedLine { param([string]$Line, [int]$Speed)
|
||||
|
||||
if ($Line -ne "") {
|
||||
foreach ($Pos in $Start .. $End) {
|
||||
$TextToDisplay = $Spaces.Substring(0, 40 - $pos / 2) + $Line.Substring(0, $Pos)
|
||||
$TextToDisplay = $Spaces.Substring(0, $TerminalWidth / 2 - $pos / 2) + $Line.Substring(0, $Pos)
|
||||
write-host -nonewline $TextToDisplay
|
||||
start-sleep -milliseconds $Speed
|
||||
$HOST.UI.RawUI.CursorPosition = $StartPosition
|
||||
|
Loading…
Reference in New Issue
Block a user