mirror of
https://github.com/fleschutz/PowerShell.git
synced 2025-01-22 21:58:42 +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
|
||||
MTOW,Maximum Take-Off Weight
|
||||
NLFS,Night Low Flying System
|
||||
NOTAM,Notice to Airmen or Notice to Air Missions
|
||||
OCTA,Outside Control Areas
|
||||
OEI,One Engine Inoperative
|
||||
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)
|
||||
NOSA,NATO OSI Security Architecture
|
||||
NOTAFLOF,No One Turned Away For Lack Of Funds
|
||||
NOTAM,Notice to Airmen
|
||||
NOW,National Organization for Women
|
||||
NP,National Permit,A permit in India for trucks so they can go anywhere in the nation
|
||||
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
|
||||
Lists crypto exchange rates
|
||||
List crypto rates
|
||||
.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
|
||||
PS> ./list-crypto-rates
|
||||
.LINK
|
||||
@ -19,18 +19,21 @@ function ListCryptoRate { param([string]$Symbol, [string]$Name)
|
||||
function ListCryptoRates {
|
||||
ListCryptoRate BTC "Bitcoin"
|
||||
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 BNB "Binance Coin"
|
||||
ListCryptoRate USDT "Tether"
|
||||
ListCryptoRate XRP "XRP"
|
||||
ListCryptoRate DOGE "Dogecoin"
|
||||
ListCryptoRate USDC "USD Coin"
|
||||
ListCryptoRate DOT "Polkadot"
|
||||
ListCryptoRate SOL "Solana"
|
||||
ListCryptoRate UNI "Uniswap"
|
||||
ListCryptoRate BUSD "Binance USD"
|
||||
ListCryptoRate BCH "Bitcoin Cash"
|
||||
ListCryptoRate LTC "Litecoin"
|
||||
ListCryptoRate LINK "Chainlink"
|
||||
ListCryptoRate LUNA "Terra"
|
||||
ListCryptoRate ICP "Internet Computer"
|
||||
@ -40,10 +43,8 @@ function ListCryptoRates {
|
||||
}
|
||||
|
||||
try {
|
||||
" "
|
||||
"Current Crypto Exchange Rates by cryptocompare.com"
|
||||
"=================================================="
|
||||
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
|
||||
} catch {
|
||||
"⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])"
|
||||
|
@ -1,6 +1,6 @@
|
||||
<#
|
||||
.SYNOPSIS
|
||||
Lists the news
|
||||
List news
|
||||
.DESCRIPTION
|
||||
This PowerShell script lists the latest news by using RSS (Really Simple Syndication) feeds.
|
||||
.PARAMETER RSS_URL
|
||||
@ -36,7 +36,7 @@ try {
|
||||
$Date = $Date -Replace "Sat, ",""
|
||||
$Date = $Date -Replace "Sun, ",""
|
||||
$Copyright = $Content.rss.channel.copyright
|
||||
"<$Source|$Date|$Copyright>"
|
||||
"($Source|$Date|$Copyright)"
|
||||
exit 0 # success
|
||||
} catch {
|
||||
"⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])"
|
||||
|
Loading…
Reference in New Issue
Block a user