MCPcopy Create free account
hub / github.com/driangle/taskmd / generateBoardFiles

Function generateBoardFiles

apps/cli/internal/web/export.go:166–177  ·  view source on GitHub ↗
(boardDir string, tasks []*model.Task)

Source from the content-addressed store, hash-verified

164}
165
166func generateBoardFiles(boardDir string, tasks []*model.Task) error {
167 for _, groupBy := range []string{"status", "priority", "effort", "type", "group", "tag"} {
168 grouped, err := board.GroupTasks(tasks, groupBy)
169 if err != nil {
170 return fmt.Errorf("failed to group tasks by %s: %w", groupBy, err)
171 }
172 if err := writeJSONFile(boardDir, groupBy+".json", board.ToJSON(grouped)); err != nil {
173 return err
174 }
175 }
176 return nil
177}
178
179func generateAnalyticsFiles(apiDir string, tasks []*model.Task, archivedTasks []*model.Task) error {
180 if err := writeJSONFile(apiDir, "graph.json", graph.NewGraph(tasks).ToJSON()); err != nil {

Callers 1

generateDataFilesFunction · 0.85

Calls 2

writeJSONFileFunction · 0.85
ToJSONMethod · 0.80

Tested by

no test coverage detected