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:
-h, --help show this help message and exit
--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
~/.wakatime.cfg by default.
--write When set, tells api this heartbeat was triggered from
@ -29,10 +29,10 @@ optional arguments:
Optional cursor position in the current file.
--entity-type ENTITY_TYPE
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",
"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
proxies. For example: https://user:pass@host:port or
socks5://user:pass@host:port or domain\user:pass

View file

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

View file

@ -57,7 +57,7 @@ def parse_arguments():
parser.add_argument('--entity', dest='entity', metavar='FILE',
action=FileAction,
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.')
parser.add_argument('--file', dest='file', action=FileAction,
help=argparse.SUPPRESS)
@ -83,13 +83,13 @@ def parse_arguments():
parser.add_argument('--entity-type', dest='entity_type',
action=StoreWithoutQuotes,
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',
action=StoreWithoutQuotes,
help='Category of this heartbeat activity. Can be ' +
'"coding", "building", "debugging", ' +
'"running tests", "browsing", or ' +
'"code reviewing". Defaults to "coding".')
'"running tests", "browsing", "code reviewing" ' +
' or "designing". Defaults to "coding".')
parser.add_argument('--proxy', dest='proxy', action=StoreWithoutQuotes,
help='Optional proxy configuration. Supports HTTPS '+
'and SOCKS proxies. For example: '+

View file

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