mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-07-07 20:06:36 +02:00
CmdImport: Added support for free-form JSON import
This commit is contained in:
parent
5995320164
commit
c2c26b338b
4 changed files with 108 additions and 45 deletions
|
@ -29,16 +29,8 @@
|
|||
|
||||
#include <string>
|
||||
#include <Command.h>
|
||||
#include <JSON.h>
|
||||
|
||||
class CmdImport : public Command
|
||||
{
|
||||
public:
|
||||
CmdImport ();
|
||||
int execute (std::string&);
|
||||
int import (std::vector <std::string>& lines);
|
||||
};
|
||||
|
||||
/*
|
||||
class CmdImport : public Command
|
||||
{
|
||||
public:
|
||||
|
@ -46,31 +38,10 @@ public:
|
|||
int execute (std::string&);
|
||||
|
||||
private:
|
||||
enum fileType
|
||||
{
|
||||
type_not_a_clue,
|
||||
type_task_1_4_3,
|
||||
type_task_1_5_0,
|
||||
type_task_1_6_0,
|
||||
type_task_cmd_line,
|
||||
type_todo_sh_2_0,
|
||||
type_csv,
|
||||
type_yaml,
|
||||
type_text
|
||||
};
|
||||
|
||||
fileType determineFileType (const std::vector <std::string>&);
|
||||
void decorateTask (Task&);
|
||||
std::string task_1_4_3 (const std::vector <std::string>&);
|
||||
std::string task_1_5_0 (const std::vector <std::string>&);
|
||||
std::string task_1_6_0 (const std::vector <std::string>&);
|
||||
std::string taskCmdLine (const std::vector <std::string>&);
|
||||
std::string todoSh_2_0 (const std::vector <std::string>&);
|
||||
std::string text (const std::vector <std::string>&);
|
||||
std::string CSV (const std::vector <std::string>&);
|
||||
std::string YAML (const std::vector <std::string>&);
|
||||
int import (std::vector <std::string>&);
|
||||
int import (const std::string&);
|
||||
void importSingleTask (json::object*);
|
||||
};
|
||||
*/
|
||||
|
||||
#endif
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue