mirror of
https://github.com/GothenburgBitFactory/timewarrior.git
synced 2025-07-07 20:06:39 +02:00
CLI: Added A2:getToken
This commit is contained in:
parent
d596936667
commit
021297edd5
2 changed files with 11 additions and 0 deletions
10
src/CLI.cpp
10
src/CLI.cpp
|
@ -80,6 +80,16 @@ const std::string A2::attribute (const std::string& name) const
|
|||
return "";
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
const std::string A2::getToken () const
|
||||
{
|
||||
auto i = _attributes.find ("canonical");
|
||||
if (i == _attributes.end ())
|
||||
i = _attributes.find ("raw");
|
||||
|
||||
return i->second;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
const std::string A2::dump () const
|
||||
{
|
||||
|
|
|
@ -42,6 +42,7 @@ public:
|
|||
void unTag (const std::string&);
|
||||
void attribute (const std::string&, const std::string&);
|
||||
const std::string attribute (const std::string&) const;
|
||||
const std::string getToken () const;
|
||||
const std::string dump () const;
|
||||
|
||||
public:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue