Browse Source

Initial commit.

master
Sam Hunter 4 months ago
parent
commit
163633dd4c
  1. 22
      jot.ps1

22
jot.ps1

@ -0,0 +1,22 @@
#
# jot.ps1
# author: sam hunter
#
$jotpath = "S:\\shared"
function NewJot() {
$jot=Read-Host -Prompt "Jot"
if ($jot.Length -gt 0) {
$user=$env:USERNAME
$ts=(Get-Date -UFormat "%Y-%m-%d %H:%M:%S")
Add-Content -Path "$jotpath/jot-$user.txt" -Value "$ts`t$user`t$jot"
}
}
function DumpJots(){
Import-Csv -Delimiter "`t" -Path "$jotpath\jot-*.txt" -Header Time,Author,Content -ErrorAction Stop |
Sort-Object -Property Time|
Select -First 20 | Format-List
}
DumpJots; NewJot
Loading…
Cancel
Save