<commit_before># task-manager-slack
Slack Interface to the task-manager service
```
===============================================================
ez add
===============================================================
USAGE 
ez add -t <title> -d <description> -e <estimate> -f <finish by> -o <owner> -o <priority> -g "funny jenny:urgent" -b <batch file>

SUMMARY
Adds a task with these parameters in the queue
Interface to the https://github.com/ezhome/task-manager POST /tasks web service
Look at that documentation for the meaning of the various attributes
and associated business logic. This man page focus on differences / command line specific
functionality

DESCRIPTION

-t --title    
              # required 
              # sets the title attribue of the task
-d --description
              # optional
              # sets the description attribute of the task
              # if ommited - stays blank
-f --finish : 
              # optional 
              # sets the deadline task attribute 
              # accepts several free form descriptions of datetime 
              # both in terms of interval from now as well as absolute timestamps
              # e.g. "in 5 minutes" "by Monday" "by noon tomorrow" "by end of month" "in 24 hours" "ASAP"
              # the command line handler parses the above and sets the deadline attribute as an absolute timestamp
              # the exact human string provided is not stored anywhere
-e --estimate : 
              # optional
              # sets the estimate attribute
              # accepts several free form descriptions of an interval "5 minutes" "3 hours" "a day"
              # ans sets the estimate in terms of secondds
-o --owner :  
              # optional 
              # Sets the owner attribute
              # accepts @users in slack and  emails when submitted in the Unix command line
              # when using the email convention the @ezhome.com can be ommitted
              # when issued from slack the current user is the currently authenticated slack user
              # when issued from the command line the current user is the currently authenticated aws user??
-p --priority :  
              # optional 
              # Sets the priority attribute
              # accepts any number. It influences the queue order (the order the results show on `list`)
              # higher priority tasks appear first, within the same priority earlier tasks appear first)
              # as a result priority attribute value affect both `peek` and `grab` operation
              # if ommitted it is the same as setting the priority to 0
-g --tags     # optional
              # a single argument of space separated tags
              # sets the tags attribute
-b --batch    
              # optional
              # if provided accepts a csv-file-with-header (file-or-url for Unix, url-only for Slack) that allows a batch of add 
              # commands to be executed in sequence
              # the csv file has header that uses the long form  of the command parameters (e.g. "description" instead of just "d")
              # if a parameter value in a row is missing the ones provided explicitely at the command line would be used
              # if those are missing the command defaults are being used
              # (Unix only) if - is the filename then the command expects the file from the standard input 
              # command auto-guesses if the filename is a url or a filename
              # the command handler always adds a tag "addbatch=filename" that specifies the file used in the batch operation
              # the tag'sfilename used is the last part of the url if a url was used e.g 
              # if url is https://s3-us-west-2.amazonaws.com/task-manager/0853c054f7541ea6f977c932b81851a8.csv then the tag is
              #   addbatch=0853c054f7541ea6f977c932b81851a8.csv

OUTPUT
If this is a single add, for example
`/ez add -t 'email me some positive thoughts. I am feeling down!' -e '5 minutes'  -f 'in 10 minutes'`
the output is
----
Task 5678 Queued! 

  title : 'email me some positive thoughts. I am feeling down!'
  description  :  
  deadline  : '2015-11-20T17:31:33Z'
  estimate : 300
  owner :  '<EMAIL>'  

  _id : 5768
  _state : 'queued'
  _created_by : '<EMAIL>'    
  _created_on : '2015-11-20T17:41:33Z' 
  _last_modified_on : '2015-11-20T17:26:33Z'
  _tags : addbatch:xxxxx
----
If this is a slack issued command we also include a couple convenient links, ie.
instead  of `Task 5678 Queued!`
we display
`Task 5678 Queued!  <Show> <Delete> <List>`

If this is a batch-add the output is 

`NN Tasks queued successfully. MM Tasks failed to be queued`

//After this summary stmt we display the output of 
// list -t "addbatch:batchfile" 
----
Added => 
+--------+------------------------+
|Task ID | Title (first 30 chars) |
+--------+------------------------+
|   xxxxx| Some title             |
|   xxxxx| Some title             |
|   xxxxx| Some title             |
+--------+------------------------+

// and then after that the errors

Errors => 
+------------------------+------------+
| Title (first 30 chars) | Error      |
+------------------------+------------+
| some title             | some error |
| some title             | some error |
| some title             | some error |
+------------------------+------------+
----

===============================================================
ez update
===============================================================

USAGE 
ez update -i 4567 -t <title> -d <description> -e <estimate> -f <finish by> -o <owner> -p <property> -g "funny jenny:urgent" -b <batch file>

SUMMARY
Updates an existing queued task with these parameters.
Interface to the https://github.com/ezhome/task-manager PUT /tasks/xxx web service
Look at that documentation for the meaning of the various attributes
and associated business logic. This man page focus on differences / command line specific
functionality

DESCRIPTION

-i --id       
              # required except if -b option was given
              # corresponds to the _id task attribute
-d --description
-f --finish : 
-e --estimate : 
-p --property :
-o --owner :  
              # see ez add for the description of the fields above
-b --batch    # optional
              # the csv file definition is similar to that of `ez add` with the exception that 
              # the id column has to be present in the file and filled in for each row 
              # also note that we are appending a subsequent updatebatch=xxx for each subsequent batch update
              # to the tags

OUPUT
If this is a single update, for example
`/ez update -id 5678 -t 'email me some positive thoughts. I am feeling down!' -e '5 minutes'  -f 'in 10 minutes'`
the output is
----
Task 5678 Updated! 

  title : 'email me some positive thoughts. I am feeling down!'
  description  :  
  deadline  : '2015-11-20T17:31:33Z'
  estimate : 300
  priority : 0
  owner :  '<EMAIL>'  

  _id : 5768
  _state : 'queued'
  _created_by : '<EMAIL>'    
  _created_on : '2015-11-20T17:41:33Z' 
  _last_modified_on : '2015-11-20T17:26:33Z'
  _tags : addbatch:xxxxx
----
If this is a slack issued command we also include a couple convenient links, ie.
instead  of `Task 5678 Updated!`
we display
`Task 5678 Updated!  <Show> <Delete> <List>`
-----
On error it should display the resulting error message., e.g. 

-----
Cannot Update. Task is already (worked on|completed|deleted)
Task does not exist
-----



If batch 
-----
`NN Tasks updated successfully. MM Tasks failed to be updated`

//After this summary stmt we display the output of 
// list -t "updatebatch:batchfile" 
----
Updated => <commit_msg>Fixed list -t typo<commit_after># task-manager-slack
Slack Interface to the task-manager service
```
===============================================================
ez add
===============================================================
USAGE 
ez add -t <title> -d <description> -e <estimate> -f <finish by> -o <owner> -o <priority> -g "funny jenny:urgent" -b <batch file>

