mirror of
https://github.com/GothenburgBitFactory/timewarrior.git
synced 2025-06-26 10:54:28 +02:00
extensions: Make extensions conform with PEP8
This commit is contained in:
parent
97ab53afeb
commit
310f48973e
4 changed files with 114 additions and 111 deletions
18
ext/csv.py
18
ext/csv.py
|
@ -5,23 +5,23 @@ import json
|
|||
|
||||
# Skip the configuration settings.
|
||||
for line in sys.stdin:
|
||||
if line == '\n':
|
||||
break;
|
||||
if line == '\n':
|
||||
break;
|
||||
|
||||
# Extract the JSON.
|
||||
doc = ''
|
||||
for line in sys.stdin:
|
||||
doc += line
|
||||
doc += line
|
||||
|
||||
total_active_time = 0
|
||||
|
||||
j = json.loads(doc)
|
||||
for object in j:
|
||||
line = '"%s",' % object['start']
|
||||
line +='"%s"' % (object['end'] if 'end' in object else '')
|
||||
line = '"%s",' % object['start']
|
||||
line +='"%s"' % (object['end'] if 'end' in object else '')
|
||||
|
||||
if 'tags' in object:
|
||||
for tag in object['tags']:
|
||||
line += ',"%s"' % tag
|
||||
if 'tags' in object:
|
||||
for tag in object['tags']:
|
||||
line += ',"%s"' % tag
|
||||
|
||||
print line
|
||||
print line
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue