]> apps.delaporte.us Git - dotfiles.git/commitdiff
Merge branch 'main' of github.com:edthedev/dotfiles into main
authorEdward Delaporte <delaport@illinois.edu>
Wed, 7 Jul 2021 16:13:30 +0000 (11:13 -0500)
committerEdward Delaporte <delaport@illinois.edu>
Wed, 7 Jul 2021 16:13:30 +0000 (11:13 -0500)
Microsoft.PowerShell_profile.ps1
psmodules/dash.psm1
psmodules/edgithub.psd1 [deleted file]
psmodules/edgithub.psm1

index 6be7ab95e781d19a0506680645021ced7c8a1b86..f70c705774b77adf471cbf91753cb0e9e9669ed6 100644 (file)
@@ -100,5 +100,14 @@ function Get-GitStatus() {
        git status -b --short
 }
 
+function Get-JournalAgenda() {
+       Get-Content $(Get-JournalFile -date $(Get-Date))
+}
+
+# Nice for git
 New-Alias ol           Get-GitLog
 New-Alias st           Get-GitStatus
+
+# Dashboard
+New-Alias dash   Get-MyDashboard # See dash.psm1
+New-Alias agenda Get-JournalAgenda
index 560f7293e4ac2ebeaa1041a13131ef7fdd7dc17b..4b74daac422d824c42e93ca24edb7600b922367d 100644 (file)
@@ -1,19 +1,16 @@
 
-function Get-MyDashboard() {
-  $MyDashboard = New-UDDashboard -Title "Hello, World" -Content {
-    New-UDCard -Title "Hello, Universal Dashboard" -Content {
-      New-UDParagraph -Text 'I am a very simple card. I am good at containing small bits of information. I am convenient because I require little markup to use effectively.'
-    } -Links @(
-      New-UDLink -Text 'This is a link' -Url '#!'
-      New-UDLink -Text 'This is a link' -Url '#!'
-      ) -Size 'small'
-    }
-  return $MyDashboard
+function Get-MyDashBoard() {
+       Measure-JournalTodos
+       chart
+       # todo
+       # Get-JournalAgenda
+       Write-Host "Todo items for today:"
+       Get-JournalTodayTodos
+  Write-Host "GitHub Issues Assigned"
+  Show-GHMine
+       Write-Host "Use command 'todo' to list more tasks."
+       Write-Host "Use command 'agenda' to list the plan for today."
 }
 
-function Inovke-MyDashboard() {
-  Start-UDDashboard -Port 1000 -Dashboard Get-MyDashboard
-  Write-Host "http://localhost:1000"
-}
 
-Export-ModuleMember -Function Invoke-MyDashboard
\ No newline at end of file
+Export-ModuleMember -Function Get-MyDashboard
\ No newline at end of file
diff --git a/psmodules/edgithub.psd1 b/psmodules/edgithub.psd1
deleted file mode 100644 (file)
index 6d7562d..0000000
Binary files a/psmodules/edgithub.psd1 and /dev/null differ
index 0f26e2433919ada46c4dcc1006d16162d3809fbc..68c5e77553939e1b5dbd98ab00a504c70b2e1a94 100644 (file)
@@ -39,5 +39,38 @@ function Show-GHClosed() {
 
 }
 
+<#
+.SYNPOSIS
+
+Fetch GitHub issues I am working on.
+
+#>
+function Get-GHMine() {
+  $repos = @('SecOps-Tools', 'secdev-job-aids', 'awscli-login')
+  $issueSearchParams = @{ Assignee = 'edthedev'; State = 'open'; OwnerName = 'techservicesillinois' }
+  $issues = @()
+  $repos | ForEach-Object { 
+    $issues += Get-GitHubIssue -RepositoryName $_ @issueSearchParams
+  }
+
+  return $issues
+}
+
+<#
+.SYNOPSIS
+
+Show GitHub issues I am working on.
+
+#>
+function Show-GHMine() {
+  Get-GHMine | ForEach-Object {
+    # Markdown output
+    " + [" + $_.Title + " (" + $_.Number + ")](" + $_.html_url + ")"
+  }
+}
+
+
 Export-ModuleMember -Function Get-GHClosed
-Export-ModuleMember -Function Show-GHClosed
\ No newline at end of file
+Export-ModuleMember -Function Show-GHClosed
+Export-ModuleMember -Function Get-GHMine
+Export-ModuleMember -Function Show-GHMine
\ No newline at end of file