diff --git a/Scripts/convert-image2ascii.ps1 b/Scripts/convert-image2ascii.ps1 index d3140b7d..1eafe44f 100644 --- a/Scripts/convert-image2ascii.ps1 +++ b/Scripts/convert-image2ascii.ps1 @@ -1,16 +1,16 @@ <# - .SYNOPSIS - Convert-ImageToAscii - .DESCRIPTION - Converts an image to ASCII art. - .EXAMPLE - Convert-ImageToAscii -InFile "C:\Folder\Image.jpg" -Width 32 -Height 32 - .INPUTS - .OUTPUTS - .NOTES - Author: Fxbyy - .FUNCTIONALITY - Converts an image to ASCII art. +.SYNOPSIS + Converts images to ASCII art +.DESCRIPTION + This PowerShell script converts an image to ASCII art. +.EXAMPLE + Convert-ImageToAscii -InFile "C:\Folder\Image.jpg" -Width 32 -Height 32 +.INPUTS +.OUTPUTS +.NOTES + Author: Fxbyy +.FUNCTIONALITY + Converts an image to ASCII art. #> function Convert-ImageToAscii { diff --git a/Scripts/install-audacity.ps1 b/Scripts/install-audacity.ps1 index 34b7ea70..b26c3925 100755 --- a/Scripts/install-audacity.ps1 +++ b/Scripts/install-audacity.ps1 @@ -1,4 +1,4 @@ -<# +<# .SYNOPSIS Installs Audacity .DESCRIPTION diff --git a/Scripts/install-powershell.ps1 b/Scripts/install-powershell.ps1 index e7b45cd8..173c9abf 100644 --- a/Scripts/install-powershell.ps1 +++ b/Scripts/install-powershell.ps1 @@ -1,6 +1,4 @@ -# Copyright (c) Microsoft Corporation. -# Licensed under the MIT License. -<# +<# .Synopsis Install PowerShell on Windows, Linux or macOS. .DESCRIPTION @@ -520,4 +518,5 @@ try { [Net.ServicePointManager]::SecurityProtocol = $originalValue Remove-Item -Path $tempDir -Recurse -Force -ErrorAction SilentlyContinue + exit 0 # success } diff --git a/Scripts/install-thunderbird.ps1 b/Scripts/install-thunderbird.ps1 index f4bf3c4e..2e7f6b39 100755 --- a/Scripts/install-thunderbird.ps1 +++ b/Scripts/install-thunderbird.ps1 @@ -1,4 +1,4 @@ -<# +<# .SYNOPSIS Installs Thunderbird .DESCRIPTION diff --git a/Scripts/install-twitter.ps1 b/Scripts/install-twitter.ps1 index 72c9e15e..6f643b0d 100755 --- a/Scripts/install-twitter.ps1 +++ b/Scripts/install-twitter.ps1 @@ -1,4 +1,4 @@ -<# +<# .SYNOPSIS Installs Twitter .DESCRIPTION diff --git a/Scripts/install-visual-studio-code.ps1 b/Scripts/install-visual-studio-code.ps1 index faad8219..9649cdb9 100755 --- a/Scripts/install-visual-studio-code.ps1 +++ b/Scripts/install-visual-studio-code.ps1 @@ -1,4 +1,4 @@ -<# +<# .SYNOPSIS Installs Visual Studio Code .DESCRIPTION diff --git a/Scripts/list-pi.ps1 b/Scripts/list-pi.ps1 index 32139089..88c5d56f 100644 --- a/Scripts/list-pi.ps1 +++ b/Scripts/list-pi.ps1 @@ -69,6 +69,6 @@ try { List-Pi $Digits exit 0 # success } catch { - "⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])" - exit 1 + "⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])" + exit 1 } \ No newline at end of file diff --git a/Scripts/list-system-info.ps1 b/Scripts/list-system-info.ps1 index 17515454..5efcbbb8 100755 --- a/Scripts/list-system-info.ps1 +++ b/Scripts/list-system-info.ps1 @@ -105,4 +105,4 @@ $info = $info | ConvertTo-JSON # Output $info -exit 0 # success +exit 0 # success \ No newline at end of file diff --git a/Scripts/pick-commit.ps1 b/Scripts/pick-commit.ps1 index 5e10d61d..2d4e9f79 100755 --- a/Scripts/pick-commit.ps1 +++ b/Scripts/pick-commit.ps1 @@ -23,8 +23,8 @@ param([string]$CommitID = "", [string]$CommitMessage = "", [string]$Branches = "", [string]$RepoDir = "$PWD") try { - if (-not(test-path "$RepoDir" -pathType container)) { throw "Can't access directory: $RepoDir" } - set-location "$RepoDir" + if (-not(Test-Path "$RepoDir" -pathType container)) { throw "Can't access directory: $RepoDir" } + Set-Location "$RepoDir" if ($CommitID -eq "") { $CommitID = read-host "Enter the Git commit id to cherry-pick" } if ($CommitMessage -eq "") { $CommitMessage = read-host "Enter the commit message to use" } @@ -78,4 +78,4 @@ try { } catch { "⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])" exit 1 -} +} \ No newline at end of file diff --git a/Scripts/play-happy-birthday.ps1 b/Scripts/play-happy-birthday.ps1 index 05f87361..3069e45c 100755 --- a/Scripts/play-happy-birthday.ps1 +++ b/Scripts/play-happy-birthday.ps1 @@ -1,12 +1,12 @@ <# .SYNOPSIS - Plays the Happy Birthday song + Plays the Happy Birthday song .DESCRIPTION - This PowerShell script plays the famous Happy Birthday song. + This PowerShell script plays the famous Happy Birthday song. .EXAMPLE - PS> ./play-happy-birthday + PS> ./play-happy-birthday .LINK - https://github.com/fleschutz/PowerShell + https://github.com/fleschutz/PowerShell .NOTES Author: Markus Fleschutz | License: CC0 #> diff --git a/Scripts/play-tetris-melody.ps1 b/Scripts/play-tetris-melody.ps1 index 71d7ac5e..d984ef90 100755 --- a/Scripts/play-tetris-melody.ps1 +++ b/Scripts/play-tetris-melody.ps1 @@ -1,12 +1,12 @@ <# .SYNOPSIS - Plays the Tetris melody + Plays the Tetris melody .DESCRIPTION - This PowerShell script plays the Tetris melody. + This PowerShell script plays the Tetris melody. .EXAMPLE - PS> ./play-tetris-melody + PS> ./play-tetris-melody .LINK - https://github.com/fleschutz/PowerShell + https://github.com/fleschutz/PowerShell .NOTES Author: Markus Fleschutz | License: CC0 #> diff --git a/Scripts/show-notification.ps1 b/Scripts/show-notification.ps1 index c6ce9c6e..12b6e9a0 100755 --- a/Scripts/show-notification.ps1 +++ b/Scripts/show-notification.ps1 @@ -1,14 +1,14 @@ <# .SYNOPSIS - Shows a notification + Shows a notification .DESCRIPTION - This PowerShell script shows a toast-message notification for the Windows 10 Notification Center. + This PowerShell script shows a toast-message notification for the Windows 10 Notification Center. .EXAMPLE - PS> ./show-notification "Hello World" + PS> ./show-notification "Hello World" .LINK - https://github.com/fleschutz/PowerShell + https://github.com/fleschutz/PowerShell .NOTES - Author: Markus Fleschutz | License: CC0 + Author: Markus Fleschutz | License: CC0 #> param([string]$Text = "Hello World", [string]$Title = "NOTE", [int]$Duration = 5000) @@ -27,4 +27,4 @@ try { } catch { "⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])" exit 1 -} +} \ No newline at end of file diff --git a/Scripts/speak-epub.ps1 b/Scripts/speak-epub.ps1 index cf041dba..e97019b8 100755 --- a/Scripts/speak-epub.ps1 +++ b/Scripts/speak-epub.ps1 @@ -1,6 +1,6 @@ <# .SYNOPSIS - Speaks the content of the given Epub file by text-to-speech (TTS). + Speaks an Epub file by text-to-speech (TTS). .DESCRIPTION This PowerShell script speaks the content of the given Epub file by text-to-speech (TTS). .PARAMETER Filename @@ -55,7 +55,7 @@ function UnzipFile() { param([string]$file, [string]$dest) } if ($Filename -eq "") { - $Filename = read-host "Enter path to .epub file" + $Filename = Read-Host "Enter path to .epub file" } write-output "Reading $Filename ..." $file = get-item $Filename @@ -94,3 +94,4 @@ foreach($item in $content.package.manifest.Item) { } } } +exit 0 # success \ No newline at end of file diff --git a/Scripts/turn-volume-fully-up.ps1 b/Scripts/turn-volume-fully-up.ps1 index 5ae2c94e..99509325 100755 --- a/Scripts/turn-volume-fully-up.ps1 +++ b/Scripts/turn-volume-fully-up.ps1 @@ -1,4 +1,4 @@ -<# +<# .SYNOPSIS Turns audio volume fully up .DESCRIPTION diff --git a/Scripts/uninstall-vlc.ps1 b/Scripts/uninstall-vlc.ps1 index 50a6cf53..4379cdb9 100755 --- a/Scripts/uninstall-vlc.ps1 +++ b/Scripts/uninstall-vlc.ps1 @@ -1,4 +1,4 @@ -<# +<# .SYNOPSIS Uninstalls VLC .DESCRIPTION diff --git a/Scripts/uninstall-windows-terminal.ps1 b/Scripts/uninstall-windows-terminal.ps1 index 1ccfb43c..aafcdb3b 100755 --- a/Scripts/uninstall-windows-terminal.ps1 +++ b/Scripts/uninstall-windows-terminal.ps1 @@ -1,4 +1,4 @@ -<# +<# .SYNOPSIS Uninstalls Windows Terminal .DESCRIPTION diff --git a/Scripts/upload-to-dropbox.ps1 b/Scripts/upload-to-dropbox.ps1 index c8a07529..caf0eddc 100755 --- a/Scripts/upload-to-dropbox.ps1 +++ b/Scripts/upload-to-dropbox.ps1 @@ -1,4 +1,4 @@ -<# +<# .SYNOPSIS Uploads a file to Dropbox .DESCRIPTION diff --git a/Scripts/write-fractal.ps1 b/Scripts/write-fractal.ps1 index 14283b0b..73eaf489 100644 --- a/Scripts/write-fractal.ps1 +++ b/Scripts/write-fractal.ps1 @@ -1,4 +1,4 @@ -<# +<# .SYNOPSIS Writes a fractal .DESCRIPTION diff --git a/Scripts/write-matrix.ps1 b/Scripts/write-matrix.ps1 index 9ad9c690..b444372e 100644 --- a/Scripts/write-matrix.ps1 +++ b/Scripts/write-matrix.ps1 @@ -1,4 +1,4 @@ -<# +<# .SYNOPSIS Writes the matrix .DESCRIPTION diff --git a/Scripts/write-sine-curves.ps1 b/Scripts/write-sine-curves.ps1 index 39d02580..001110d2 100644 --- a/Scripts/write-sine-curves.ps1 +++ b/Scripts/write-sine-curves.ps1 @@ -1,4 +1,4 @@ -<# +<# .SYNOPSIS Write sine curves .DESCRIPTION