diff --git a/remwharead.1.adoc b/remwharead.1.adoc index a2ac62c..b01c675 100644 --- a/remwharead.1.adoc +++ b/remwharead.1.adoc @@ -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. diff --git a/src/parse_options.cpp b/src/parse_options.cpp index 86bb9f6..f860b0f 100644 --- a/src/parse_options.cpp +++ b/src/parse_options.cpp @@ -48,14 +48,14 @@ const options parse_options(const int argc, const char *argv[]) op.add> ("f", "file", "Save output to file.", "", &opts.file); op.add> - ("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> ("s", "search-tags", "Search in tags. Format: tag1 AND tag2 OR tag3.", "", &opts.search_tags); op.add> - ("", "search-all", + ("S", "search-all", "Search in tags, title, description and full text.", "", &opts.search_all); auto option_noarchive = op.add @@ -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); }