Smos Logo Smos

A comprehensive self-management system

Smos scheduler: Template format

The destination filename as well as the template of the smos file itself use a templating language.

A scheduler template is like a smos file. It uses the same forest format of template entries.

Example template:

- entry: Weekly actions
  forest:
  - Clean room
  - header: Weekly review
    state: READY
    properties:
      timewindow: 1h
    tags:
    - review
    timestamps:
      SCHEDULED: "[ %F | saturday ]"

Timestamp splices

Most of the contents of templates are just literal text, but timestamps can be spliced in as necesary.

Splicing works using the [ template ] or [ template | fuzzy timestamp ] syntax. A [ template ] splice is sugar for [ template | time at which the scheduler is run ] .

Some examples

  • On 2020-07-19, [ %F ] becomes 2020-07-19 .
  • On 2020-07-19, [ %W ] becomes 29 . ( %W represents the week number)
  • On 2020-07-19, [ %F | monday ] becomes 2020-07-20 .
  • On 2020-07-19, [ %W | monday ] becomes 30 . ( %W represents the week number)

For more information about the % syntax, see man date or the time format documentation .

Reference: Template format

def: Forest EntryTemplate
- def: Tree EntryTemplate
  # any of
  [ # Tree Entry
    entry: # required
      # root
      def: EntryTemplate
      # any of
      [ # A header-only entry template
        def: Header
        <string>
      , # EntryTemplate
        header: # optional
          # default: ''
          # or null
          ref: Header
        contents: # optional
          # or null
          def: Contents
          <string>
        timestamps: # optional
          # default: {}
          # or null
          <key>: 
            <string>
        properties: # optional
          # default: {}
          # or null
          <key>: 
            def: PropertyValue
            <string>
        state: # optional
          # or null
          def: TodoState
          <string>
        tags: # optional
          # default: []
          # or null
          - def: Tag
            <string>
      ]
    forest: # optional
      # default: []
      # subforest
      ref: Forest EntryTemplate
  , # Leaf entry
    ref: EntryTemplate
  ]