NextCloud Notes Command Line Interface
git clone git://git.danielmoch.com/nncli.git
Log | Files | Refs | LICENSE

commit 5d6a475ac960644046a235ec63bd6f29b905a5a2
parent 75eec1cc57c88049890ef38efb082231b9c9be40
Author: Eric Davis <edavis@insanum.com>
Date:   Thu, 17 Jul 2014 01:12:02 -0700

update readme with a section describing search strings

MREADME.md | 15++++++++++++++-
Mnotes_db.py | 2+-
Mview_titles.py | 2+-
3 files changed, 16 insertions(+), 3 deletions(-)

diff --git a/README.md b/README.md @@ -150,7 +150,20 @@ At this time, sncli does not yet support 256-color terminals and is limited to just 16-colors. Color names that can be specified in the `.snclirc` file are listed [here](http://urwid.org/manual/displayattributes.html#standard-foreground-colors). -#### Tricks +### Searching + +sncli supports two styles of search strings. First is a Google style search +string and second is a Regular Expression. + +A Google style search string is a group of tokens (separated by spaces) with +an implied *AND* between each token. This style search is case insensitive. For +example: + +``` +/tag:tag1 tag:tag2 word1 "word2 word3" tag:tag3 +``` + +### Tricks I personally store a lot of my notes in [Votl/VimOutliner](https://github.com/insanum/votl) format. Specific to Vim, I diff --git a/notes_db.py b/notes_db.py @@ -167,7 +167,7 @@ def filter_notes_gstyle(self, search_string=None): # group1: multiple words in quotes # group2: single words - # example result for: 't:tag1 t:tag2 word1 "word2 word3" tag:tag3' + # example result for: 'tag:tag1 tag:tag2 word1 "word2 word3" tag:tag3' # [ ('tag1', '', ''), # ('tag2', '', ''), # ('', '', 'word1'), diff --git a/view_titles.py b/view_titles.py @@ -32,7 +32,7 @@ def sort_note_list(self, sort_mode): def format_title(self, note): """ - Various formatting tags are supporting for dynamically building + Various formatting tags are supported for dynamically building the title string. Each of these formatting tags supports a width specifier (decimal) and a left justification (-) like that supported by printf.