mirror of
https://github.com/fleschutz/PowerShell.git
synced 2024-11-08 00:54:04 +01:00
Add check-day.ps1
This commit is contained in:
parent
42aab1440b
commit
9259ab452a
@ -32,7 +32,7 @@ When finished say: *"Computer, close [app]"* to close the application.
|
||||
|
||||
*"Computer, check [item]."*
|
||||
--------------------------
|
||||
Lets the computer check something, replace [item] by: `Bitcoin rate`, `Christmas`, `CPU`, `date`, `dawn`, `DNS`, `drives`, `dusk`, `Easter Sunday`, `Earth` (fun), `Ether rate`, `headlines`, `Independence Day`, `ISS position`, `midnight`, `moon phase`, `New Year`, `noon`, `operating system`, `ping`, `Santa`, `sunrise`, `sunset`, `swap space`, `tea time`, `Tether rate`, `time`, `time zone`, `up-time`, `VPN`, `weather`, `week`, `year`, or `zenith`.
|
||||
Lets the computer check something, replace [item] by: `Bitcoin rate`, `Christmas`, `CPU`, `date`, `dawn`, `day`, `DNS`, `drives`, `dusk`, `Easter Sunday`, `Earth` (fun), `Ether rate`, `headlines`, `Independence Day`, `ISS position`, `midnight`, `moon phase`, `New Year`, `noon`, `operating system`, `ping`, `Santa`, `sunrise`, `sunset`, `swap space`, `tea time`, `Tether rate`, `time`, `time zone`, `up-time`, `VPN`, `weather`, `week`, `year`, or `zenith`.
|
||||
|
||||
|
||||
*"Computer, open [letter] drive."*
|
||||
|
23
Scripts/check-day.ps1
Normal file
23
Scripts/check-day.ps1
Normal file
@ -0,0 +1,23 @@
|
||||
<#
|
||||
.SYNOPSIS
|
||||
Determines the current day
|
||||
.DESCRIPTION
|
||||
This script determines and speaks the current day by text-to-speech (TTS).
|
||||
.EXAMPLE
|
||||
PS> ./check-day
|
||||
✔️ It's Sunday.
|
||||
.NOTES
|
||||
Author: Markus Fleschutz · License: CC0
|
||||
.LINK
|
||||
https://github.com/fleschutz/PowerShell
|
||||
#>
|
||||
|
||||
try {
|
||||
[system.threading.thread]::currentthread.currentculture=[system.globalization.cultureinfo]"en-US"
|
||||
$Weekday = (Get-Date -format "dddd")
|
||||
& "$PSScriptRoot/give-reply.ps1" "It's $Weekday."
|
||||
exit 0 # success
|
||||
} catch {
|
||||
"⚠️ Error: $($Error[0]) ($($MyInvocation.MyCommand.Name):$($_.InvocationInfo.ScriptLineNumber))"
|
||||
exit 1
|
||||
}
|
Loading…
Reference in New Issue
Block a user