From 5d0a60bae72aeab9d1ab57742885e4e1c58dfe8d Mon Sep 17 00:00:00 2001 From: Markus Fleschutz Date: Wed, 8 Dec 2021 08:05:11 +0100 Subject: [PATCH] Add check-tether-rate.ps1 and show-tether-rate.ps1 --- Docs/VoiceControl.md | 7 +++++-- ...k-doge-coin-rate.ps1 => check-tether-rate.ps1} | 10 +++++----- Scripts/show-tether-rate.ps1 | 15 +++++++++++++++ 3 files changed, 25 insertions(+), 7 deletions(-) rename Scripts/{check-doge-coin-rate.ps1 => check-tether-rate.ps1} (55%) create mode 100644 Scripts/show-tether-rate.ps1 diff --git a/Docs/VoiceControl.md b/Docs/VoiceControl.md index 506c16b6..93ff0a3c 100644 --- a/Docs/VoiceControl.md +++ b/Docs/VoiceControl.md @@ -27,7 +27,7 @@ When finished say: "Computer, close [app]" to close the application. `Computer, check` [name] ------------------------ -Lets the computer check something, replace [name] by: `Bitcoin rate`, `Christmas`, `CPU`, `date`, `dawn`, `DNS`, `Dogecoin rate`, `drives`, `dusk`, `Earth` (fun), `Ether rate`, `headlines`, `ISS`, `midnight`, `moon phase`, `New Year`, `noon`, `operating system`, `ping`, `Santa`, `sunrise`, `sunset`, `swap space`, `tea time`, `time`, `time zone`, `up-time`, `VPN`, `weather`, or `zenith`. +Lets the computer check something, replace [name] by: `Bitcoin rate`, `Christmas`, `CPU`, `date`, `dawn`, `DNS`, `drives`, `dusk`, `Earth` (fun), `Ether rate`, `headlines`, `ISS`, `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`, or `zenith`. `Computer, open` [name] `browser` @@ -100,7 +100,10 @@ When finished say: "Close tab" or: "Computer, close [name] browser" to close the `Computer, show` [name] `rate` ------------------------------ -Launches the default Web browser showing the given exchange rate - replace [name] by: `Bitcoin`, `Ether`, `Euro`, or `US dollar`. +Launches the default Web browser showing the given exchange rate - replace [name] by: `Bitcoin`, `Ether`, `Euro`, `Tether`, or `US dollar`. + +When finished say: "Close tab" or: "Computer, close [name] browser" to close the Web browser. + 🔊 Audio Voice Commands ------------------------ diff --git a/Scripts/check-doge-coin-rate.ps1 b/Scripts/check-tether-rate.ps1 similarity index 55% rename from Scripts/check-doge-coin-rate.ps1 rename to Scripts/check-tether-rate.ps1 index 6f986fd3..7eca0258 100644 --- a/Scripts/check-doge-coin-rate.ps1 +++ b/Scripts/check-tether-rate.ps1 @@ -1,10 +1,10 @@ <# .SYNOPSIS - Checks the Dogecoin rate + Checks the Tether rate .DESCRIPTION - This script queries the current Dogecoin exchange rates and answers by text-to-speech (TTS). + This script queries the current Tether exchange rates and answers by text-to-speech (TTS). .EXAMPLE - PS> ./check-doge-coin-rate + PS> ./check-tether-rate .NOTES Author: Markus Fleschutz · License: CC0 .LINK @@ -12,9 +12,9 @@ #> try { - $Rates = (Invoke-WebRequest -uri "https://min-api.cryptocompare.com/data/price?fsym=DOGE&tsyms=USD,EUR" -userAgent "curl" -useBasicParsing).Content | ConvertFrom-Json + $Rates = (Invoke-WebRequest -uri "https://min-api.cryptocompare.com/data/price?fsym=USDT&tsyms=USD,EUR" -userAgent "curl" -useBasicParsing).Content | ConvertFrom-Json - & "$PSScriptRoot/give-reply.ps1" "Dogecoin is currently at $($Rates.USD) US$ and $($Rates.EUR) Euro." + & "$PSScriptRoot/give-reply.ps1" "Tether is currently at $($Rates.USD) US$ and $($Rates.EUR) Euro." exit 0 # success } catch { "⚠️ Error: $($Error[0]) ($($MyInvocation.MyCommand.Name):$($_.InvocationInfo.ScriptLineNumber))" diff --git a/Scripts/show-tether-rate.ps1 b/Scripts/show-tether-rate.ps1 new file mode 100644 index 00000000..477b0080 --- /dev/null +++ b/Scripts/show-tether-rate.ps1 @@ -0,0 +1,15 @@ +<# +.SYNOPSIS + Shows the Tether rate +.DESCRIPTION + This script launches the Web browser and shows the Tether rate. +.EXAMPLE + PS> ./show-tether-rate +.NOTES + Author: Markus Fleschutz · License: CC0 +.LINK + https://github.com/fleschutz/PowerShell +#> + +& "$PSScriptRoot/open-default-browser.ps1" "https://www.bitstamp.net/markets/usdt/usd/" +exit 0 # success