stephencweiss / note-mgr

A CLI Note Manager
7 stars 2 forks source link

Note search #8

Open stephencweiss opened 4 years ago

stephencweiss commented 4 years ago

A search command could be leveraged to search the notes based on:

  1. title
  2. tags/categories
  3. full text

the return would be a list of files that match the criteria for the first iteration later implementations could highlight the line/part of the match (similar to how grep works)

stephencweiss commented 4 years ago

https://github.com/adelsz/inquirer-fuzzy-path looks like inquirer has a plugin that would work well for this.

even better, i could us it for the api like nom publish and then, instead of failing, it would ask which file you want to publish and using fuzzy search we could look it up. https://github.com/mokkabonna/inquirer-autocomplete-prompt autocomplete is another good option for how to combine the two.

stephencweiss commented 4 years ago

https://github.com/Alek-S/select-run this might also be helpful in thinking about how to select/search for a note.

stephencweiss commented 4 years ago

MVP is going to be a file fuzzy search based on the file path (i.e. slug)

stephencweiss commented 4 years ago

The search command should is really quite different from the fuzzy search that's part of the update command.

search would look through the body/frontmatter to see if anything matches. it's a grep.