rhysd / notes-cli

Small markdown note taking CLI app playing nicely with your favorite editor and other CLI tools
MIT License
218 stars 26 forks source link

Enhancement: menu driven #3

Closed lanox closed 4 years ago

lanox commented 5 years ago

Hi,

This is so cool, its something I have been looking for a while/wanted to build it my self, I was wondering what are the chances to add capability to be interactive menu. e.g say you type in terminal ./notes

notes starts and displays as such

notes v1.0.0

Categories:

    aws(1)     persona(2)      databases(3)    hahe(4)
    test1(1)       find(6)     github(13)      blah(53)

8 categories | 83 notes |

==> !f 

SYNTAX: !f search_string [category]   <--- Interactive help

so what you can do now is have internal command such as !f (for find) so. if you type !f aws ecr

this will search all notes for words 'awc ecr' in all categories/sub-catergories and list them

e.g below


Search for: aws ecr

!1    Category: aws (cli)          ---> title of note that 'aws ecr' is find in
!2    Category: aws (cli)          ---> title of note that 'aws ecr' is find in
!3    Category: aws (cli)          ---> title of note that 'aws ecr' is find in

----------------- 1 records found for 'aws ecr'

==> !1 <-- to view the note

what would look like when note is displayed.

===============
- Title: some title goes here.
- Category: aws Tags: aws, ecr Record Number: 1 <-- random number given or just count from 1++ on creation of note
- Created: 2019-04-30T12:41:53+10:00 Last Updated: 
===============
this is something that i wanted to keep as a note.

==> !e 1

with !e (for edit) !1(for record number) this will open a vi and allow you to edit the note, save it and update Last Updated: field with date and time.

This is something that I was planning to do for a while just never got time to do it/my programming skills are bit rusty.

With above would allow user to have it open constantly and ability to search/edit lot easier then having to run commands such as notes ls -eor to edit notes ls |fzf|xargs -o vi

I hope you would consider implementing this and I am happy to try and contribute as much as I can.

lanox commented 5 years ago

@rhysd any chance you can look at this ?