mirror of
https://github.com/fleschutz/PowerShell.git
synced 2024-11-26 01:43:37 +01:00
Add what-is.ps1
This commit is contained in:
parent
c927d7263c
commit
dc01730a4e
@ -182,9 +182,10 @@ turn-volume-down.ps1, turns the audio volume down (-10% by default)
|
|||||||
unmute-audio.ps1, unmutes audio
|
unmute-audio.ps1, unmutes audio
|
||||||
upload-file.ps1, uploads the local file to the given FTP server
|
upload-file.ps1, uploads the local file to the given FTP server
|
||||||
voice-control.ps1, executes the PowerShell scripts by voice
|
voice-control.ps1, executes the PowerShell scripts by voice
|
||||||
|
wakeup.ps1, sends a magic packet to the given computer, waking him up
|
||||||
weather.ps1, prints the current weather forecast
|
weather.ps1, prints the current weather forecast
|
||||||
weather-report.ps1, prints the local weather report
|
weather-report.ps1, prints the local weather report
|
||||||
wakeup.ps1, sends a magic packet to the given computer, waking him up
|
what-is.ps1, prints a description of the given abbreviation
|
||||||
write-animated.ps1, writes animated text
|
write-animated.ps1, writes animated text
|
||||||
write-big.ps1, writes the given text in big letters
|
write-big.ps1, writes the given text in big letters
|
||||||
write-blue.ps1, writes the given text in a blue foreground color
|
write-blue.ps1, writes the given text in a blue foreground color
|
||||||
|
Can't render this file because it has a wrong number of fields in line 185.
|
31
Data/what-is.csv
Normal file
31
Data/what-is.csv
Normal file
@ -0,0 +1,31 @@
|
|||||||
|
Abbr,Context,Description
|
||||||
|
AB,aviation,Air Base
|
||||||
|
AC,aviation,Aircraft
|
||||||
|
ACAS,aviation,Airborne Collision Avoidance System
|
||||||
|
AF,aviation,Air Field
|
||||||
|
AFM,aviation,Aircraft Flight Manual
|
||||||
|
AIP,aviation,Aeronautical Information Publication
|
||||||
|
AMAN,aviation,Arrival Manager
|
||||||
|
AOA,aviation,Angle of Attack
|
||||||
|
AOM,aviation,Airplane Operating Manual
|
||||||
|
AOR,aviation,Area of Responsibility
|
||||||
|
AFIS,aviation,Aerodrome Flight Information Service
|
||||||
|
AFM,aviation,Airplane Flight Manual
|
||||||
|
AGL,aviation,Above Ground Level
|
||||||
|
AIP,aviation,Aeronautical Information Publication
|
||||||
|
ANSP,aviation,Air Navigation Service Provider
|
||||||
|
ATA,aviation,Actual Time of Arrival
|
||||||
|
ATIS,aviation,Automatic Terminal Information Service
|
||||||
|
ATO,aviation,Air Traffic Organization
|
||||||
|
BAF,aviation,Belgian Air Force
|
||||||
|
CAAC,aviation,Civil Aviation Administration of China
|
||||||
|
CAAS,aviation,Civil Aviation Authorization of Singapore
|
||||||
|
CANSO,aviation,Civil Air Navigation Services Organization (founded 1996, located in Amsterdam)
|
||||||
|
CAS,aviation,Calibrated Airspeed
|
||||||
|
CAT,aviation,Category of aircraft
|
||||||
|
CAVOK,aviation,Ceiling And Visibility OK
|
||||||
|
COG,aviation,Center of Gravity
|
||||||
|
CRDA,aviation,Converging Runway Display Aid
|
||||||
|
CTA,aviation,Controlled Time of Arrival
|
||||||
|
CTOT,aviation,Calculated Take-Off Time
|
||||||
|
IAS,aviation,Indicated Air Speed
|
Can't render this file because it has a wrong number of fields in line 23.
|
@ -212,6 +212,7 @@ Mega Collection of PowerShell Scripts
|
|||||||
* [translate-text.ps1](Scripts/translate-text.ps1) - translates the given text in English into other languages
|
* [translate-text.ps1](Scripts/translate-text.ps1) - translates the given text in English into other languages
|
||||||
* [weather.ps1](Scripts/weather.ps1) - prints the current weather forecast
|
* [weather.ps1](Scripts/weather.ps1) - prints the current weather forecast
|
||||||
* [weather-report.ps1](Scripts/weather-report.ps1) - prints the local weather report
|
* [weather-report.ps1](Scripts/weather-report.ps1) - prints the local weather report
|
||||||
|
* [what-is.ps1](Scripts/what-is.ps1) - prints a description of the given abbreviation
|
||||||
* [write-animated.ps1](Scripts/write-animated.ps1) - writes animated text
|
* [write-animated.ps1](Scripts/write-animated.ps1) - writes animated text
|
||||||
* [write-big.ps1](Scripts/write-big.ps1) - writes the given text in big letters
|
* [write-big.ps1](Scripts/write-big.ps1) - writes the given text in big letters
|
||||||
* [write-blue.ps1](Scripts/write-blue.ps1) - writes the given text in a blue foreground color
|
* [write-blue.ps1](Scripts/write-blue.ps1) - writes the given text in a blue foreground color
|
||||||
|
30
Scripts/what-is.ps1
Executable file
30
Scripts/what-is.ps1
Executable file
@ -0,0 +1,30 @@
|
|||||||
|
<#
|
||||||
|
.SYNTAX what-is.ps1 [<abbreviation>]
|
||||||
|
.DESCRIPTION prints a description of the given abbreviation
|
||||||
|
.LINK https://github.com/fleschutz/PowerShell
|
||||||
|
.NOTES Author: Markus Fleschutz / License: CC0
|
||||||
|
#>
|
||||||
|
|
||||||
|
param($Abbreviation = "")
|
||||||
|
if ($Abbreviation -eq "" ) { $Abbreviation = read-host "Enter the abbreviation" }
|
||||||
|
|
||||||
|
try {
|
||||||
|
write-progress "Reading what-is.csv..."
|
||||||
|
$Table = import-csv "$PSScriptRoot/../Data/what-is.csv"
|
||||||
|
|
||||||
|
$FoundOne = 0
|
||||||
|
foreach($Row in $Table) {
|
||||||
|
if ($Row.Abbr -eq $Abbreviation) {
|
||||||
|
"$($Row.Context): $($Row.Description)"
|
||||||
|
$FoundOne = 1
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($FoundOne -eq 0) {
|
||||||
|
"Sorry, no entry for $Abbreviation found"
|
||||||
|
}
|
||||||
|
exit 0
|
||||||
|
} catch {
|
||||||
|
write-error "ERROR in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])"
|
||||||
|
exit 1
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user