SUMMARY
Adds a task with these parameters in the queue
Interface to the https://github.com/ezhome/task-manager POST /tasks web service
Look at that documentation for the meaning of the various attributes
and associated business logic. This man page focus on differences / command line specific
functionality

DESCRIPTION

-t --title    
              # required 
              # sets the title attribue of the task
-d --description
              # optional
              # sets the description attribute of the task
              # if ommited - stays blank
-f --finish : 
              # optional 
              # sets the deadline task attribute 
              # accepts several free form descriptions of datetime 
              # both in terms of interval from now as well as absolute timestamps
              # e.g. "in 5 minutes" "by Monday" "by noon tomorrow" "by end of month" "in 24 hours" "ASAP"
              # the command line handler parses the above and sets the deadline attribute as an absolute timestamp
              # the exact human string provided is not stored anywhere
-e --estimate : 
              # optional
              # sets the estimate attribute
              # accepts several free form descriptions of an interval "5 minutes" "3 hours" "a day"
              # ans sets the estimate in terms of secondds
-o --owner :  
              # optional 
              # Sets the owner attribute
              # accepts @users in slack and  emails when submitted in the Unix command line
              # when using the email convention the @ezhome.com can be ommitted
              # when issued from slack the current user is the currently authenticated slack user
              # when issued from the command line the current user is the currently authenticated aws user??
-p --priority :  
              # optional 
              # Sets the priority attribute
              # accepts any number. It influences the queue order (the order the results show on `list`)
              # higher priority tasks appear first, within the same priority earlier tasks appear first)
              # as a result priority attribute value affect both `peek` and `grab` operation
              # if ommitted it is the same as setting the priority to 0
-g --tags     # optional
              # a single argument of space separated tags
              # sets the tags attribute
