项目作者: JonathanGzzBen

项目描述 :
A Unix Command-Line Tool to jot notes.
高级语言: Python
项目地址: git://github.com/JonathanGzzBen/JotNote.git
创建时间: 2020-06-02T01:19:43Z
项目社区:https://github.com/JonathanGzzBen/JotNote

开源协议:MIT License

下载


JotNote

A Unix Command-Line Tool to jot notes.

Table of Contents

Installation

From release

Download latest release, head to downloads directory and install using pip.

  1. pip install JotNote-1.0.1.tar.gz

From repository

  1. # Update setuptools
  2. $ pip install --upgrade setuptools
  3. # Clone repository
  4. $ git clone https://github.com/JonathanGzzBen/JotNote.git
  5. # Install package
  6. $ (cd JotNote && pip install .)
  7. # Write your notes
  8. $ jotnote
  9. [jotnote show]
  10. No notes found.

Uninstall

  1. # Uninstall package
  2. $ pip uninstall jotnote
  3. # Remove data and configurations
  4. $ rm ~/.jotnote -r

Commands

Add

This will create a note with given title. You don’t need to enclose it with quotes.

$ jotnote add This is the title

  1. {
  2. "id": 1,
  3. "title": "This is the title"
  4. }

You can immediately define title and content, separating it with a .

$ jotnote add This is the title. And this is the content

  1. {
  2. "id": 1,
  3. "title": "This is the title.",
  4. "content": "And this is the content"
  5. }

You can also execute it without any parameter to write your note in your default text editor.

$ jotnote add

If you save and quit in your text editor after writing this:

  1. This is the title.
  2. And this the content

You will get this:

  1. {
  2. "id": 1,
  3. "title": "This is the title.",
  4. "content": "And this is the content"
  5. }

Show

Displays your notes, you can change the maximum number of notes displayed and the sort method using the configure command.

  1. $ jotnote show
  2. +---+------------------------------------+
  3. | | Title |
  4. +---+------------------------------------+
  5. | 2 | Second note |
  6. | 1 | This is the title of my first note |
  7. +---+------------------------------------+

This is the default command, you can also use:

  1. $ jotnote
  2. [jotnote show]
  3. +---+------------------------------------+
  4. | | Title |
  5. +---+------------------------------------+
  6. | 2 | Second note |
  7. | 1 | This is the title of my first note |
  8. +---+------------------------------------+

You can directly print the contents of a note by passing the Id to the show command.

  1. $ jotnote show 1
  2. This is the title of my first note.
  3. And this is the content.

Edit

Opens note with corresponding ID in your default text editor.

$ jotnote edit 1

Delete

Delete note with corresponding ID.

  1. $ jotnote delete 1
  2. Note 1 deleted

Configure

Check or modify your configurations.

  1. $ jotnote configure --help
  2. Usage: jotnote configure [OPTIONS]
  3. Options:
  4. -l, --limit INTEGER Limit number of notes displayed.
  5. -o, --orderby [modification|creation]
  6. --help Show this message and exit.

If you pass no options, your current configurations will be printed.

  1. $ jotnote configure
  2. Configuration Value
  3. --------------- --------
  4. limit 5
  5. orderby creation