[WIP] table formatting

This commit is contained in:
Martin Pander
2024-05-24 17:17:58 +02:00
parent 1086b19765
commit f7b54b607b
6 changed files with 587 additions and 117 deletions

View File

@ -26,6 +26,7 @@ type Task struct {
Priority string `json:"priority"`
Status string `json:"status,omitempty"`
Tags []string `json:"tags"`
VirtualTags []string `json:"-"`
Depends []string `json:"depends,omitempty"`
DependsIds string `json:"-"`
Urgency float32 `json:"urgency,omitempty"`

View File

@ -20,7 +20,7 @@ const (
)
var (
reportBlacklist = map[string]struct{}{
nonStandardReports = map[string]struct{}{
"burndown.daily": {},
"burndown.monthly": {},
"burndown.weekly": {},
@ -36,7 +36,7 @@ var (
"timesheet": {},
}
tagBlacklist = map[string]struct{}{
virtualTags = map[string]struct{}{
"ACTIVE": {},
"ANNOTATED": {},
"BLOCKED": {},
@ -280,7 +280,7 @@ func (ts *TaskSquire) GetTags() []string {
tags := make([]string, 0)
for _, tag := range strings.Split(string(output), "\n") {
if _, ok := tagBlacklist[tag]; !ok && tag != "" {
if _, ok := virtualTags[tag]; !ok && tag != "" {
tags = append(tags, tag)
}
}
@ -426,7 +426,7 @@ func (ts *TaskSquire) extractReports() Reports {
reports := make(Reports)
for _, report := range availableReports {
if _, ok := reportBlacklist[report]; ok {
if _, ok := nonStandardReports[report]; ok {
continue
}
reports[report] = &Report{