Removed --sort.
This commit is contained in:
parent
e65fb77722
commit
0cf8c65c40
|
@ -40,9 +40,6 @@ are date and time representations according to ISO 8601
|
||||||
(YYYY-MM-DDThh:mm:ss). Time zones are ignored.
|
(YYYY-MM-DDThh:mm:ss). Time zones are ignored.
|
||||||
Example: `--span 2019-01-01,2019-02-10T12:30`.
|
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*::
|
*-h*, *--help*::
|
||||||
Show help message.
|
Show help message.
|
||||||
|
|
||||||
|
|
|
@ -37,7 +37,6 @@ const options parse_options(const int argc, const char *argv[])
|
||||||
string format;
|
string format;
|
||||||
string file;
|
string file;
|
||||||
string span;
|
string span;
|
||||||
string sort;
|
|
||||||
options opts;
|
options opts;
|
||||||
|
|
||||||
try
|
try
|
||||||
|
@ -52,8 +51,6 @@ const options parse_options(const int argc, const char *argv[])
|
||||||
op.add<popl::Value<string>>
|
op.add<popl::Value<string>>
|
||||||
("s", "span", "Only export entries between YYYY-MM-DD,YYYY-MM-DD.",
|
("s", "span", "Only export entries between YYYY-MM-DD,YYYY-MM-DD.",
|
||||||
"", &span);
|
"", &span);
|
||||||
op.add<popl::Value<string>>
|
|
||||||
("S", "sort", "Sort by time, tag or both (default).", "", &sort);
|
|
||||||
auto option_help = op.add<popl::Switch>
|
auto option_help = op.add<popl::Switch>
|
||||||
("h", "help", "Show this help message.");
|
("h", "help", "Show this help message.");
|
||||||
auto option_version = op.add<popl::Switch>
|
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)
|
if (op.non_option_args().size() > 0)
|
||||||
{
|
{
|
||||||
opts.uri = op.non_option_args().front();
|
opts.uri = op.non_option_args().front();
|
||||||
|
|
|
@ -38,7 +38,6 @@ typedef struct options
|
||||||
export_format format = export_format::undefined;
|
export_format format = export_format::undefined;
|
||||||
string file;
|
string file;
|
||||||
array<time_point, 2> span = { time_point(), system_clock::now() };
|
array<time_point, 2> span = { time_point(), system_clock::now() };
|
||||||
sort_attribute sort = sort_attribute::both;
|
|
||||||
string uri;
|
string uri;
|
||||||
uint8_t status_code = 0;
|
uint8_t status_code = 0;
|
||||||
|
|
||||||
|
|
|
@ -24,11 +24,4 @@ enum class export_format
|
||||||
asciidoc
|
asciidoc
|
||||||
};
|
};
|
||||||
|
|
||||||
enum class sort_attribute
|
|
||||||
{
|
|
||||||
both,
|
|
||||||
time,
|
|
||||||
tag
|
|
||||||
};
|
|
||||||
|
|
||||||
#endif // REMWHAREAD_TYPES_HPP
|
#endif // REMWHAREAD_TYPES_HPP
|
||||||
|
|
Loading…
Reference in New Issue