Update add-memo.ps1, list-memos.ps1, and list-scripts.ps1

This commit is contained in:
Markus Fleschutz
2023-04-25 14:17:42 +02:00
parent 60c2008daa
commit bf81138941
4 changed files with 31 additions and 34 deletions

View File

@ -1,8 +1,8 @@
<#
.SYNOPSIS
Lists all memos in $HOME/Memos.csv
Lists your memo entries
.DESCRIPTION
This PowerShell script lists all memo entries in Memos.csv in the home folder.
This PowerShell script lists all memo entries in Memos.csv in your home folder.
.EXAMPLE
PS> ./list-memos
.LINK
@ -13,20 +13,19 @@
try {
$Path = "$HOME/Memos.csv"
if (test-path "$Path" -pathType leaf) {
$Path = "~/Memos.csv"
if (Test-Path "$Path" -pathType leaf) {
write-progress "Reading $Path ..."
$Table = import-csv "$Path"
$Table = Import-CSV "$Path"
write-progress -completed "Reading $Path"
""
"Time User Text"
"---- ---- ----"
"Time Text"
"---- ----"
foreach($Row in $Table) {
$Time = $Row.Time
$User = $Row.User
$Text = $Row.Text
"$Time $User $Text"
"$Time $Text"
}
} else {
"Sorry, no memos saved yet"