]> us-delaporte.pagekite.me Git - dotfiles.git/blobdiff - psmodules/dash.psm1
Add todo-txt config
[dotfiles.git] / psmodules / dash.psm1
index 560f7293e4ac2ebeaa1041a13131ef7fdd7dc17b..7e25e70be380fc749dc5a05627b039d33cf898f6 100644 (file)
@@ -1,19 +1,49 @@
+function Get-JournalAgenda() {
+    agenda.exe -path "$HOME/Journal/{YYYY}/{MM}-{DD}.md"
+}
+
+function Measure-JournalTodos() {
+       $todocount = todolist | Measure-Object -Line
+       $env:todocount += '|'
+       $env:todocount += $todocount.lines
+}
 
-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 Show-MyDashBoard() {
+       param(
+               [bool]$gitHub=$true
+       )
+       Write-Host ""
+       Measure-JournalTodos
+       Write-Host "## Todo items for today: $env:todocount" 
+       chart -var todocount
+       Write-Host ""
+       Write-Host "## Agenda for today:"
+       Get-JournalAgenda
+       Write-Host ""
+       if($github) {
+               Write-Host "## GitHub Issues Assigned (Show-AgileMine)"
+               Show-AgileMine
+               Show-AgileMine -DaysAgo 6
+               Write-Host ""
+               Write-Host "## GitHub Issues with no milestone. (Select-AgileNoMilestone)"
+               Write-Host "(Get-AgileQuery -state 'Open' | Invoke-AgileQuery | Select-AgileNoMilestone | Show-MarkdownFromGitHub)"
+               $milestone_repos = $env:github_repos.split(' ') | Where-Object { $_ -Match 'techservicesillinois' }
+               $queries = Get-AgileQuery -state 'Open' -repos $milestone_repos
+               Invoke-AgileQuery -queries $queries | Select-AgileNoMilestone | Show-MarkdownFromGitHub
+       }
+       Write-Host ""
+       Write-Host "Use command 'todolist' to list more tasks."
+       Write-Host "Use command 'chart -var todocount' to show todo item progress."
+       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"
+function Show-MyTeamWork() {
+       $team = @('ddriddle', 'zcarrington', 'tzturner', 'mpitcel', 'edthedev')
+       $team | ForEach-Object {
+               "## $_ - Issues Assigned"
+               Get-AgileQuery -Assignee $_ | Invoke-AgileQuery | Show-MarkdownFromGitHub
+       }
 }
 
-Export-ModuleMember -Function Invoke-MyDashboard
\ No newline at end of file
+Export-ModuleMember -Function Show-MyDashboard
+Export-ModuleMember -Function Show-MyTeamWork
\ No newline at end of file