An open API service indexing awesome lists of open source software.

https://github.com/simre1/neonote

NeoNote is a terminal app to manage your notes
https://github.com/simre1/neonote

haskell journal notes notes-app

Last synced: about 2 months ago
JSON representation

NeoNote is a terminal app to manage your notes

Awesome Lists containing this project

README

          

# NeoNote

NeoNote is a terminal app to manage your notes. NeoNote stores your notes for you and provides filtering and searching options to find them easily.

![Animated showcase of NeoNote](recordings/showcase.gif)
Video is for version 0.1.0!

## Features

- Create/Edit/Delete Notes
- Parses tags directly from your note
- Filter notes based on tags, searches and creation/modification date

## Installation

### Binary files

You can find builds for linux x86 in the [releases section](https://github.com/Simre1/neonote/releases).

### Build from source

NeoNote is built with the Haskell build tool `cabal`. You'll need it along with a recent Haskell compiler.

To build from source, run:
```bash
cabal build all
````

Then, you will find the executable inside the `dist-newstyle` folder.

## Get Started

Take a look at the NeoNote help menu to get a quick overview of the commands and to explore the various options.
Each command can be shortened to one letter, eg. `nn c` instead of `nn create`.

### Create a note

```
nn create
```

An editor will open where you can write your note.
Tags will be automatically found when you use the `#` symbol within a note.
You can also start composing your note directly in the terminal by just typing the text:
```bash
nn c "Your first note with #neonote"
```

### Using the note picker

To review already existing notes, you will normally use the picker UI. It can be opened with the following command:

```
nn pick
```

Within this UI, you can incrementally search through your notes. It is possible to edit with `ENTER`, delete with `CTRL-X` and view with `CTRL-Y`.

### Processing notes without the picker

```
nn edit
```

`edit` will directly open your editor with all matched notes.
Per default, it will only match `1` note with no filtering.
This means it will open the note which was last modified.

You can specify a filter, a search term and the amount of notes to match. The following command
will open at most 3 notes with the word `todo`.
```
nn edit --number 3 todo
```

Similarly to the `edit` command, there exist `delete` and `view` commands to delete and view multiple notes.

This will delete up to a hundred notes with the tag `#archived`.
```
nn delete --number 100 "#archived"
```

This will view up to 10 notes with the word linux
```
nn view --number 10 linux
```

### List notes

The `list` command gives you an overview of your notes by printing them in a table. It gives you information about their modification date and their tags.

```
nn list
```

Per default, the modification date, the tags and a preview of the content is shown.
You can change which attributes of the note are shown with `--attribute` (`-a` for short):

```
nn list --attribute id --attribute created
```

Now, `id` and `created` will be shown instead of the default `modified` and `tags`.
The content preview will always be shown regardless of given attributes.

Of course, you can combine this normal filtering and searching. The following
command will list up to 5 notes with the word haskell.
```
nn l --number 5 haskell
```

## Tags

You can add a tag to your notes simply by writing `#your-tag` somewhere within the note.
Currently, tags may consist of english characters as well as `-` (no numbers!).

## Filter notes

You can filter notes using the filter grammar.

```
nn view "programming"
```

This will show you notes which contain the word `programming`.
This can also be used with `delete`, `edit` and `list`.

### Boolean logic for filtering

- `*` matches every note
- `a & b` matches if both `a` and `b` match
- `a | b` matches if either `a` or `b` matches
- `~ a` matches if `a` does not match
- `#my-tag` matches if note contains #my-tag
- `foo` matches if note contains the string foo
- Use brackets (`(a)`) to group expressions
- Use quotes (`"%many +words$"`) to escape search strings and search for special characters

```
nn view "*" # matches everything
nn view "#programming & ~html" # matches notes with the tag programming without the word html
nn view "#programming | #coding" # matches notes with either the tag programming or the tag coding
nn view "(#programming | #coding) & ~html" # combine expressions with brackets
```

### Date filters

In addition to filtering for tags, you can also filter based on the creation and modification date of a note.

- `>`, `<`, `=` operators for dates
- `created` and `modified` literal to access the date of a note
- `YYYY-MM-DD` for day literals
- `HH-MM-SS` for time literals

```
nn view "created = 2023-07-01" # matches all notes created on 2023-07-01
nn view "modified = 2023-07-01" # matches all notes modified on 2023-07-01
nn view "modified > 2023-07-01" # matches all notes modified after 2023-07-01
nn view "modified < 2023-07-01" # matches all notes modified before 2023-07-01
nn view "modified > 2023-05-30 & modified < 2023-07-01" # matches all notes modified in June 2023
nn view "modified > 2023-07-01 & #programming" # matches all notes modified after 2023-07-01 with the tag programming
nn view "modified > 10:30:00" # matches all notes modified after 10:30:00
```

In the future, less restrictive date specifications might be possible.
For example, you could apply the filter `modified = July` or `created = around 10am`.

## Configuration

You have two options to specify configurations:

- `config.ini` within the xdg config directory which will be created on the first neonote execution
- environment variables (`NEONOTE_PATH`, `NEONOTE_EDITOR`, `NEONOTE_EXTENSION`)

### Default note location

Per default, neonote stores notes as `md` (Markdown) text within a `notes.db` database in a folder `neonote` in the XDG data directory (`.local/share/neonote` on Linux).

### Possible Editors

You can choose any editor you want by specifying it in the configuration.
However, you need to make sure that the editor blocks until the editing process is finished and that it can open multiple files simultanously.

If your editor command has a `%`, it will be replaced with the files to edit separated by a ` `.
If it does not have a `%`, the files are appended at the end of your command.

Here are some example editor configurations:
- Vim: `vim` or `vim %`
- Helix: `helix` or `helix %`
- Nano: `nano` or `nano %`
- VSCode: `code --wait` or `code --wait %`
- VSCodium: `codium --wait` or `code --wait %`