-
Notifications
You must be signed in to change notification settings - Fork 477
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make Cherrytree markdown-based for greater compatibility #2448
Comments
Hi @Breizhux , it's more likely that the markdown will be supported as an export type in future. |
I'm well aware that this would be a major change, and that it would take time. And it's with a long-term perspective that I'd like to put this idea forward. Now, I'm aware that I won't be seeing this released for a long time. I'm developing a bit, and I know it's going to be a lot of work. I'm just putting the idea out there for consideration, and hope to integrate it into future versions (I'm patient, I can wait ;)! |
I have used CherryTree for years and I see no need to change its already formidable structure. However I also use Markdown in multiple cases such as Hugo. Where we see multiple frameworks there is often the ability to think of orchestrating tools. That is using a cohort of tools in a toolchain. Thus I have just bounced questions off an AI assistant (who can search faster than I can) and the convergence of prompted ideas was as follows: Think of a cooperating toolchain rather than aiming for every feature from one tool. Use a Markdown editor such as Zettlr, Sublime Text, VS Code to create Markdown “nodes”. Use Pandoc wth a custom Lua filter to transform Markdown to XML. Inject custom XML as nodes into CherryTree. The internal structure of any CherryTree document can be viewed in XML editors such as XMLCopyEditor. Another route is to use Python to inject Markdown created documents into CherryTree. That is leverage the XML structure. https://stackoverflow.com/questions/73652391/create-custom-xml-output-from-pandoc I am using CherryTree as eLearning containers. |
You think users will do that? Especially simple users who just want to take notes and be able to share them?! I'm not asking for a tool that does everything and the opposite of everything. Only a tool that can do wysiwyg markdown, which nobody does correctly and simply today (except closed-source solutions). Without losing the spirit of Cherrytree, which I mentioned above. I really think that with Markdown support, Cherrytree would become THE open-source note-taking software. We all know the advantages of Markdown. Cherrytree also has qualities that no other note-taking software has. I think it would be a great idea to bring together the best of both worlds! |
Converging on "simpler" workflow, but not dropping above. |
+1 more vote for markdown export. the reality is that the people using cherrytree interact with markdown in other apps frequently, and cherrytree is a vector to that. this request has been made for the past 5+ years and i was just about to make it again, and saw this one. understandable it'd take a lot of effort to support this feature as @giuspen noted. he also has been saying that he plans to add markdown support for 7-8+ years, so don't hold your breath. @Breizhux you fail to realize how much work and effort goes into a small open source project like this. On top of this, multiple other factors come into play such as time, cost, security, etc. @Breizhux you know you can export from cherrytree to HTML which is so very easily convertible to markdown? IN FACT, they're practically one-in-the-same in the sense of how easy and seamlessly they convert. https://codebeautify.org/html-to-markdown
https://github.com/search?q=%22html+to+markdown%22+%22converter%22&type=repositories&s=stars&o=desc
On a final note - it'd be nice if all programs did everything we wanted. That's not the reality we live in, unfortunately. Your request is not outrageous, I want to make the same request and have for years. But I realize this is a small open source project, and the creators do the best they can for us. It's on us to liaison the tool for its best uses, and get what we can out of it - while supporting it. Before we know it, the white house will take CherryTree away from us - so enjoy it while it's still here!!! |
Yes, I'm well aware of the amount of work involved. That's why I'm proposing a very long-term vision for Cherrytree. And today I'm perfectly capable of doing a CherryTree --> HTML conversion. On the other hand, I didn't know that Giuspen included markdown support. In any case, my intention is only to propose a concept/how to integrate markdown into CherryTree. I have no time requirements, as you can see. My idea is to simplify usage to such an extent that markdown can be used with the touch of a fingertip: Ctrl+S! Wouldn't that be great ;) |
Another shorter term vision. Today. |
Hello, My christmas present would be a keyboard shortcut to easily switch between two view modes for a node: the markdown edit mode and the view mode :) EDIT: Verry Sorry, it's already implemented....
And Voila, now press F5 on your markdown node, and you will a have a nice terminal markdown rendering :) and press CTRL + F9 to hide/view the terminal windows, hmm how nice :) Many thanks to the Cherrytree creator and contributors :) /!\ Please keep the facility to crypt the cherrytree file with a password/passphrase :) PS: after reading some source code files, giuspen seems more to be a LaTeX fan :) |
Does the html to markdown site work locally or via sending to server? Anyway Markdown is such a widely used format that I'm sorely disappointed to see it's not an option for CherryTree exports :( |
You can export as HTML then in a helper script run Pandoc > HTML > Markdown (or other format). indeed I am exploring export CT to HTML then tweak to create a Reveal.js Presentation where each CT node is a slide. A new feature? |
I have been using cherrytree for years, and I love it. However, recently I started thinking about the advantage of using markdown in addition to XML as a valid file format. While this may be a rather significant undertaking, I'm thinking that perhaps this can be done in several stages, each perhaps not as daunting as one might expect. The format I have in mind would use folders to maintain the hierarchy, in much the same the existing hierarchical XML format does (when using "file per node" xml format): Each folder would have its main text in "index.md", a folder for embedded files (images, PDFs, etc) and leaf subnodes (i.e., subnodes that do not have subsubnodes) as markdown files, named after the subnode name. The main benefit I see in this are the fact that the file hierarchy is self-explanatory, notes can be edited from outside cherry-tree, and files can be added and changed without running cherry tree. This for instances eases the syncing (via services such as syncthing, git, or just a dropbox folder). It also makes easier to create scripts, in lieu of plugins, that can be run externally to cherrytree Some of the components for making this happen are actually already there, as best as I can tell:
Likely, there are bugs in my reasoning. There's always a difference between what seems doable and what is actually doable in reasonable time. I am also no arguing that the simple format I proposed (folder and files) is well thought out, though it seems on the face of it to be similar to what obsidian is using (but I'm not an obsidian user -- cherrytree for years, as I stated). I would love some feedback on this idea, as well as any pointers that could be useful -- either to the code itself (i.e., where do I find the necessary components) or to other attempts, examples of good ideas, and components that be used or reused. If there's any documentation on the cherrytree code structure that I could use, it would be quite beneficial. Thanks! |
I spotted by chance this reply buried very deep. I found it by chance. This is my latest thinking. Perhaps community needs a discourse server or similar so that we do not lose late replies. |
When I discovered Cherrytree over 6-7 years ago, I was quick to think that your software should be based on markdown.
The idea was simple, the file would be characterized by :
It seems to me that there would be enormous advantages to such a structure:
On the other hand, the complexity would lie in maintaining a WYSIWYG editor... In other words, the user wouldn't see any change in the interface, except (perhaps, if we choose to do it that way) to be able to format text directly with markdown syntax (to be seen if it's feasible).
I haven't looked at how your interface works, but I imagine you're basing it on GtkTextView with formatted text. So there are perhaps 2 possibilities: have a WYSIWYG markdown engine → visualizer directly (such as joplin wysiwyg editor), or a markdown converter → GtkTextView (which would modify the GUI (almost) nothing).
I'm well aware that this would be a real project, and that it would take a lot of time to develop, and maybe even a new version number ^^.
But your interface (although perfectible) is well thought-out, very simple and really useful! It really feels like you're developing a tool to be of service, and that's what we expect from a tool!
So I thought I'd suggest making it even more useful by integrating this Markdown standard into the file saving structure itself, without changing the interface (unless you really want to improve it).
Thank you for your work and I wish you all the best!
The text was updated successfully, but these errors were encountered: