News for hackers. Stuff that matters.
Re:Storing knowledge in a single long plain text file by kjksf on Tuesday May 21, 2024 @04:48PM (#40433696)
I've built a web-based tool for myself that has similar philosophy: https://edna.arslexis.io/

It does support multiple pages but you can use just one.

It has a nifty feature in that you can divide the single file into virtual parts. They just have alternate backgrounds to tell them apart. And each virtual part can have a type for syntax highlighting (plain text, markdown or a programming language).

I've been using it for a few months now and it's my primary note taking / knowledge recording thing.

Even though it's web based, on Chrome you can save notes on disk so it works like a desktop app.

Each note is a plain text file so you can edit them in any text editor.

If you put notes on a shared drive (Dropbox, OneDrive, Google Drive etc.) you can work on notes on multiple computers.

It's also open-source: https://github.com/kjk/edna

Re:Storing knowledge in a single long plain text file by gitinit on Tuesday May 21, 2024 @07:22PM (#40435423)
EDIT: Originally I just looked at the website. Looking at the GitHub repo, I see it's a fork, which makes sense (I also didn't notice the other replies!) Either way, it's cool. I'll probably end up using this myself. I was unable to find a way to store notes in a folder or in encrypted Gists though.

This seems nearly identical to Heynote[0], which was also on HN[1]. Even the example blocks share some content with that used as an example in the screenshot on the Heynote homepage (and I think in the app too)

[0]: https://heynote.com/[1]: https://news.ycombinator.com/item?id=38733968

Re:Storing knowledge in a single long plain text file by kjksf on Tuesday May 21, 2024 @09:08PM (#40436264)
To save on disk you must use Chrome or Edge because only they support necessary APIs.

Initial note storage is in localStorage. To switch to disk: right-click for context menu, `Notes storage` / `Move notes from browser to directory`.

Then choose a directory on disk and we will do one time migration from localStorage => disk.

You can then switch to another directory (some apps call it a "workspace"). Because why not.

Encryption is probably the next feature I'll add because I want to store secrets in my notes and I'll feel better if those notes are encrypted.

More docs: https://edna.arslexis.io/help

Multiple notes is pretty big addition. I loved the concept and implementation of blocks in Heynote but a single note was a deal breaker for me.

I've also added some UI like right-click context menu for discoverability, ability to enable spell checking.

And I'm really trying to optimize for speed of use, including speed of switching between notes.

For example you can assign Alt + 0 .. Alt + 9 as note quick access shortcuts.

By default I create 3 notes: scratchpad, daily journal and inbox and they get Alt + 1, Alt + 2, Alt + 3 quick access shortcuts but you can assign them to any page you want.

Re:Storing knowledge in a single long plain text file by Brajeshwar on Tuesday May 21, 2024 @10:45PM (#40436854)
Jonatan Heyman produces some pretty awesome and useful apps/tools. One should check out his work - https://heyman.info
Re:Storing knowledge in a single long plain text file by smusamashah on Tuesday May 21, 2024 @06:03PM (#40434616)
This is great. Any plans to add images support? (for screenshots in my case) I use OneNote extensively because it's free form like a white board and allows pasting images (which i often do while debugging).
Re:Storing knowledge in a single long plain text file by kjksf on Tuesday May 21, 2024 @06:28PM (#40434825)
Probably not to Edna. It's focused on being fast and lightweight.

I've been thinking about more featureful markdown note taker that would support images and more.

I've started on such a thing but stalled. It's way more work. The good thing about Edna is that I spent less than a month adding the features I wanted to Heynote fork.

The current version is at https://notedapp.dev/ but don't use it for actual notes.

Re:Storing knowledge in a single long plain text file by pcblues on Wednesday May 22, 2024 @06:45AM (#40439440)
A thing I used OneNote for was easy OCR.
Re:Storing knowledge in a single long plain text file by ralgozino on Wednesday May 22, 2024 @11:38AM (#40442310)
sounds like Obsidian's canvas: https://obsidian.md/canvas
Re:Storing knowledge in a single long plain text file by eMPee584 on Wednesday May 22, 2024 @04:50PM (#40446361)
inkscape and prezi should already do some of this
Re:Storing knowledge in a single long plain text file by FredPret on Tuesday May 21, 2024 @05:04PM (#40433902)
Very cool!

I love the math block. Is there a way to reference a variable elsewhere, or fetch data online? Then you could build a little personal dashboard with it.

Re:Storing knowledge in a single long plain text file by kjksf on Tuesday May 21, 2024 @05:41PM (#40434387)
Not at the moment.

I was thinking about making math more like a mode i.e. make it available in every block type, as opposed to it's own block type.

Then it would be active in plain text, markdown and even code blocks.

As to data fetching - falls a bit outside of scope.

Re:Storing knowledge in a single long plain text file by porridgeraisin on Tuesday May 21, 2024 @05:19PM (#40434106)
Just found out this is a fork of heynote! Was looking for one of these with web support
Re:Storing knowledge in a single long plain text file by kjksf on Tuesday May 21, 2024 @05:45PM (#40434441)
Yeah, I loved the simplicity and speed of Heynote and math mode.

I wanted multiple notes and I didn't get why it was made as a desktop app first given that all functionality to implement it is available in a browser (well, Chrome).

So I forked it and added those features.

Been using it daily so it was worth it.

Re:Storing knowledge in a single long plain text file by jonatanheyman on Wednesday May 22, 2024 @03:42AM (#40438343)
Heynote exists as a web app as well :)

https://app.heynote.com/

Re:Storing knowledge in a single long plain text file by porridgeraisin on Tuesday May 21, 2024 @05:18PM (#40434082)
Heynote is similar
Re:Storing knowledge in a single long plain text file by kjksf on Tuesday May 21, 2024 @05:37PM (#40434330)
Edna is a fork of Heynote with a bunch of changes.

Mostly it supports multiple notes and it's a web app, not a desktop app.

I could build a desktop app but it would not offer almost any advantages given that Edna can also save notes on disk (that's how I use it).

You can use Chrome's "Install" feature to make it look act like a native app (it opens in it's own window and acts independently of the browser).

Re:Storing knowledge in a single long plain text file by jonatanheyman on Wednesday May 22, 2024 @03:41AM (#40438336)
Heynote also exists as a web app: https://app.heynote.com/
Re:Storing knowledge in a single long plain text file by BOOSTERHIDROGEN on Wednesday May 22, 2024 @06:47AM (#40439450)
Can I self hosted this ?
Re:Storing knowledge in a single long plain text file by sphars on Wednesday May 22, 2024 @08:57AM (#40440368)
Looking at the GitHub repo[0], I don't see why you wouldn't be able to host it yourself (extra configuration may be required). In the package.json, there is a script for running the web app `npm run webapp:build`, so I'd assume you could do that and then host the built web app in ./webapp/dist however you'd like.

[0]: https://github.com/heyman/heynote

Re:Storing knowledge in a single long plain text file by jonatanheyman on Wednesday May 22, 2024 @05:14PM (#40446642)
Yep, that should work!
Re:Storing knowledge in a single long plain text file by BOOSTERHIDROGEN on Sunday May 26, 2024 @12:05PM (#40483212)
Will you provide an official Docker image in the GitHub Registry or Docker Hub? Thank you.
Re:Storing knowledge in a single long plain text file by canadiantim on Tuesday May 21, 2024 @05:25PM (#40434163)
How does the saving notes on disk work? You mean just downloading it? Or is the content synced? If so how does that work?
Re:Storing knowledge in a single long plain text file by kjksf on Tuesday May 21, 2024 @05:34PM (#40434270)
Chrome implements APIs that allow accessing files on the disk.

So Edna either stores notes in localStorage or in a directory of your choosing on disk.

In Edna you can right-click for context menu to switch between localStorage and disk.

If you ask: "how do the browser APIs work", you can look at https://github.com/kjk/edna/blob/main/src/fileutil.js

Basically, there's `window.showDirectoryPicker()` to ask user for permission to access directory (either read only or read write). And then using that directory handle you can read list of files, read / write files or create new files.

Re:Storing knowledge in a single long plain text file by wernsey on Wednesday May 22, 2024 @04:05AM (#40438489)
Oh, man, many years ago I used Tiddlywiki (and later Wiki-On-A-Stick) as a browser-based note taking app, but stopped using it because the API they used to save the file to disk got deprecated and removed.

History not repeating but rhyming, I suppose...

Anyway, thanks for this. I've just added it to my bookmarks.

Re:Storing knowledge in a single long plain text file by desio on Wednesday May 22, 2024 @03:39AM (#40438316)
Looks like that's on codemirror framework? Any good resources you could share on wiring up custom language and view? I've managed to kinda get something working with lezer but the docs aren't great and I want to setup some pretty specific behaviour in the view with folding and validation etc.
Re:Storing knowledge in a single long plain text file by kjksf on Wednesday May 22, 2024 @06:48AM (#40439461)
Yes, Codemirror.

What I know about Codemirror I mostly learned by reading other people's code so I suggest that.

Specifically code of silverbullet: https://github.com/silverbulletmd/silverbullet/tree/main/web... (and a few other directories there).

It implements very advanced Markdown mode, lots of code to learn from.

Re:Storing knowledge in a single long plain text file by zcw100 on Wednesday May 22, 2024 @06:59AM (#40439518)
Looks like a CLI version of a tiddlywiki