mirror of
https://github.com/GothenburgBitFactory/timewarrior.git
synced 2025-07-07 20:06:39 +02:00
CmdExport: Converted to use all helper functions
This commit is contained in:
parent
20b47d9bd1
commit
d98d0ba97d
1 changed files with 1 additions and 18 deletions
|
@ -35,26 +35,9 @@ int CmdExport (
|
|||
Rules& rules,
|
||||
Database& database)
|
||||
{
|
||||
// Set up a filter based on the command line.
|
||||
auto filter = createFilterFromCLI (cli);
|
||||
|
||||
auto timeline = createTimelineFromData (rules, database, filter);
|
||||
|
||||
std::cout << "[\n";
|
||||
int counter = 0;
|
||||
for (auto& interval : timeline.tracked (rules))
|
||||
{
|
||||
if (counter)
|
||||
std::cout << ",\n";
|
||||
|
||||
std::cout << interval.json ();
|
||||
++counter;
|
||||
}
|
||||
|
||||
if (counter)
|
||||
std::cout << "\n";
|
||||
|
||||
std::cout << "]\n";
|
||||
std::cout << jsonFromIntervals (timeline.tracked (rules));
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue