diff options
Diffstat (limited to 'internal/models/atom.go')
| -rw-r--r-- | internal/models/atom.go | 25 |
1 files changed, 21 insertions, 4 deletions
diff --git a/internal/models/atom.go b/internal/models/atom.go index 767ccdd..3d9ce54 100644 --- a/internal/models/atom.go +++ b/internal/models/atom.go @@ -9,10 +9,11 @@ import ( type AtomSource string const ( - SourceTrello AtomSource = "trello" - SourceTodoist AtomSource = "todoist" - SourceMeal AtomSource = "plantoeat" - SourceGTasks AtomSource = "gtasks" + SourceTrello AtomSource = "trello" + SourceTodoist AtomSource = "todoist" + SourceMeal AtomSource = "plantoeat" + SourceGTasks AtomSource = "gtasks" + SourceClaudomator AtomSource = "claudomator" ) type AtomType string @@ -123,6 +124,22 @@ func CardToAtom(c Card) Atom { } } +// StoryToAtom converts a ClaudomatorStory to an Atom +func StoryToAtom(s ClaudomatorStory) Atom { + return Atom{ + ID: s.ID, + Title: s.Title, + Description: s.Description + " [" + s.ProjectID + "]", + Source: SourceClaudomator, + Type: TypeTask, + Priority: 3, + SourceIcon: "🤖", + ColorClass: "border-purple-500", + CreatedAt: s.CreatedAt, + Raw: s, + } +} + // GoogleTaskToAtom converts a Google Task to an Atom func GoogleTaskToAtom(t GoogleTask) Atom { // Google Tasks don't have explicit priority, default to medium (2) |
