# =============================================================================
# Focus one – Import template for projects and tasks
# Updated: October 2026
# =============================================================================
#
# Use this file to import projects together with their tasks into Focus one,
# for example from your own templates or from another app.
# The file shows every option with an example and can itself be imported, so
# you can try everything out. The test creates an Area called "Example" and
# several example projects, which you can delete afterwards.
#
# The project export in Focus one (Share, Pro) produces exactly this format.
# You can therefore edit exported projects and import them again.
#
# -----------------------------------------------------------------------------
# STRUCTURE
# -----------------------------------------------------------------------------
#   A file can contain any number of projects. Each project starts with a line
#   "project:" at the very beginning of the line (no indentation). The project
#   fields follow, and the tasks go under "tasks:".
#   Do not write a line in notes that starts with "project:" at the very left
#   (indented is fine), otherwise a new project is detected there.
#
#   Alternatively, several projects can be given as a list under "projects:"
#   (see example 8 at the end). In that case use only this form in the file.
#
# -----------------------------------------------------------------------------
# PROJECT FIELDS
# -----------------------------------------------------------------------------
#   title     Required. If the title is empty (""), no project is created. The
#             tasks then land in the Area without a project (see example 6).
#   note      Optional. Project note, multiple lines possible ("\n" or block
#             style with "|").
#   area      Optional. The Area the project goes into. The name is matched
#             exactly, and a missing Area is created. Without this field the
#             project stays without an Area.
#   format    Optional. "s", "serial" or "seriell" => serial project (Pro).
#             Without Pro the project is imported as a parallel one.
#             "p", "parallel", "f", "free", "frei" or any other value
#             => parallel project.
#   deadline  Optional. Deadline of the project. Date formats see below.
#
# -----------------------------------------------------------------------------
# TASK FIELDS
# -----------------------------------------------------------------------------
#   title      Required. A task without a title aborts the entire import.
#              Only headings (header: true) may have an empty title.
#   note       Optional. Note, supports **bold**.
#   list       Optional. The list the task lands in. Write everything in
#              lowercase:
#                inbox     = Inbox
#                next      = Next
#                planned   = Scheduled
#                waiting   = Waiting for
#                anytime   = Anytime
#                deferred  = Someday
#              If "list" is missing or the value is unknown (for example
#              "focus" or "done"), the task goes to "Anytime".
#   header     Optional. "true" turns the entry into a heading instead of a
#              task.
#   duedate    Optional. Planned completion date.
#   deadline   Optional. Hard deadline, independent of the completion date.
#   checklist  Optional. Checklist in short or long form (see example 4).
#
#   Not importable: tags, reminders, repeating tasks, attachments, Focus and
#   the "done" status.
#
# -----------------------------------------------------------------------------
# DATE FORMATS (for duedate, deadline and the project deadline)
# -----------------------------------------------------------------------------
#   Always write dates in quotation marks.
#     "2026-12-24"                  Date
#     "2026-12-24T18:30"            Date and time (also with seconds :00)
#     "2026-12-24T18:30:00.000Z"    ISO 8601 with time zone (only with milliseconds)
#     "d10"                         today + 10 days ("d0" = today, "d-1" = yesterday)
#                                   always without a time of day
#     "m1"                          today + 1 month
#   Dates that cannot be read are ignored without an error message, and the
#   field stays empty.
#
# -----------------------------------------------------------------------------
# WHAT HAPPENS TO THE LISTS DURING IMPORT
# -----------------------------------------------------------------------------
#   - Task with duedate              => lands in "Scheduled". Exception:
#                                       "waiting" stays in "Waiting for" (the
#                                       date serves as a follow-up date there).
#   - list: deferred                 => an existing date is removed,
#                                       "Someday" never has a date.
#   - list: inbox with a project     => lands in "Anytime". Tasks with a
#                                       project do not belong in the Inbox.
#   - list: planned without duedate  => lands in "Anytime".
#
# -----------------------------------------------------------------------------
# FURTHER NOTES
# -----------------------------------------------------------------------------
#   - The order of the tasks is the order in the file.
#   - Allowed: comments (#), single and double quotation marks, and block
#     style for multi-line text.
#   - Save the file as UTF-8 (umlauts and special characters).
#   - Indent with spaces, not tabs.
# =============================================================================


# -----------------------------------------------------------------------------
# Example 1: Project with all project fields (parallel project)
# -----------------------------------------------------------------------------
project:
  title: "Example 1 – All project fields"
  note: "Project note with **bold**.\n\nSecond paragraph with \\n\\n."
  area: "Example"
  format: "p"          # p / parallel
  deadline: "2026-12-31"

tasks:
  - title: "Heading (header: true)"
    list: "anytime"
    header: true

  - title: "Task with a title only (list = Anytime)"

  - title: "Task with all fields"
    note: "Note with **bold**\nsecond line"
    list: "anytime"
    duedate: "2026-12-01"        # => task lands in "Scheduled" automatically
    deadline: "2026-12-15"
    checklist:
      - "Short form (open)"
      - title: "Long form (open)"
      - title: "Long form (done)"
        done: true


# -----------------------------------------------------------------------------
# Example 2: All lists, one example each (serial project, Pro)
# -----------------------------------------------------------------------------
project:
  title: "Example 2 – All lists"
  note: "Shows each list once."
  area: "Example"
  format: "s"          # s / serial / seriell

tasks:
  - title: "inbox (becomes Anytime with a project)"
    list: "inbox"

  - title: "next"
    list: "next"

  - title: "planned (with a date)"
    list: "planned"
    duedate: "d7"

  - title: "planned without a date (becomes Anytime)"
    list: "planned"

  - title: "waiting"
    list: "waiting"

  - title: "waiting with a follow-up date (stays in Waiting for)"
    list: "waiting"
    duedate: "d3"

  - title: "anytime"
    list: "anytime"

  - title: "deferred (date is removed)"
    list: "deferred"
    duedate: "m1"

  - title: "Unknown list 'focus' (becomes Anytime)"
    list: "focus"


# -----------------------------------------------------------------------------
# Example 3: Date formats (parallel project, spelled "free")
# -----------------------------------------------------------------------------
project:
  title: "Example 3 – Date formats"
  area: "Example"
  format: "f"          # f / free / frei
  deadline: "m3"       # relative: in 3 months

tasks:
  - title: "Date: yyyy-MM-dd"
    duedate: "2026-12-24"

  - title: "Date and time"
    duedate: "2026-12-24T18:30"

  - title: "Date, time and seconds"
    duedate: "2026-12-24T18:30:00"

  - title: "ISO 8601 with time zone (only with milliseconds)"
    duedate: "2026-12-24T17:30:00.000Z"

  - title: "Relative: today + 10 days (d10)"
    duedate: "d10"

  - title: "Relative: today (d0)"
    duedate: "d0"

  - title: "Relative: in 1 month (m1)"
    duedate: "m1"

  - title: "Relative deadline, without a completion date"
    deadline: "d14"

  - title: "Completion date and deadline"
    duedate: "d5"
    deadline: "d14"


# -----------------------------------------------------------------------------
# Example 4: Checklists in all notations
# -----------------------------------------------------------------------------
project:
  title: "Example 4 – Checklists"
  area: "Example"

tasks:
  - title: "Checklist in short form"
    checklist:
      - "Item one"
      - "Item two"

  - title: "Checklist in long form with done"
    checklist:
      - title: "open (done missing)"
      - title: "open (done: false)"
        done: false
      - title: "done (done: true)"
        done: true
      - title: "done (done: ja)"      # true / yes / ja / x count as done
        done: "ja"

  - title: "Mixed checklist"
    checklist:
      - "Short form"
      - title: "Long form"
        done: true
      - ""                                # empty items are discarded


# -----------------------------------------------------------------------------
# Example 5: Minimal project (without format, note and deadline)
# -----------------------------------------------------------------------------
project:
  title: "Example 5 – Minimal project"
  area: "Example"

tasks:
  - title: "Only task"


# -----------------------------------------------------------------------------
# Example 6: Tasks WITHOUT a project (empty title)
# The tasks land in the Area, and the given list is respected.
# -----------------------------------------------------------------------------
project:
  title: ""
  area: "Example"

tasks:
  - title: "Loose task in the Inbox (stays there, as it has no project)"
    list: "inbox"

  - title: "Loose task in Next"
    list: "next"

  - title: "Loose task with a date"
    duedate: "d2"


# -----------------------------------------------------------------------------
# Example 7: Project without any tasks (tasks missing or empty)
# -----------------------------------------------------------------------------
project:
  title: "Example 7 – Project without tasks"
  area: "Example"

tasks: []


# -----------------------------------------------------------------------------
# Example 8: Alternative list notation (shown here only as a comment)
# This form replaces the blocks above. Do not use both notations in one file:
# as soon as a line "projects:" appears at the very left, only the list form
# is read.
#
# projects:
#   - project:
#       title: "Project A"
#       area: "Example"
#       format: "p"
#     tasks:
#       - title: "Task A1"
#   - project:
#       title: "Project B"
#       area: "Example"
#     tasks:
#       - title: "Task B1"
#         list: "next"
# -----------------------------------------------------------------------------
