Skip to content

task processing #4

@bjohas

Description

@bjohas
gtasks process --list ABC [--match "string"] [--pipeto "script.sh"] [--interactive yes|no, default: yes] [--action markdone|none, default: none]

If option --match is set, scan all task titles/descriptions in ABC for a specific string (such as '#email'). Otherwise use all tasks. Ask whether to perform action or not? If the users answers y, the item is piped to 'script.sh' (as json) and the task is marked as done.

For example:

gtasks process --list ABC --interactive no

outputs all tasks from the list ABC.

For example:

gtasks process --list ABC --match "string" --interactive no

outputs all tasks from the list ABC that match "string"

For example:

gtasks process --list ABC --match "#email" -pipeto "sendmail_script.sh" --interactive yes --action markdone

goes through the list ABC and present this information:

List: ABC
Task 1
Title: Buy milk. #email
Description: ....
Other metadata: ...

Then dialogue:

Perform action "sendmail_script.sh" (y)?
Advance to next item (n)?
There are subtasks - examine (e)?

The user inputs:

User> y

The content is piped to the script. This includes

  • y for yes,
  • n for no, and the option
  • e to examine subtasks if present. If 'e' is selected, subtasks are presented.

If a user says 'y' to the main task with subtasks, then the full task+subtasks is passed to the script, and the whole task+subtasks is archived. If the user examines 'e' subtasks, then only the subtasks is passed to the script, and only the subtask is archived.

Other options:

  • --action markdone means that when the task is processed with 'y', the task is marked as done
  • --action none means that the task is left alone.
  • --interactive yes means that tasks are presented one by one
  • --interactive no means that all matching tasks are presented

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions