Removed --sort.

This commit is contained in:
tastytea 2019-05-16 12:55:54 +02:00
parent e65fb77722
commit 0cf8c65c40
Signed by: tastytea
GPG Key ID: CFC39497F1B26E07
4 changed files with 0 additions and 35 deletions

View File

@ -40,9 +40,6 @@ are date and time representations according to ISO 8601
(YYYY-MM-DDThh:mm:ss). Time zones are ignored.
Example: `--span 2019-01-01,2019-02-10T12:30`.
*-S* _attribute_, *--sort* _attribute_::
Sort by _time_, _tag_ or _both_ (default) when exporting to _asciidoc_.
*-h*, *--help*::
Show help message.

View File

@ -37,7 +37,6 @@ const options parse_options(const int argc, const char *argv[])
string format;
string file;
string span;
string sort;
options opts;
try
@ -52,8 +51,6 @@ const options parse_options(const int argc, const char *argv[])
op.add<popl::Value<string>>
("s", "span", "Only export entries between YYYY-MM-DD,YYYY-MM-DD.",
"", &span);
op.add<popl::Value<string>>
("S", "sort", "Sort by time, tag or both (default).", "", &sort);
auto option_help = op.add<popl::Switch>
("h", "help", "Show this help message.");
auto option_version = op.add<popl::Switch>
@ -132,27 +129,6 @@ const options parse_options(const int argc, const char *argv[])
}
}
if (!sort.empty())
{
if (sort == "time")
{
opts.sort = sort_attribute::time;
}
else if (sort == "tag")
{
opts.sort = sort_attribute::tag;
}
else if (sort == "both")
{
opts.sort = sort_attribute::both;
}
else
{
cerr << "Error: --sort " << sort << " not understood.\n";
return options(1);
}
}
if (op.non_option_args().size() > 0)
{
opts.uri = op.non_option_args().front();

View File

@ -38,7 +38,6 @@ typedef struct options
export_format format = export_format::undefined;
string file;
array<time_point, 2> span = { time_point(), system_clock::now() };
sort_attribute sort = sort_attribute::both;
string uri;
uint8_t status_code = 0;

View File

@ -24,11 +24,4 @@ enum class export_format
asciidoc
};
enum class sort_attribute
{
both,
time,
tag
};
#endif // REMWHAREAD_TYPES_HPP