add designing category

This commit is contained in:
Alan Hamlett 2018-04-07 11:03:36 -07:00
parent 1fe41b6677
commit e585fbb4a8
4 changed files with 10 additions and 8 deletions

View file

@ -14,7 +14,7 @@ Common interface for the WakaTime api.
optional arguments: optional arguments:
-h, --help show this help message and exit -h, --help show this help message and exit
--entity FILE Absolute path to file for the heartbeat. Can also be a --entity FILE Absolute path to file for the heartbeat. Can also be a
url, domain, or app when --entity-type is not file. url, domain or app when --entity-type is not file.
--key KEY Your wakatime api key; uses api_key from --key KEY Your wakatime api key; uses api_key from
~/.wakatime.cfg by default. ~/.wakatime.cfg by default.
--write When set, tells api this heartbeat was triggered from --write When set, tells api this heartbeat was triggered from
@ -29,10 +29,10 @@ optional arguments:
Optional cursor position in the current file. Optional cursor position in the current file.
--entity-type ENTITY_TYPE --entity-type ENTITY_TYPE
Entity type for this heartbeat. Can be "file", Entity type for this heartbeat. Can be "file",
"domain", or "app". Defaults to "file". "domain" or "app". Defaults to "file".
--category CATEGORY Category of this heartbeat activity. Can be "coding", --category CATEGORY Category of this heartbeat activity. Can be "coding",
"building", "debugging", "running tests", "browsing", "building", "debugging", "running tests", "browsing",
or "code reviewing". Defaults to "coding". "code reviewing" or "designing". Defaults to "coding".
--proxy PROXY Optional proxy configuration. Supports HTTPS and SOCKS --proxy PROXY Optional proxy configuration. Supports HTTPS and SOCKS
proxies. For example: https://user:pass@host:port or proxies. For example: https://user:pass@host:port or
socks5://user:pass@host:port or domain\user:pass socks5://user:pass@host:port or domain\user:pass

View file

@ -509,6 +509,7 @@ class ArgumentsTestCase(TestCase):
'running tests', 'running tests',
'browsing', 'browsing',
'code reviewing', 'code reviewing',
'designing',
] ]
for category in valid_categories: for category in valid_categories:

View file

@ -57,7 +57,7 @@ def parse_arguments():
parser.add_argument('--entity', dest='entity', metavar='FILE', parser.add_argument('--entity', dest='entity', metavar='FILE',
action=FileAction, action=FileAction,
help='Absolute path to file for the heartbeat. Can ' + help='Absolute path to file for the heartbeat. Can ' +
'also be a url, domain, or app when ' + 'also be a url, domain or app when ' +
'--entity-type is not file.') '--entity-type is not file.')
parser.add_argument('--file', dest='file', action=FileAction, parser.add_argument('--file', dest='file', action=FileAction,
help=argparse.SUPPRESS) help=argparse.SUPPRESS)
@ -83,13 +83,13 @@ def parse_arguments():
parser.add_argument('--entity-type', dest='entity_type', parser.add_argument('--entity-type', dest='entity_type',
action=StoreWithoutQuotes, action=StoreWithoutQuotes,
help='Entity type for this heartbeat. Can be ' + help='Entity type for this heartbeat. Can be ' +
'"file", "domain", or "app". Defaults to "file".') '"file", "domain" or "app". Defaults to "file".')
parser.add_argument('--category', dest='category', parser.add_argument('--category', dest='category',
action=StoreWithoutQuotes, action=StoreWithoutQuotes,
help='Category of this heartbeat activity. Can be ' + help='Category of this heartbeat activity. Can be ' +
'"coding", "building", "debugging", ' + '"coding", "building", "debugging", ' +
'"running tests", "browsing", or ' + '"running tests", "browsing", "code reviewing" ' +
'"code reviewing". Defaults to "coding".') ' or "designing". Defaults to "coding".')
parser.add_argument('--proxy', dest='proxy', action=StoreWithoutQuotes, parser.add_argument('--proxy', dest='proxy', action=StoreWithoutQuotes,
help='Optional proxy configuration. Supports HTTPS '+ help='Optional proxy configuration. Supports HTTPS '+
'and SOCKS proxies. For example: '+ 'and SOCKS proxies. For example: '+

View file

@ -66,7 +66,8 @@ class Heartbeat(object):
'debugging', 'debugging',
'running tests', 'running tests',
'browsing', 'browsing',
'code reviewing' 'code reviewing',
'designing',
] ]
if self.category not in allowed_categories: if self.category not in allowed_categories:
self.category = None self.category = None