Skip to content

feat: Expose checkbox tasks and to-dos as an ICS subscription feed #108

Description

@allenporter

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:

  1. 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).
  2. 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions