Long:"Show the saved bookmarks by its DB index. "+
"Accepts space-separated list of indices (e.g. 5 6 23 4 110 45), hyphenated range (e.g. 100-200) or both (e.g. 1-3 7 9). "+
"If no arguments, all records with actual index from DB are shown.",
Aliases:[]string{"list","ls"},
Run:hdl.printBookmarks,
}
searchCmd:=&cobra.Command{
Use:"search keyword",
Short:"Search bookmarks by submitted keyword",
Long:"Search bookmarks by looking for matching keyword in bookmark's title and content. "+
"If no keyword submitted, print all saved bookmarks. "+
"Search results will be different depending on DBMS that used by shiori :\n"+
"- sqlite3, search works using fts4 method: https://www.sqlite.org/fts3.html.\n"+
"- mysql or mariadb, search works using natural language mode: https://dev.mysql.com/doc/refman/5.5/en/fulltext-natural-language.html.",
Args:cobra.MaximumNArgs(1),
Run:hdl.searchBookmarks,
}
updateCmd:=&cobra.Command{
Use:"update [indices]",
Short:"Update the saved bookmarks",
Long:"Update fields of an existing bookmark. "+
"Accepts space-separated list of indices (e.g. 5 6 23 4 110 45), hyphenated range (e.g. 100-200) or both (e.g. 1-3 7 9). "+
"If no arguments, ALL bookmarks will be updated. Update works differently depending on the flags:\n"+
"- If indices are passed without any flags (--url, --title, --tag and --excerpt), read the URLs from DB and update titles from web.\n"+
"- If --url is passed (and --title is omitted), update the title from web using the URL. While using this flag, update only accept EXACTLY one index.\n"+
"While updating bookmark's tags, you can use - to remove tag (e.g. -nature to remove nature tag from this bookmark).",
Run:hdl.updateBookmarks,
}
deleteCmd:=&cobra.Command{
Use:"delete [indices]",
Short:"Delete the saved bookmarks",
Long:"Delete bookmarks. "+
"When a record is deleted, the last record is moved to the removed index. "+
"Accepts space-separated list of indices (e.g. 5 6 23 4 110 45), hyphenated range (e.g. 100-200) or both (e.g. 1-3 7 9). "+