Summary
Expose task checkboxes (from handwritten note OCR) and native device to-dos (from the Schedule app) as a standard iCalendar (.ics) subscription link. This will allow users to subscribe to their handwritten and digital tasks in applications like Apple Calendar/Reminders, Google Calendar, Outlook, or Nextcloud.
Technical Context
1. Data Sources
We have two distinct task sources in the SQLite database:
- Device-Native Schedule Tasks (Digital To-Dos):
- Source Table:
t_schedule_task (mapped to ScheduleTaskDO)
- Attributes to Map:
title, detail (description), due_time (due date/time), status (completed vs needsAction), and recurrence (RRule).
- OCR Handwritten Checkboxes (Handwritten To-Dos):
- Source Table:
f_note_page_content (mapped to NotePageContentDO)
- Attributes to Map: Parse the
text_content string for checkbox patterns identified by the Gemini Vision OCR module (e.g., lines starting with •, [ ], [x], or task indicators like > and < as defined in the prompt legend).
2. Proposed Changes
- Feed Endpoint: Expose a new public (or token-authenticated) GET endpoint, e.g.,
/api/feed/tasks.ics?token=<user_token> or /api/users/{userId}/tasks.ics.
- ICS Generation:
- Use the
ical (or icalendar) package to generate the iCalendar feed.
- Map retrieved tasks to standard iCalendar
VTODO components.
- Map
due_time to the DUE property.
- Map
status to the STATUS property (COMPLETED, NEEDS-ACTION).
- Include a link back to the source note/page inside the description for OCR tasks.
Summary
Expose task checkboxes (from handwritten note OCR) and native device to-dos (from the Schedule app) as a standard iCalendar (.ics) subscription link. This will allow users to subscribe to their handwritten and digital tasks in applications like Apple Calendar/Reminders, Google Calendar, Outlook, or Nextcloud.
Technical Context
1. Data Sources
We have two distinct task sources in the SQLite database:
t_schedule_task(mapped toScheduleTaskDO)title,detail(description),due_time(due date/time),status(completedvsneedsAction), andrecurrence(RRule).f_note_page_content(mapped toNotePageContentDO)text_contentstring for checkbox patterns identified by the Gemini Vision OCR module (e.g., lines starting with•,[ ],[x], or task indicators like>and<as defined in the prompt legend).2. Proposed Changes
/api/feed/tasks.ics?token=<user_token>or/api/users/{userId}/tasks.ics.ical(oricalendar) package to generate the iCalendar feed.VTODOcomponents.due_timeto theDUEproperty.statusto theSTATUSproperty (COMPLETED,NEEDS-ACTION).