mirror of
https://github.com/GothenburgBitFactory/task-timewarrior-hook.git
synced 2025-06-26 10:54:27 +02:00
Ext: Taskwarrior project handling
- Taskwarrior projects are now used as-is as tags, and also split on the '.' to represent project hierarchy as separate tags. - Thanks to Josh Proehl.
This commit is contained in:
parent
99d2d12f37
commit
2de2ecd440
1 changed files with 4 additions and 1 deletions
|
@ -45,7 +45,10 @@ print(json.dumps(new))
|
|||
tags = [new['description']]
|
||||
|
||||
if 'project' in new:
|
||||
tags.append(new['project'])
|
||||
project = new['project']
|
||||
tags.append(project)
|
||||
if '.' in project:
|
||||
tags.extend([tag for tag in project.split('.')])
|
||||
|
||||
if 'tags' in new:
|
||||
tags.extend(new['tags'])
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue