Qnote를 사용하면 수만 개의 짧은 노트를 빠르게 만들고 검색할 수 있습니다.
#
이 붙은 접두사로 노트에 태그 만들기메모는 SQLite 데이터베이스에 저장됩니다(더 많은 데이터베이스에 대한 지원 예정). 검색은 몇 가지 추가 설정을 통해 Bleve(기본값) 또는 Elasticsearch에서 제공됩니다.
아직 설정하지 않았다면 Golang을 설정해야 합니다. 그냥 달리는 것보다
go get github.com/anmil/quicknote/cmd/qnote
그러면 라이브러리가 가져와서 Golang bin 디렉토리에 빌드됩니다.
책을 사용하면 업무 메모와 개인 메모 등 관련 메모를 서로 분리하여 보관할 수 있습니다. 달리 명시하지 않는 한, 모든 작업은 작업 문서에서만 수행됩니다. -n
플래그를 사용하여 작업 문서를 변경할 수 있습니다.
새 책을 만들려면
qnote new book <book name>
qnote ls books
책과 책에 있는 모든 메모를 삭제할 수 있습니다.
qnote rm book <book name>
책을 제거하고 메모는 유지하고 싶은 경우. 책을 다른 책으로 병합할 수 있습니다. 책 병합은 빈 책을 삭제하는 것보다 한 책에서 모든 메모를 가져와 다른 책으로 이동합니다.
qnote merge <book to delete> <book to move notes to>
책은 쿼리 결과 또는 노트 ID 목록의 두 가지 방법으로 분할될 수 있습니다.
쿼리로
qnote split query <book name> <query>
그러면 작업 문서에서 쿼리 검색(QueryStringQuery 사용)이 수행되고 쿼리 결과가 <book name>
으로 이동됩니다(없는 경우 새로 생성). 쿼리 문자열에 책을 지정할 필요는 없습니다. 이미 추가되어 있습니다.
ID별
qnote split ids <book name> <note ids...>
이는 동일하지만 Notes를 쿼리하는 대신 지정된 ID에 대한 Notes를 이동합니다.
편집기(기본 Vim, Env: EDITOR로 재정의)를 열고 새 노트를 생성하려면
qnote new note
노트는 첫 번째 줄을 제목으로, 나머지 줄을 본문으로 사용하는 파서를 통해 실행됩니다. #
문자로 시작하는 모든 단어는 메모의 태그로 사용됩니다.
다음 텍스트로 메모 만들기
This is a test #note
notes are #cool and #fun
one #note is never enough
This is a test #note
, 태그 note, cool, fun
및 a body of라는 제목의 노트를 생성합니다.
notes are #cool and #fun
one #note is never enough
URL에서 메모를 만들 수도 있습니다.
qnote new url <url>
qnote는 URL에 대해 GET 요청을 수행합니다. 웹페이지의 title
, meta[name=keywords]
및 meta[name=description]
태그에 대해 반환된 HTML을 구문 분석합니다. 제목과 URL은 제목으로 사용되며, 태그에는 키워드, 본문에는 설명이 사용됩니다. 이 정보가 채워진 편집기가 열리고 저장하기 전에 변경할 수 있습니다.
책의 모든 메모를 나열하려면
qnote ls notes
모든 책의 모든 메모를 나열하려면
qnote ls notes all
편집기를 열고 메모를 편집하려면
qnote edit note <note id>
메모를 삭제하려면
qnote rm note `<note id>`
qnote는 기본적으로 Bleve를 사용하지만 ElasticSearch도 지원하여 노트를 색인화하고 검색할 수 있습니다. ElasticSearch는 훨씬 더 강력하고 빠르기 때문에 약간의 추가 설정이 마음에 들지 않는 경우 권장됩니다. Elasticsearch를 설치하면 Linux에서는 $HOME/.config/quicknote
, Max OSX에서는 $HOME/Library/Application Support/quicknote
에 있는 qnote의 구성 파일을 편집할 수 있습니다.
Phrase Prefix를 사용하여 작업 도서에서 메모를 검색하려면
qnote search query
-q
플래그를 설정하여 더욱 강력한 쿼리 구문인 QueryStringQuery(Bleve ElasticSearch)를 사용할 수도 있습니다. -q
플래그를 사용할 때 쿼리는 모든 Books에서 실행됩니다.
검색할 수 있는 필드는 id
, created
, modifed
, title
, tags
(공통으로 구분된 목록), body
및 book
입니다. 따라서 책 "Work"에서 "projectx" 태그가 있는 노트를 검색하려는 경우입니다. 당신은 달릴 것입니다
블레베의 경우
qnote search -q "+book:Work +tag:projectx"
그리고 엘라스틱서치
qnote search -q "book:Work AND tags:projectx"
노트를 생성, 편집, 삭제하면 qnote가 색인 업데이트를 처리합니다. 그러나 인덱싱 공급자 변경, ElasticSearch 다시 설치, 다른 시스템에서 메모 데이터베이스 복사 등의 이유로 다시 인덱싱해야 하는 경우. 당신은 실행할 수 있습니다
qnote search reindex
그러면 qnote는 모든 노트의 색인을 다시 생성합니다.
노트를 백업하는 가장 간단한 방법은 qnote.db를 Linux의 데이터 디렉터리 $HOME/.config/quicknote
및 Max OSX의 $HOME/Library/Application Support/quicknote
복사하는 것입니다. qnote ls notes
명령에서 -f
플래그를 사용하여 목록을 csv 또는 json 형식으로 내보낼 수도 있습니다.
현재 csv 또는 json에서 메모를 복원할 수 있는 방법은 없습니다.
모든 명령과 플래그는 help
명령의 문서입니다. 간단히 qnote help <command>
실행하면 모든 명령에 대한 설명과 플래그를 볼 수 있습니다.
예시 1:
$ qnote help
Qnote allows you to quickly create and search tens of thousands of short notes.
Create Books to organize collections of notes.
Add tags to notes for more accurate searching.
Export your notes in text, csv, and json.
Notes are stored in an SQLite database (support for more databases is coming).
Searching is provided by Bleve by default, or Elasticsearch with some extra setup.
Usage:
qnote [command]
Available Commands:
delete Delete Note or Notebook
edit Edit Note or Notebook
get Get/List Notes, Notebook, Tags
merge Merge all notes from <book_name 1> into <book_name 2>
new Create new Note or Notebook
search Search notes
split Split Book
version Print the version of qnote
Flags:
-n, --notebook string Working Notebook (default "General")
Use "qnote [command] --help" for more information about a command.
예 2:
$ qnote help edit book
Edit the working Book's name. This requires re-index the Book
Usage:
qnote edit book <new book_name> [flags]
Global Flags:
예시 3:
$ qnote get -h
Get/List Notes, Notebook, Tags
Usage:
qnote get [command]
Aliases:
get, list, ls
Available Commands:
book List all books
note List all notes in the working Book, or all notes for the given [note id...]
tag lists all tags for the working Book
Flags:
-f, --display-format string Format to display notes in [ids, text, short, json, csv] (default "text")
-d, --display-order string The order to display Notebook, Notes, Tags [asc, desc] (default "asc")
-s, --sort-by string Sort notes by [id, created, modified, title] (default "modified")
Global Flags:
-n, --notebook string Working Notebook (default "General")
Use "qnote get [command] --help" for more information about a command.