mirror of
https://github.com/fleschutz/PowerShell.git
synced 2025-01-23 06:08:36 +01:00
Update list-crypto-rates.ps1 and list-news.ps1
This commit is contained in:
parent
afb0e2b9e4
commit
3e3dd13302
@ -280,6 +280,7 @@ MSL,Median Sea Level
|
|||||||
MSTA,Minimum Safe Turning Altitude
|
MSTA,Minimum Safe Turning Altitude
|
||||||
MTOW,Maximum Take-Off Weight
|
MTOW,Maximum Take-Off Weight
|
||||||
NLFS,Night Low Flying System
|
NLFS,Night Low Flying System
|
||||||
|
NOTAM,Notice to Airmen or Notice to Air Missions
|
||||||
OCTA,Outside Control Areas
|
OCTA,Outside Control Areas
|
||||||
OEI,One Engine Inoperative
|
OEI,One Engine Inoperative
|
||||||
OGE,Out of Ground Effect
|
OGE,Out of Ground Effect
|
||||||
|
Can't render this file because it has a wrong number of fields in line 126.
|
@ -3396,7 +3396,6 @@ NORTHAG,Northern Army Group
|
|||||||
NOS,Network Operating System,New Old Stock (Internet auction/trading listings),Nitric Oxide Synthase (enzyme)
|
NOS,Network Operating System,New Old Stock (Internet auction/trading listings),Nitric Oxide Synthase (enzyme)
|
||||||
NOSA,NATO OSI Security Architecture
|
NOSA,NATO OSI Security Architecture
|
||||||
NOTAFLOF,No One Turned Away For Lack Of Funds
|
NOTAFLOF,No One Turned Away For Lack Of Funds
|
||||||
NOTAM,Notice to Airmen
|
|
||||||
NOW,National Organization for Women
|
NOW,National Organization for Women
|
||||||
NP,National Permit,A permit in India for trucks so they can go anywhere in the nation
|
NP,National Permit,A permit in India for trucks so they can go anywhere in the nation
|
||||||
Np,Neap tide (nautical charts),Neptunium
|
Np,Neap tide (nautical charts),Neptunium
|
||||||
|
Can't render this file because it contains an unexpected character in line 29 and column 86.
|
@ -1,8 +1,8 @@
|
|||||||
<#
|
<#
|
||||||
.SYNOPSIS
|
.SYNOPSIS
|
||||||
Lists crypto exchange rates
|
List crypto rates
|
||||||
.DESCRIPTION
|
.DESCRIPTION
|
||||||
This PowerShell script queries and lists the current crypto exchange rates from cryptocompare.com.
|
This PowerShell script queries cryptocompare.com and lists the current crypto exchange rates in USD/EUR/RUB/CNY.
|
||||||
.EXAMPLE
|
.EXAMPLE
|
||||||
PS> ./list-crypto-rates
|
PS> ./list-crypto-rates
|
||||||
.LINK
|
.LINK
|
||||||
@ -19,18 +19,21 @@ function ListCryptoRate { param([string]$Symbol, [string]$Name)
|
|||||||
function ListCryptoRates {
|
function ListCryptoRates {
|
||||||
ListCryptoRate BTC "Bitcoin"
|
ListCryptoRate BTC "Bitcoin"
|
||||||
ListCryptoRate ETH "Ethereum"
|
ListCryptoRate ETH "Ethereum"
|
||||||
|
ListCryptoRate BUSD "BUSD"
|
||||||
|
ListCryptoRate XRP "XRP"
|
||||||
|
ListCryptoRate USDT "Tether"
|
||||||
|
ListCryptoRate AVAX "Avalanche"
|
||||||
|
ListCryptoRate LTC "Litecoin"
|
||||||
|
ListCryptoRate SOL "Solana"
|
||||||
|
ListCryptoRate GALA "Gala"
|
||||||
|
ListCryptoRate DOGE "Dogecoin"
|
||||||
ListCryptoRate ADA "Cardano"
|
ListCryptoRate ADA "Cardano"
|
||||||
ListCryptoRate BNB "Binance Coin"
|
ListCryptoRate BNB "Binance Coin"
|
||||||
ListCryptoRate USDT "Tether"
|
|
||||||
ListCryptoRate XRP "XRP"
|
|
||||||
ListCryptoRate DOGE "Dogecoin"
|
|
||||||
ListCryptoRate USDC "USD Coin"
|
ListCryptoRate USDC "USD Coin"
|
||||||
ListCryptoRate DOT "Polkadot"
|
ListCryptoRate DOT "Polkadot"
|
||||||
ListCryptoRate SOL "Solana"
|
|
||||||
ListCryptoRate UNI "Uniswap"
|
ListCryptoRate UNI "Uniswap"
|
||||||
ListCryptoRate BUSD "Binance USD"
|
ListCryptoRate BUSD "Binance USD"
|
||||||
ListCryptoRate BCH "Bitcoin Cash"
|
ListCryptoRate BCH "Bitcoin Cash"
|
||||||
ListCryptoRate LTC "Litecoin"
|
|
||||||
ListCryptoRate LINK "Chainlink"
|
ListCryptoRate LINK "Chainlink"
|
||||||
ListCryptoRate LUNA "Terra"
|
ListCryptoRate LUNA "Terra"
|
||||||
ListCryptoRate ICP "Internet Computer"
|
ListCryptoRate ICP "Internet Computer"
|
||||||
@ -40,10 +43,8 @@ function ListCryptoRates {
|
|||||||
}
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
" "
|
|
||||||
"Current Crypto Exchange Rates by cryptocompare.com"
|
|
||||||
"=================================================="
|
|
||||||
ListCryptoRates | Format-Table -property @{e='Cryptocurrency';width=28},USD,EUR,RUB,CNY
|
ListCryptoRates | Format-Table -property @{e='Cryptocurrency';width=28},USD,EUR,RUB,CNY
|
||||||
|
Write-Host "(by cryptocompare.com, Crypto is volatile and unregulated. Capital at risk. Taxes may apply)"
|
||||||
exit 0 # success
|
exit 0 # success
|
||||||
} catch {
|
} catch {
|
||||||
"⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])"
|
"⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])"
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<#
|
<#
|
||||||
.SYNOPSIS
|
.SYNOPSIS
|
||||||
Lists the news
|
List news
|
||||||
.DESCRIPTION
|
.DESCRIPTION
|
||||||
This PowerShell script lists the latest news by using RSS (Really Simple Syndication) feeds.
|
This PowerShell script lists the latest news by using RSS (Really Simple Syndication) feeds.
|
||||||
.PARAMETER RSS_URL
|
.PARAMETER RSS_URL
|
||||||
@ -36,7 +36,7 @@ try {
|
|||||||
$Date = $Date -Replace "Sat, ",""
|
$Date = $Date -Replace "Sat, ",""
|
||||||
$Date = $Date -Replace "Sun, ",""
|
$Date = $Date -Replace "Sun, ",""
|
||||||
$Copyright = $Content.rss.channel.copyright
|
$Copyright = $Content.rss.channel.copyright
|
||||||
"<$Source|$Date|$Copyright>"
|
"($Source|$Date|$Copyright)"
|
||||||
exit 0 # success
|
exit 0 # success
|
||||||
} catch {
|
} catch {
|
||||||
"⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])"
|
"⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])"
|
||||||
|
Loading…
Reference in New Issue
Block a user