Updated what-is.ps1

This commit is contained in:
Markus Fleschutz 2024-11-02 14:37:14 +01:00
parent 312686d50f
commit f0165acd8d
2 changed files with 5 additions and 3 deletions

View File

@ -297,6 +297,7 @@ NINS,National Institutes of Natural Sciences
NIRPS,(NNT) Near Infra Red Planet Searcher
NOVA,The Netherlands Research School for Astronomy (Nederlandse Onderzoekschool voor Astronomie)
NRAO,National Radio Astronomy Observatory
NRQZ,(U.S.) National Radio Quiet Zone
NSF,National Science Foundation
NTT,New Technology Telescope
NUVA,Network for UltraViolet Astrophysics

1 TERM MEANING
297 NIRPS (NNT) Near Infra Red Planet Searcher
298 NOVA The Netherlands Research School for Astronomy (Nederlandse Onderzoekschool voor Astronomie)
299 NRAO National Radio Astronomy Observatory
300 NRQZ (U.S.) National Radio Quiet Zone
301 NSF National Science Foundation
302 NTT New Technology Telescope
303 NUVA Network for UltraViolet Astrophysics

View File

@ -17,9 +17,9 @@
param([string]$term = "")
try {
if ($term -eq "" ) { $term = Read-Host "Enter the term/abbreviation/etc. to query" }
if ($term -eq "" ) { $term = Read-Host "Enter the term to query" }
$files = (Get-ChildItem "$PSScriptRoot/../data/dicts/*.csv")
$files = Get-ChildItem "$PSScriptRoot/../data/dicts/*.csv"
$basename = ""
foreach($file in $files) {
$table = Import-CSV "$file"
@ -30,7 +30,8 @@ try {
}
}
if ($basename -eq "") {
& "$PSScriptRoot/open-URL.ps1" "https://www.google.com/search?q=what+is+$term" "🤷‍ Sorry, no '$term' entry found. Let's google it at: "
Write-Host "🤷‍ Sorry, '$term' is unknown to me. Ctrl + click here to google it: " -noNewline
Write-Host "https://www.google.com/search?q=what+is+$term" -foregroundColor blue
}
exit 0 # success
} catch {