AmmarAbouZor / tui-journal

Your journal app if you live in a terminal
https://crates.io/crates/tui-journal
MIT License
306 stars 8 forks source link

Default journal format #382

Open 173brian opened 2 months ago

173brian commented 2 months ago

Tui-journal stores files by default as txt files. It would be nice to have an option to configure this to enable other formats like markdown--especially given the goal for a RESTful API. Having the ability to control note format could make for more powerful fuzzy searching and thus more powerful note taking/finding abilities.

AmmarAbouZor commented 2 months ago

Thanks for the suggestion. Actually the app saves the data by default as a local SQLite database and it has another json backend. The content of the journal is saved as plain text since there are no other possibility currently to render it as markdown. Another point is that the markdown format is actually a plain text that is rendered in a special way by web-browser and other GUI software and having that data in that format will not provide any advantages in the fuzzy searching (Hopefully this suggestion isn't some kind of AI hallucinations).

173brian commented 2 months ago

Thanks for the reply, not an AI hallucination here, just a person trying to learn more :) I understand the point that the markdown format is essentially just a construct that sits on top of plain text and the clear assumption of tui-journal is that all text is plaintext. You are correct that using the markdown format wouldn't improve fuzzy finding capabilities, I suppose that was just a link I formed in my mind because I usually fuzzy find based off the headers of a document, but the find by content option is format agnostic.

The assumption that all text is plaintext may be true for tui-journal's rendering purposes, but it is not an assumption that holds once a document leaves the confines of the database. Thanks to the elegant mechanism for exporting it is possible to take journal entries beyond the database for other uses as well, but renaming every file being exported as the same .md filetype is a chore that should be automated.

There are useful reasons for this feature that extend far past searching: A default file format used with importing and exporting would allow for syncing notes across machines and applications something would greatly extend the functionality associated with tui-journal. A plugin for batch importing/exporting could transform a shared repo used with other note taking applications like Obsidian into a home for tui-journal as well, allowing it to shine as a blazingly fast tui note application.

I would be happy to help with development if you would consider supporting the feature and need community support.

AmmarAbouZor commented 1 month ago

Thanks for the suggestion... I want to make sure that you are know all the current export and import functionality because maybe you can achieve you goal with much simpler way... Currently we support to kinds of export:

Do you think we need to improve on that mechanism or it's enough for your use-case?