From 5b38f11b1af6260fb45982a61ba79abfc4913f3b Mon Sep 17 00:00:00 2001 From: Arun Prakash Jana Date: Tue, 10 Nov 2015 14:01:35 +0530 Subject: [PATCH] Change -o option to -w. Signed-off-by: Arun Prakash Jana --- README.md | 10 +++++----- markit | 6 +++--- markit.1 | 6 +++--- 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/README.md b/README.md index 6afc701..779e545 100644 --- a/README.md +++ b/README.md @@ -14,7 +14,7 @@ If you find `markit` useful, please consider donating via PayPal. # Features - Add, update or remove a bookmark - Add tags to bookmarks -- Optionally fetch page title data from the web (default: disabled, use `-o`) +- Optionally fetch page title data from the web (default: disabled, use `-w`) - Use (partial) tags or keywords to search bookmarks - Unique URLs to avoid duplicates, show index if URL already exists - Open search results in browser @@ -73,11 +73,11 @@ Options -d N delete entry at index N -D delete ALL bookmarks -i N add entry at index N, works with -a, use to fill deleted index - -o fetch title info from web, works with -a or -u -p N show details of bookmark record at index N -P show all bookmarks along with real index from database -s keyword(s) search all bookmarks for a (partial) tag or each keyword -u N update entry at index N (from output of -p) + -w fetch title info from web, works with -a or -u -z show debug information you can either add or update or delete in one instance any other option shows help and exits markit @@ -91,11 +91,11 @@ Keys Added at index 15012014 The assigned automatic index 15012014 is unique, one greater than highest index already in use in database. 2. Add a bookmark, fetch page Title information from web: -
$ markit -a -o http://tuxdiary.com linux news, open source
+
$ markit -a -w http://tuxdiary.com linux news, open source
 Title: [TuxDiary | Linux, open source and a pinch of leisure.]
 Added at index 15012014
3. Update existing bookmark at index 15012014 with a new tag: -
$ markit -u 15012014 -o http://tuxdiary.com linux news, open source, magazine
+
$ markit -u 15012014 -w http://tuxdiary.com linux news, open source, magazine
 Title: [TuxDiary | Linux, open source and a pinch of leisure.]
 Updated
4. Delete bookmark at index 15012014: @@ -103,7 +103,7 @@ Updated
5. Delete all bookmarks:
$ markit -D
6. Insert a bookmark at deleted index 15012014 (fails if index or URL exists in database): -
$ markit -i 15012014 -a -o http://tuxdiary.com/about linux news, open source
+
$ markit -i 15012014 -a -w http://tuxdiary.com/about linux news, open source
 Title: [A journey with WordPress | TuxDiary]
 Added at index 15012014
This option is useful in filling deleted indices from database manually. diff --git a/markit b/markit index 0d8e3df..2883cd9 100755 --- a/markit +++ b/markit @@ -51,11 +51,11 @@ def usage(): print(" -d N delete entry at index N") print(" -D delete ALL bookmarks") print(" -i N add entry at index N, works with -a, use to fill deleted index") - print(" -o fetch title info from web, works with -a or -u") print(" -p N show details of bookmark record at index N") print(" -P show all bookmarks along with real index from database") print(" -s keyword(s) search all bookmarks for a (partial) tag or each keyword") print(" -u N update entry at index N (from output of -p)") + print(" -w fetch title info from web, works with -a or -u") print(" -z show debug information") print(" you can either add or update or delete in one instance") print(" any other option shows help and exits markit\n") @@ -375,7 +375,7 @@ if len(sys.argv) < 2: # Check cmdline options try: - optlist, keywords = getopt(sys.argv[1:], "d:i:p:u:aDoPsz") + optlist, keywords = getopt(sys.argv[1:], "d:i:p:u:aDPswz") if len(optlist) < 1: usage() @@ -412,7 +412,7 @@ try: addindex = opt[1] if int(addindex) <= 0: usage() - elif opt[0] == "-o": + elif opt[0] == "-w": online = True elif opt[0] == "-p": if not opt[1].isdigit(): diff --git a/markit.1 b/markit.1 index 4f27898..b1602d2 100644 --- a/markit.1 +++ b/markit.1 @@ -43,9 +43,6 @@ Add a new record at index .I N of the database. Works only if `-a` option is used. Use this option to fill blank indexes left by deleted bookmarks. .TP -.BI \-o -Fetch title data from the web. Works only with `-a` or `-u` options. -.TP .BI \-p " N" Show details of bookmark record stored at .I Nth @@ -62,6 +59,9 @@ Update bookmark at index .I N (as shown in `-p` output). .TP +.BI \-w +Fetch title data from the web. Works only with `-a` or `-u` options. +.TP .BI \-z Enable debugging. .TP