diff --git a/src/Task.cpp b/src/Task.cpp index 9fe3473c5..56814941c 100644 --- a/src/Task.cpp +++ b/src/Task.cpp @@ -537,97 +537,6 @@ std::string Task::composeF4 () const return ff4; } -//////////////////////////////////////////////////////////////////////////////// -std::string Task::composeCSV () const -{ - std::stringstream out; - - // Deliberately no 'id'. - out << "'" << get ("uuid") << "',"; - out << "'" << get ("status") << "',"; - - // Tags - std::vector tags; - getTags (tags); - std::string allTags; - join (allTags, " ", tags); - out << "'" << allTags << "',"; - - out << get ("entry") << ","; - out << get ("start") << ","; - - if (has ("due")) - out << get ("due") << ","; - else - out << ","; - - if (has ("recur")) - out << get ("recur") << ","; - else - out << ","; - - out << get ("end") << ","; - - if (has ("project")) - out << "'" << get ("project") << "',"; - else - out << ","; - - if (has ("priority")) - out << "'" << get ("priority") << "',"; - else - out << ","; - - if (has ("fg")) - out << "'" << get ("fg") << "',"; - else - out << ","; - - if (has ("bg")) - out << "'" << get ("bg") << "',"; - else - out << ","; - - // Convert single quotes to double quotes, because single quotes are used to - // delimit the values that need it. - std::string clean = get ("description"); - std::replace (clean.begin (), clean.end (), '\'', '"'); - out << "'" << clean << "'\n"; - - return out.str (); -} - -//////////////////////////////////////////////////////////////////////////////// -std::string Task::composeYAML () const -{ - std::stringstream out; - - // Task header. - out << " task:\n"; - - // Get all the supported attribute names. - std::vector names = context.getColumns (); - std::sort (names.begin (), names.end ()); - - // Only include non-trivial attributes. - std::string value; - std::vector ::iterator name; - for (name = names.begin (); name != names.end (); ++name) - if ((value = get (*name)) != "") - out << " " << *name << ": " << value << "\n"; - - // Now the annotations, which are not listed in names. - std::map annotations; - getAnnotations (annotations); - std::map ::iterator a; - for (a = annotations.begin (); a != annotations.end (); ++a) - out << " annotation:\n" - << " entry: " << a->first.substr (11) << "\n" - << " description: " << a->second << "\n"; - - return out.str (); -} - //////////////////////////////////////////////////////////////////////////////// std::string Task::composeJSON (bool include_id /*= false*/) const { diff --git a/src/Task.h b/src/Task.h index 8a5a56352..1029fbe03 100644 --- a/src/Task.h +++ b/src/Task.h @@ -45,8 +45,6 @@ public: void parse (const std::string&); std::string composeF4 () const; - std::string composeCSV () const; - std::string composeYAML () const; std::string composeJSON (bool include_id = false) const; // Status values.