Changed -S, --span to -T, --time-span,
continuous-integration/drone/push Build is passing Details

and added -S as short option for --search-all.
This commit is contained in:
tastytea 2019-05-22 09:51:58 +02:00
parent 8e75e7bfbf
commit 8b84429c94
Signed by: tastytea
GPG Key ID: CFC39497F1B26E07
2 changed files with 11 additions and 11 deletions

View File

@ -13,9 +13,9 @@ remwharead - Saves URIs of things you want to remember in a database
== SYNOPSIS
*remwharead* [*-t* _tags_] _URI_
*remwharead* [*-t* _tags_] [*-N*] _URI_
*remwharead* *-e* _format_ [*-f* _file_] [*-S* _start_,_end_] [[*-s*|*--search-all*] _expression_]
*remwharead* *-e* _format_ [*-f* _file_] [*-T* _start_,_end_] [[*-s*|*-S*] _expression_]
== DESCRIPTION
@ -40,7 +40,7 @@ Export to _format_. Possible values are _csv_ and _asciidoc_. See _FORMATS_.
*-f* _file_, *--file* _file_::
Save output to _file_. Default is stdout.
*-S* _start_,_end_, *--span* _start_,_end_::
*-T* _start_,_end_, *--time-span* _start_,_end_::
Only export entries between and including _start_ and _end_. _start_ and _end_
are date and time representations according to ISO 8601
(YYYY-MM-DDThh:mm:ss). Time zones are ignored.
@ -49,7 +49,7 @@ Example: `--span 2019-01-01,2019-02-10T12:30`.
*-s* _expression_, *--search-tags* _expression_::
Search in tags. Format: _tag1 AND tag2 OR tag3_. See _SEARCH EXPRESSIONS_.
*--search-all* _expression_::
*-S* _expression_, *--search-all* _expression_::
Search in tags, title, description and full text.
*-N*, *--no-archive*::
@ -70,7 +70,7 @@ Print version, copyright and license.
.Export all things between and including 2019-04-01 and 2019-05-31 to a file.
====
`remwharead -e asciidoc -f out.adoc -S 2019-04-01,2019-05-31`
`remwharead -e asciidoc -f out.adoc -T 2019-04-01,2019-05-31`
====
.Export all things to an HTML file.

View File

@ -48,14 +48,14 @@ const options parse_options(const int argc, const char *argv[])
op.add<popl::Value<string>>
("f", "file", "Save output to file.", "", &opts.file);
op.add<popl::Value<string>>
("S", "span", "Only export entries between YYYY-MM-DD,YYYY-MM-DD.",
"", &span);
("T", "time-span",
"Only export entries between YYYY-MM-DD,YYYY-MM-DD.", "", &span);
op.add<popl::Value<string>>
("s", "search-tags",
"Search in tags. Format: tag1 AND tag2 OR tag3.",
"", &opts.search_tags);
op.add<popl::Value<string>>
("", "search-all",
("S", "search-all",
"Search in tags, title, description and full text.",
"", &opts.search_all);
auto option_noarchive = op.add<popl::Switch>
@ -68,10 +68,10 @@ const options parse_options(const int argc, const char *argv[])
if (option_help->is_set())
{
cout << "Usage: " << argv[0] << " [-t tags] URI\n"
cout << "Usage: " << argv[0] << " [-t tags] [-N] URI\n"
<< " " << argv[0]
<< " -e format [-f file] [-S start,end] "
<< "[[-s|--search-all] expression]\n";
<< " -e format [-f file] [-T start,end] "
<< "[[-s|-S] expression]\n";
cout << op;
return options(0);
}