ToBeDone...
- 6 Devlogs
- 26 Total hours
A simple cross-platform TUI note-taking tool, with markdown support and memory. written in Rust with Ratatui
A simple cross-platform TUI note-taking tool, with markdown support and memory. written in Rust with Ratatui
Hi again! This… is a sad one.
But first, the accomplishments!! in this devlog I have:
Refactored the file.rs file (that saves/reads the files) to remove things like creating an uninitialized variable just to initialize it 3.14 seconds later in an if statement, in favor of initializing the variable with the if statement. (let id = if input...)
Changed the massive iterator function line for cutting away from the displayed strings into the paragraph.scroll() function (which like, since when does that exist yk?)
Moved the args struct into a static LazyLock<Mutex> which allows for a (relatively) safe global variable defined at runtime :3.
Added modifier parsing for proper hotkeys and an options menu (internally called FormatDisplay, for reasons to be explained later) to show all the hotkeys.
Turns out 9 hours is a lot lol.
WAIT NO I DON’T WANN-
Or well, the lack of it. over time while trying to work on this I realised that full markdown support is wayyyyy out of the scope of my (and the TUI’s) capabilities. {more info in the readme} after testing a few options (including a line-by-line implementation) I had found a silver-lining:
The menu is a new widget in the program, it simply shows the available keybinds, with SUPER keybinds formatting text, while control does things in the program. Do be warned though. I did not have time to make the actual functionality 😭
Hey all! this is a smaller one as I get things ready for the next part, markdown!
Today, (and by this I mean it’s no longer 3 am) I have added CLI arguments for debugging, generating sample text, and no… eggs? Yeah Idk what that’s about (actually though that one is saved for later it might disappear)
I have also fixed a few leftover errors and have tested the program on MacOS! :33
it worked almost immediately once I created the folder where all the notes are stored and set its permissions (I will set up install scripts to set everything up once I do all the functionality and windows support)
By the way.. I wrote the readme.. you should check it out!! »
Anw, have a nice dayy :3 (🥚)
Hi there, welcome to my personal hell. (
) It’s called movement. I have spent the last (non-consecutive) 6 hours to make something not too interesting, but not too uninteresting. (👀 )
cursor movement is extremely important for a note-taking app which currently doesn’t have planned mouse support, so I made sure to perfect (copy nano’s) it!
Over the time I also:
)
(/j)I don’t really have much to show just because of the shear monotony of the task but here is a video of the weirdest bug I encountered on this journey (and probably the weirdest I ever will encounter), let’s see if you can figure out what happened :p
Hey everyone!!
For this log I have prepared a delightful… nevermind, this is all technical stuff. :sadge
Never the less we will take a look! the main things I did was adding cursor support and improving input handling, which went from temporary to (practically) production!
The other part (the hard part that took like two hours) was adding the cursor. I hate this thing. The cursor made the program panic in so many ways that I stopped counting. also figuring out how to even add it was another hour or two just in research (this ended up as like three lines btw) for anyone wondering, the cursor is held in the main struct as it’s own struct of two u16 variables which are added (or removed from) whenever the arrow keys are pressed. The displayed block is Ratatui’s default cursor that took me a million years to find. :sob
Anyway, I have attached a video of most of the programs capabilities (I forgot to film the recent option and am too tired to do it again, sorry) [the hello and goodbye notes were not there initially]
Hiiiiii
In this devlog I have implemented all of the logic to read files, save them to the main app struct and then save a symlink that let’s you access the last used note without specifying its title. (currently everything is linux only, cross-platform support will come later)
(explanation for the screenshots: both commands shown in fig. 1 have the same output [shown in fig. 2.])
Hey! in this devlog I implemented the main TUI function, though I have not yet implemented a good way to control it (currently I am not even checking which key was pressed or if the event was a key press…), and a little Sample text file for testing.
I don’t really have much to add, I am still new to Rust and Ratatui so I am very slow. (sorry :sob)
Thanks for reading! :purple-heart