mirror of
https://github.com/fleschutz/PowerShell.git
synced 2025-04-24 19:08:27 +02:00
Rename to list-memos.ps1
This commit is contained in:
parent
d12a27ace0
commit
7c41820f13
@ -1,2 +0,0 @@
|
|||||||
Time,User,Text
|
|
||||||
2020-12-24T09:24:30Z,mf,Hello World
|
|
|
@ -98,7 +98,7 @@ list-hidden-files.ps1, lists hidden files within the given directory tree
|
|||||||
list-installed-apps.ps1, lists the installed Windows Store apps
|
list-installed-apps.ps1, lists the installed Windows Store apps
|
||||||
list-installed-software.ps1, lists the installed software (except Windows Store apps)
|
list-installed-software.ps1, lists the installed software (except Windows Store apps)
|
||||||
list-latest-tag.ps1, lists the latest tag on the current branch in a Git repository
|
list-latest-tag.ps1, lists the latest tag on the current branch in a Git repository
|
||||||
list-logbook.ps1, lists the content of the logbook
|
list-memos.ps1, lists the memos at $HOME/Memos.csv
|
||||||
list-unused-files.ps1, lists unused files in a directory tree
|
list-unused-files.ps1, lists unused files in a directory tree
|
||||||
list-cmdlets.ps1, lists the PowerShell cmdlets
|
list-cmdlets.ps1, lists the PowerShell cmdlets
|
||||||
list-earthquakes.ps1, lists earthquakes with magnitude >= 6.0 for the last 30 days
|
list-earthquakes.ps1, lists earthquakes with magnitude >= 6.0 for the last 30 days
|
||||||
|
|
@ -190,8 +190,8 @@ Mega Collection of PowerShell Scripts
|
|||||||
* [list-emojis.ps1](Scripts/list-emojis.ps1) - lists the emojis of Unicode 13.0
|
* [list-emojis.ps1](Scripts/list-emojis.ps1) - lists the emojis of Unicode 13.0
|
||||||
* [list-fritzbox-calls.ps1](Scripts/list-fritzbox-calls.ps1) - lists the FRITZ!Box calls
|
* [list-fritzbox-calls.ps1](Scripts/list-fritzbox-calls.ps1) - lists the FRITZ!Box calls
|
||||||
* [list-fritzbox-devices.ps1](Scripts/list-fritzbox-devices.ps1) - lists FRITZ!Box's known devices
|
* [list-fritzbox-devices.ps1](Scripts/list-fritzbox-devices.ps1) - lists FRITZ!Box's known devices
|
||||||
* [list-logbook.ps1](Scripts/list-logbook.ps1) - lists the content of the logbook
|
|
||||||
* [list-earthquakes.ps1](Scripts/list-earthquakes.ps1) - lists earthquakes with magnitude >= 6.0 for the last 30 days
|
* [list-earthquakes.ps1](Scripts/list-earthquakes.ps1) - lists earthquakes with magnitude >= 6.0 for the last 30 days
|
||||||
|
* [list-memos.ps1](Scripts/list-memos.ps1) - lists the memos at $HOME/Memos.csv
|
||||||
* [list-mysql-tables.ps1](Scripts/list-mysql-tables.ps1) - lists the MySQL server tables
|
* [list-mysql-tables.ps1](Scripts/list-mysql-tables.ps1) - lists the MySQL server tables
|
||||||
* [list-news.ps1](Scripts/list-news.ps1) - lists the latest news
|
* [list-news.ps1](Scripts/list-news.ps1) - lists the latest news
|
||||||
* [list-os-releases.ps1](Scripts/list-os-releases.ps1) - lists operating system releases and download URL
|
* [list-os-releases.ps1](Scripts/list-os-releases.ps1) - lists operating system releases and download URL
|
||||||
|
@ -1,29 +0,0 @@
|
|||||||
<#
|
|
||||||
.SYNTAX list-logbook.ps1
|
|
||||||
.DESCRIPTION lists the content of the logbook (in ../Data/logbook.csv)
|
|
||||||
.LINK https://github.com/fleschutz/PowerShell
|
|
||||||
.NOTES Author: Markus Fleschutz / License: CC0
|
|
||||||
#>
|
|
||||||
|
|
||||||
$PathToRepo = "$PSScriptRoot/.."
|
|
||||||
|
|
||||||
try {
|
|
||||||
write-progress "Reading Data/logbook.csv..."
|
|
||||||
$Table = import-csv "$PathToRepo/Data/logbook.csv"
|
|
||||||
write-progress -completed "Reading Data/logbook.csv..."
|
|
||||||
|
|
||||||
write-output ""
|
|
||||||
write-output "Time User Text"
|
|
||||||
write-output "---- ---- ----"
|
|
||||||
foreach($Row in $Table) {
|
|
||||||
$Time = $Row.Time
|
|
||||||
$User = $Row.User
|
|
||||||
$Text = $Row.Text
|
|
||||||
write-output "$Time $User $Text"
|
|
||||||
}
|
|
||||||
write-output ""
|
|
||||||
exit 0
|
|
||||||
} catch {
|
|
||||||
write-error "⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])"
|
|
||||||
exit 1
|
|
||||||
}
|
|
32
Scripts/list-memos.ps1
Executable file
32
Scripts/list-memos.ps1
Executable file
@ -0,0 +1,32 @@
|
|||||||
|
<#
|
||||||
|
.SYNTAX list-memos.ps1
|
||||||
|
.DESCRIPTION lists the memos at $HOME/Memos.csv
|
||||||
|
.LINK https://github.com/fleschutz/PowerShell
|
||||||
|
.NOTES Author: Markus Fleschutz / License: CC0
|
||||||
|
#>
|
||||||
|
|
||||||
|
|
||||||
|
try {
|
||||||
|
$Path = "$HOME/Memos.csv"
|
||||||
|
if (test-path "$Path") {
|
||||||
|
write-progress "Reading $Path ..."
|
||||||
|
$Table = import-csv "$Path"
|
||||||
|
write-progress -completed "Reading $Path"
|
||||||
|
|
||||||
|
""
|
||||||
|
"Time User Text"
|
||||||
|
"---- ---- ----"
|
||||||
|
foreach($Row in $Table) {
|
||||||
|
$Time = $Row.Time
|
||||||
|
$User = $Row.User
|
||||||
|
$Text = $Row.Text
|
||||||
|
"$Time $User $Text"
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
"Sorry, no $Path file found"
|
||||||
|
}
|
||||||
|
exit 0
|
||||||
|
} catch {
|
||||||
|
write-error "⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])"
|
||||||
|
exit 1
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user