]> apps.delaporte.us Git - dotfiles.git/blob - psmodules/dash.psm1
Shorter flag
[dotfiles.git] / psmodules / dash.psm1
1 function Get-JournalAgenda() {
2 agenda.exe -path "$HOME/Journal/{YYYY}/{MM}-{DD}.md"
3 }
4
5 function Measure-JournalTodos() {
6 $todocount = todolist | Measure-Object -Line
7 $env:todocount += '|'
8 $env:todocount += $todocount.lines
9 }
10
11 function Show-MyDashBoard() {
12 param(
13 # [switch]$todocount=$true,
14 [switch]$agenda=$true,
15 [switch]$gitHub=$false,
16 [switch]$bugs=$false,
17 [switch]$todo=$false,
18 [switch]$orphans=$false
19 )
20 $todocount = $true
21 if($todocount){
22 Measure-JournalTodos
23 Write-Host ""
24 Write-Host "## Todo items for today: $env:todocount"
25 chart -var todocount
26 }
27 if($agenda){
28 Write-Host ""
29 Write-Host "## Agenda for today:"
30 Get-JournalAgenda
31 }
32 if($github) {
33 Write-Host ""
34 Write-Host "## GitHub Status (gh status)"
35 Invoke-Expression "gh status"
36 }
37 if($bugs) {
38 Write-Host ""
39 Write-Host "## Known Bugs"
40 Invoke-AgileCmd "gh issue list -S 'label:bug'"
41 }
42 if($todo) {
43 Write-Host ""
44 Write-Host "## Todo List"
45 todolist
46 }
47 if($orphans) {
48 Write-Host ""
49 Write-Host "## Issues with No Milestone"
50 Invoke-AgileCmd "gh issue list -S 'is:open is:issue no:milestone'"
51 }
52 }
53
54 function Show-MyTeamWork() {
55 $team = @('ddriddle', 'zcarrington', 'tzturner', 'mpitcel', 'edthedev')
56 $team | ForEach-Object {
57 "## $_ - Issues Assigned"
58 Get-AgileQuery -Assignee $_ | Invoke-AgileQuery | Show-MarkdownFromGitHub
59 }
60 }
61
62 Export-ModuleMember -Function Show-MyDashboard
63 Export-ModuleMember -Function Show-MyTeamWork