-b --batch    
              # optional
              # if provided accepts a csv-file-with-header (file-or-url for Unix, url-only for Slack) that allows a batch of add 
              # commands to be executed in sequence
              # the csv file has header that uses the long form  of the command parameters (e.g. "description" instead of just "d")
              # if a parameter value in a row is missing the ones provided explicitely at the command line would be used
              # if those are missing the command defaults are being used
              # (Unix only) if - is the filename then the command expects the file from the standard input 
              # command auto-guesses if the filename is a url or a filename
              # the command handler always adds a tag "addbatch=filename" that specifies the file used in the batch operation
              # the tag'sfilename used is the last part of the url if a url was used e.g 
              # if url is https://s3-us-west-2.amazonaws.com/task-manager/0853c054f7541ea6f977c932b81851a8.csv then the tag is
              #   addbatch=0853c054f7541ea6f977c932b81851a8.csv

OUTPUT
If this is a single add, for example
`/ez add -t 'email me some positive thoughts. I am feeling down!' -e '5 minutes'  -f 'in 10 minutes'`
the output is
----
Task 5678 Queued! 

  title : 'email me some positive thoughts. I am feeling down!'
  description  :  
  deadline  : '2015-11-20T17:31:33Z'
  estimate : 300
  owner :  '<EMAIL>'  

  _id : 5768
  _state : 'queued'
  _created_by : '<EMAIL>'    
  _created_on : '2015-11-20T17:41:33Z' 
  _last_modified_on : '2015-11-20T17:26:33Z'
  _tags : addbatch:xxxxx
----
If this is a slack issued command we also include a couple convenient links, ie.
instead  of `Task 5678 Queued!`
we display
`Task 5678 Queued!  <Show> <Delete> <List>`

If this is a batch-add the output is 

`NN Tasks queued successfully. MM Tasks failed to be queued`

//After this summary stmt we display the output of 
// list -g "addbatch:batchfile" 
----
Added => 
+--------+------------------------+
|Task ID | Title (first 30 chars) |
+--------+------------------------+
|   xxxxx| Some title             |
|   xxxxx| Some title             |
|   xxxxx| Some title             |
+--------+------------------------+

// and then after that the errors

Errors => 
+------------------------+------------+
| Title (first 30 chars) | Error      |
+------------------------+------------+
| some title             | some error |
| some title             | some error |
| some title             | some error |
+------------------------+------------+
----

===============================================================
ez update
===============================================================

USAGE 
ez update -i 4567 -t <title> -d <description> -e <estimate> -f <finish by> -o <owner> -p <property> -g "funny jenny:urgent" -b <batch file>

SUMMARY
Updates an existing queued task with these parameters.
Interface to the https://github.com/ezhome/task-manager PUT /tasks/xxx web service
Look at that documentation for the meaning of the various attributes
and associated business logic. This man page focus on differences / command line specific
functionality

DESCRIPTION

-i --id       
              # required except if -b option was given
              # corresponds to the _id task attribute
-d --description
-f --finish : 
-e --estimate : 
-p --property :
-o --owner :  
              # see ez add for the description of the fields above
-b --batch    # optional
              # the csv file definition is similar to that of `ez add` with the exception that 
              # the id column has to be present in the file and filled in for each row 
              # also note that we are appending a subsequent updatebatch=xxx for each subsequent batch update
              # to the tags

OUPUT
If this is a single update, for example
`/ez update -id 5678 -t 'email me some positive thoughts. I am feeling down!' -e '5 minutes'  -f 'in 10 minutes'`
the output is
----
Task 5678 Updated! 

  title : 'email me some positive thoughts. I am feeling down!'
  description  :  
  deadline  : '2015-11-20T17:31:33Z'
  estimate : 300
  priority : 0
  owner :  '<EMAIL>'  

  _id : 5768
  _state : 'queued'
  _created_by : '<EMAIL>'    
  _created_on : '2015-11-20T17:41:33Z' 
  _last_modified_on : '2015-11-20T17:26:33Z'
  _tags : addbatch:xxxxx
----
If this is a slack issued command we also include a couple convenient links, ie.
instead  of `Task 5678 Updated!`
we display
`Task 5678 Updated!  <Show> <Delete> <List>`
-----
On error it should display the resulting error message., e.g. 

-----
Cannot Update. Task is already (worked on|completed|deleted)
Task does not exist
-----



If batch 
-----
`NN Tasks updated successfully. MM Tasks failed to be updated`

//After this summary stmt we display the output of 
// list -g "updatebatch:batchfile" 
----
Updated => 
{'fraction_non_alphanumeric': 0.13123820677988157, 'fraction_numerical': 0.025636020560869284, 'mean_word_length': 2.190782644799668, 'pattern_counts': {'":': 0, '<': 51, '<?xml version=': 0, '>': 57, 'https://': 6, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2512040', 'n_tokens_mistral': 4349, 'n_tokens_neox': 3978, 'n_words': 1867}