Compare commits

..
Author SHA1 Message Date
github-actions[bot] 2e301b0b52 chore: weekly flake update 2026-08-17 03:56:10 +00:00
tomasr c7a9d45a65 Merge (#66) from tomasriveral/vhs-demo-gif
docs: add demo and miscellanious improvement in README.md
2026-08-16 15:11:37 +02:00
tomasr 62da4cfb2e docs: add demo and miscellanious improvement in README.md 2026-08-16 15:09:28 +02:00
tomasr d56e7d9e4f Merge (#65) from tomasriveral/fix-double-free
fix: double free and double openEditor
2026-08-16 08:38:07 +02:00
tomasr 449a9eaca6 fix: double free and double openEditor
I hadn't pulled latest change to main before my last branch-checkout.
There was some old code mixed with new one. Specially, the "note return"
button introduced in last version displaced the openEditor and some
free() inside a loop. That caused duplication of this part of the code.
I should be carefull next time to work on up-to-date branches.
2026-08-16 08:19:53 +02:00
6 changed files with 211 additions and 16 deletions

No files matched your search

+14 -11
View File
@@ -4,6 +4,8 @@ Note: This project fullfills all my usecases for now, so my main source for feat
[![Ask DeepWiki](https://deepwiki.com/badge.svg)](https://deepwiki.com/tomasriveral/notewrapper)
![demo.gif](demo.gif)
## Why?
I started journaling and note-taking with **[Obsidian](https://obsidian.md/)** but wanted to use only free software. I also tried **[Logseq](https://logseq.com/)** and **[Joplin](https://github.com/laurent22/joplin)**, but I preferred a terminal-based workflow.
@@ -229,17 +231,18 @@ Edit `~/.config/notewrapper/config.json`. If it does not exist, it will be creat
* `git.enable`: enable git version control for backups
* `git.name` and `git.email` are for the commits signature
Note:
* Directories must end with `/`.
* All directories used must exist.
* Elements of `directory` and `backup.directory` must match exactly.
* Directories set in `directory` but not in `backup.directory` won't be backed up.
* Directories set in `backup.directory` but not in `directory` will be ignored.
* `journalRegex` must match if the file name ends with `.md` and if it doesn't.
* It is recommended to keep `-q` or `--quiet` flag in `rsyncArgs` to avoid interference with `ncurses`.
* If `rsync` fails, you will see it inside `ncurses`.
* If you want the git backup but without rsync, you can leave `backup.directory` empty or map each directory to itself. When enabled, git will apply to all your vaults.
* Each vault gets its own git repository that will be created the first time you select the vault with the option enabled.
> [!NOTE]
> * The git backup implementation relies a lot on the IO speed of your drive. A low speed one (or a web mounted one) could create blanks between closing a document and the TUI opening.
> * Directories must end with `/`.
> * All directories used must exist.
> * Elements of `directory` and `backup.directory` must match exactly.
> * Directories set in `directory` but not in `backup.directory` won't be backed up.
> * Directories set in `backup.directory` but not in `directory` will be ignored.
> * `journalRegex` must match if the file name ends with `.md` and if it doesn't.
> * It is recommended to keep `-q` or `--quiet` flag in `rsyncArgs` to avoid interference with `ncurses`.
> * If `rsync` fails, you will see it inside `ncurses`.
> * If you want the git backup but without rsync, you can leave `backup.directory` empty or map each directory to itself. When enabled, git will apply to all your vaults.
> * Each vault gets its own git repository that will be created the first time you select the vault with the option enabled.
---
BIN
View File
Binary file not shown.

After

Width:  |  Height:  |  Size: 3.8 MiB

+192
View File
@@ -0,0 +1,192 @@
Require echo
Set Shell "zsh"
Set TypingSpeed 35ms
Set FontSize 18
Set Width 1800
Set Height 900
Output demo.gif
# ─────────────────────────────────────────────────────────────────────
# Introduction
# ─────────────────────────────────────────────────────────────────────
Type "echo 'Welcome to NoteWrapper!'"
Sleep 800ms
Enter
Sleep 1500ms
Type "notewrapper --help"
Sleep 500ms
Enter
Sleep 4000ms
# ─────────────────────────────────────────────────────────────────────
# Create / open a unified journal
# ─────────────────────────────────────────────────────────────────────
Type "notewrapper"
Sleep 700ms
Enter
Sleep 1500ms
Down
Sleep 500ms
Down
Sleep 500ms
Down
Sleep 500ms
Down
Sleep 700ms
Enter
Sleep 1200ms
Down
Sleep 600ms
Enter
Sleep 1500ms
# Enter the editor
Type "i"
Sleep 800ms
Type "NoteWrapper uses standard Markdown files, so you can open your notes in any other application that supports Markdown."
Sleep 700ms
Enter
Sleep 800ms
Type "This is a unified journal: all your daily entries live in the same file. You can also configure NoteWrapper to use monthly or other time-based entries."
Sleep 700ms
Enter
Sleep 800ms
Type "And, although you can't see it in this demo, this Markdown file is rendered live in my browser thanks to Vivify!"
Sleep 1500ms
Sleep 3000ms
# Leave the editor
Escape
Sleep 500ms
Type ":q!"
Sleep 800ms
Enter
Sleep 1500ms
# ─────────────────────────────────────────────────────────────────────
# Create / open a divided journal
# ─────────────────────────────────────────────────────────────────────
Down
Sleep 500ms
Down
Sleep 500ms
Down
Sleep 700ms
Enter
Sleep 2000ms
Enter
Sleep 1000ms
Type "i"
Sleep 800ms
Type "And this is a divided journal."
Sleep 500ms
Type " It uses one file per entry."
Sleep 700ms
Enter
Sleep 1000ms
Type "Find the dates and journal divisions a little too cumbersome?"
Sleep 700ms
Enter
Sleep 1500ms
Type "Don't worry: NoteWrapper also works with basic notes."
Sleep 800ms
Type "It distinguishes them using a regular expression, which defaults to `.*journal.*`."
Sleep 800ms
Enter
Sleep 700ms
Type "The unified or divided journal mode is chosen when you first create the journal."
Sleep 1000ms
Enter
Sleep 1500ms
# ─────────────────────────────────────────────────────────────────────
# Search
# ─────────────────────────────────────────────────────────────────────
Type "Let me show you one last cool feature."
Sleep 1000ms
Type "Have you ever forgotten when or where you wrote something?"
Sleep 1000ms
Enter
Sleep 800ms
Type "Well ... NoteWrapper was made for you!"
Sleep 1500ms
Escape
Sleep 500ms
Type ":q!"
Sleep 800ms
Enter
Sleep 1500ms
# Navigate to search
Down
Sleep 500ms
Down
Sleep 500ms
Down
Sleep 800ms
Enter
Sleep 1500ms
Down
Sleep 500ms
Down
Sleep 800ms
Enter
Sleep 2000ms
# Search all notes with fzf
Type "c"
Sleep 300ms
Type "o"
Sleep 300ms
Type "o"
Sleep 300ms
Type "l"
Sleep 1500ms
# Show the search result / preview
Up
Sleep 5000ms
Enter
Sleep 1000ms
# ─────────────────────────────────────────────────────────────────────
# Final note
# ─────────────────────────────────────────────────────────────────────
Type "i"
Sleep 700ms
Type "Never lose a note."
Sleep 1500ms
Enter
Sleep 1000ms
Type "P. S. Don't mind the broken fzf preview. Normally, you'll see the context around your search result, but sometimes `sed` breaks when fzf is opened for the first time."
Sleep 5000ms
Generated
+3 -3
View File
@@ -20,11 +20,11 @@
},
"nixpkgs": {
"locked": {
"lastModified": 1786106723,
"narHash": "sha256-zDSUbpoeo/9ZmD2+wXnzxoo1+uhL8vxc0b8yuYMKYq0=",
"lastModified": 1786862985,
"narHash": "sha256-FBJRXmbGXiSUDvYEbfLYRkckayyZ6SK1UEqhCrIZ2Cs=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "f13ff45afd1bb73e640eaa08a7066dbed07e3238",
"rev": "e5bdc4a41d4c072fe1e3787eaa0320a384741d44",
"type": "github"
},
"original": {
+1
View File
@@ -53,6 +53,7 @@
clang-tools
gnumake
libgit2
vhs
];
};
+1 -2
View File
@@ -766,7 +766,7 @@ backup_config_end:
openEditor(fullPath, editorToOpen, shouldRender, shouldJumpToEnd, shouldDebug);
free(fullPath);
}
openEditor(fullPath, editorToOpen, shouldRender, shouldJumpToEnd, shouldDebug);
free(returnNoteSelection);
if (gitEnabled) { // After closing a file, we need to update the git repo (if git is enable
char *date = getDateAndTime();
char *commitMsg = malloc(29);
@@ -775,7 +775,6 @@ backup_config_end:
free(date);
free(commitMsg);
}
free(fullPath);
} else if (strcmp(noteSelected, "Create new note") == 0) {
note_creation:
noteSelected = createNewNote(notesDirectoryString, vaultSelected, bypassSelectionNote, bypassSelectionNoteValue, journalRegex, shouldDebug);