mirror of
https://github.com/GothenburgBitFactory/timewarrior.git
synced 2025-06-26 10:54:28 +02:00
Tests: Modified 'export' function from Taskwarrior
This commit is contained in:
parent
2368e211ef
commit
c64e566a4b
1 changed files with 10 additions and 0 deletions
|
@ -81,6 +81,16 @@ class Timew(object):
|
||||||
with open(self.timewrc, "r") as f:
|
with open(self.timewrc, "r") as f:
|
||||||
return f.readlines()
|
return f.readlines()
|
||||||
|
|
||||||
|
def export(self, export_filter=None):
|
||||||
|
"""Run "task export", return JSON array of exported intervals."""
|
||||||
|
if export_filter is None:
|
||||||
|
export_filter = ""
|
||||||
|
|
||||||
|
code, out, err = self.runSuccess("{0} export"
|
||||||
|
"".format(export_filter))
|
||||||
|
|
||||||
|
return json.loads(out)
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def _split_string_args_if_string(args):
|
def _split_string_args_if_string(args):
|
||||||
"""Helper function to parse and split into arguments a single string
|
"""Helper function to parse and split into arguments a single string
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue