Smos Logo Smos

A comprehensive self-management system

The Smos Query Tool

Documentation for the Smos Query tool, for querying the entries in your workflow

The smos editor comes with some handy companion tools. smos-query is one of those and it is a query tool for your .smos files.

File structure

The smos-query tool operates in the workflow directory. See the directories documentation for more information. The smos-query tool will only consider the contents of the workflow directory for its functionality.

Reference

Arguments

Usage: smos-query COMMAND [--config-file FILE_PATH] 
                  [--workflow-dir DIRECTORY_PATH] [--archive-dir DIRECTORY_PATH]
                  [--projects-dir DIRECTORY_PATH] 
                  [--archived-projects-dir DIRECTORY_PATHPATH]

  
  Smos Query Tool version: 0.10.0
  
  Oldest parseable Smos data format version: 0.0.0
  Newest parseable Smos data format version: 2.0.0

Available options:
  -h,--help                Show this help text
  --config-file FILE_PATH  The config file to use
  --workflow-dir DIRECTORY_PATH
                           The workflow directory to use
  --archive-dir DIRECTORY_PATH
                           The archive directory to use
  --projects-dir DIRECTORY_PATH
                           The projects directory to use
  --archived-projects-dir DIRECTORY_PATHPATH
                           The archived projects directory to use

Available commands:
  entry                    Select entries based on a given filter
  report                   Run prepared reports
  waiting                  Print the "WAITING" tasks
  next                     Print the next actions
  ongoing                  Print the ongoing entries
  clock                    Print the clock table
  agenda                   Print the agenda
  projects                 Print the projects overview
  stuck                    Print the stuck projects overview
  work                     Show the work overview
  free                     Find a free slot for a meeting
  log                      Print a log of what has happened.
  stats                    Print the stats actions and warn if a file does not
                           have one.
  tags                     Print all the tags that are in use

Environment

Available environment variables:

  SMOS_ARCHIVED_PROJECTS_DIR
                         Archived projects directory
  SMOS_ARCHIVE_DIR
                         Archive directory
  SMOS_CONFIG_FILE
                         Workflow directory
  SMOS_IGNORE_ARCHIVE
                         whether to ignore the archive
  SMOS_PROJECTS_DIR
                         Projects directory
  SMOS_WORKFLOW_DIR
                         Workflow directory

Configuration

# Configuration
workflow-dir: # optional
  # The workflow directory
  # or null
  <string>
archive-dir: # optional
  # The archive directory
  # or null
  <string>
projects-dir: # optional
  # The projects directory
  # or null
  <string>
archived-projects-dir: # optional
  # The archived projects directory
  # or null
  <string>
waiting: # optional
  # The waiting report configuration
  # or null
  # WaitingReportConfiguration
  threshold: # optional
    # waiting report threshold to consider waiting entries 'overdue'
    # or null
    def: Time
    # any of
    [ # Time string, for example:
      #  2s
      #  2 seconds
      #  3m
      #  3 minutes
      #  4h
      #  4 hours
      #  5d
      #  5 days
      #  6w
      #  6 weeks
      #  7mo
      #  7 months
      #  8y
      #  8 years
      <string>
    , # Interpreted as a number of days
      <number> # between 0 and 18446744073709551615
    ]
stuck: # optional
  # The stuck projects report configuration
  # or null
  # StuckReportConfiguration
  threshold: # optional
    # stuck report threshold to consider stuck projects 'overdue'
    # or null
    ref: Time
work: # optional
  # The work report configuration
  # or null
  # WorkReportConfiguration
  base-filter: # optional
    # The base work filter
    # or null
    def: EntryFilter
    # A filter is a string of one of the following forms:
    # 
    # tag:<tag>
    # state:<state>
    # file:<file>
    # level:<level>
    # header:<header>
    # property:<property-name>
    # property:<property-name>:<property-value>
    # property:<property-name>:time:<comparison>:<time>
    # parent:<filter>
    # ancestor:<filter>
    # child:<filter>
    # legacy:<filter>
    # not:<filter>
    # (<filter> and <filter>)
    # (<filter> or <filter>)
    <string>
  checks: # optional
    # Checks for the work report
    # or null
    - ref: EntryFilter
  contexts: # optional
    # Contexts for the work report
    # or null
    <key>: 
      ref: EntryFilter
  time-filter: # optional
    # The property to use to filter by time
    # or null
    def: PropertyName
    <string>
  columns: # optional
    # The columns in the report
    # or null
    - def: Projection
      # A column (projection) is a string of one of the following forms:
      # 
      # file
      # state
      # header
      # tag:<tag-name>
      # property:<property-name>
      # timestamp:<timestamp-name>
      # ancestor:<projection>
      <string>
  sorter: # optional
    # The sorter to use to sort the rows
    # or null
    def: Sorter
    # A sorter is a string of one of the following forms:
    # 
    # file
    # header
    # state
    # tag:<tag>
    # property:<property-name>
    # property-as-time:<property-name>
    # timestamp:<timestamp-name>
    # reverse:<sorter>
    # (<sorter> then <sorter>)
    <string>
free: # optional
  # The free report configuration
  # or null
  # Configuration
  earliest: # optional
    # the earliest time of day to consider free
    # TimeOfDay
    <any>
  latest: # optional
    # the latest time of day to consider free
    # TimeOfDay
    <any>
hide-archive: # optional
  # Whether or not to consider the archive, by default
  # or null
  <boolean>
report: # optional
  # Prepared report config
  # or null
  # PreparedReportConfiguration
  reports: # optional
    # Custom reports
    # or null
    <key>: 
      # PreparedReport
      description: # optional
        # A description of the report
        # or null
        <string>
      filter: # optional
        # The entry filter to get the results in the report
        # or null
        ref: EntryFilter
      columns: # optional
        # The columns of the report
        # or null
        - ref: Projection
      sorter: # optional
        # The sorter to sort the rows of the report by
        # or null
        ref: Sorter
      hide-archive: # optional
        # Whether to consider the archive for the report
        # or null
        <boolean>
colour: # optional
  # Colour configuration
  # or null
  # ColourConfiguration
  background: # optional
    # The table background colours
    # any of
    [ null
    , null
    , # A single background colour
      def: Colour
      # any of
      [ <string>
      , # Set this to a number between 0 and 255 that represents the colour that you want from the 8-bit colour schema.
        # See this overview on wikipedia for more information:
        # https://en.wikipedia.org/wiki/ANSI_escape_code#8-bit
        <number> # between 0 and 255
      , # Colour24Bit
        red: # required
          # The red component, [0..255]
          <number> # between 0 and 255
        green: # required
          # The green component, [0..255]
          <number> # between 0 and 255
        blue: # required
          # The blue component, [0..255]
          <number> # between 0 and 255
      ]
    , # Bicolour
      even: # optional
        # background for even-numbered table-rows (0-indexed)
        # or null
        ref: Colour
      odd: # optional
        # background for odd-numbered table-rows
        # or null
        ref: Colour
    ]