Skip to content
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

Better Node Icons #2611

Open
johnnyjmcivorv opened this issue Dec 1, 2024 · 3 comments
Open

Better Node Icons #2611

johnnyjmcivorv opened this issue Dec 1, 2024 · 3 comments

Comments

@johnnyjmcivorv
Copy link

I currently use CherryTree for writing novels. I think that it is the very best writing software I've used for this purpose, and I've used many programs (Manuskript, Obsidian, Ulysses, and more). I've shown it to other writers and they love the program. I understand that it's primarily aimed at coders but it has the potential to become more broadly popular.

Here is a suggestion:

Screenshot at 2024-11-30 23-15-21

The icon selection is a bit random and really tedious to use -- the selector box is just a long strip and you have to scroll up and down every time you look for an icon. Icons should be a little broader in scope with divided sections. It would also be nice to be able to use emojis or other unicode characters.

I'm currently using Ubuntu Mate btw.

@gitvectors
Copy link

I am another user, experimenting with CherryTree documents in complex workflows. I suggest a work around.

Provided that you have a *.ctd document (not the other document types) you can "hack" the internal XML code.

Download an XML editor such as XMLCopyEditor.

View the CherryTree internal structure in XMLCopyEditor.

If you now inspect the node elements you can see attributes such as custom_icon_id="132". This is the index number of the selected icon in the list of icons available. The tedious list you refer to. They are all svg files.

Now go to Edit > Global Replace

Also inspect hidden files .. ~/.config/cherrytree/icons

We see that the index number refers to the choice of custom icon.

Now we can view each svg icon in say Inkscape. I use in Ubuntu a file manager Krusader to skip through assets

In principle you can create and add your own custom images (svg format) and edit the index number. Then if you save the XML code and relaunch in CherryTree you should see the changes.

This tip applies to other assets within CherryTree documents. If you regard your *.ctd documents as XML code there are numerous other hacks to apply.

For example all CherryTree documents in your desktop can be indexed by Recoll and viewed by query: ext:ctd (show in GUI all documents with extension *.ctd). More advanced queries include looking for CherryTree documents containing key words.

@gitvectors
Copy link

gitvectors commented Dec 3, 2024

After thoughts:
If there are say only a dozen or so icons you prefer to use, rather than ploughing through a list of 155 icons my suggestion is to create your own set of svg icons using Inkscape or grabbing an icon from a library. Then you can place these few custom icons in their own folder alongside ~/.config/cherrytree/icons. Perhaps ~/.config/cherrytree/mysvg.
Now have a front end script which (a) backs up /icons folder, (b) replace with /mysvg folder. But this works only with new instances of CherryTree so any document applying the new mysvg set can be started from command line so that the "toggle" takes effect. It might be that you can stick with your own smaller set of icons once the changeover takes effect. Keep a backup of original and remember that after upgrades or reinstallation of CherryTree you might need to repeat this process. So now you have two pathways to explore. XML hacking or icons swap.

P.S. Actually all svg icons are found here (including preview).

P.P.S. Further thought. The solution might be much simpler than above first ideas. There are 10 icons shown in popup Use Selected Icon in Node Properties window.
Why not choose/design/find/create a set of 10 (or 20) svg icons to place at the top of the array in ~/.config/cherrytree/icons (no scrolling through 155 icons then needed) and so you will not need to create a script to toggle to different icon library? That is my choice of workaround.

@gitvectors
Copy link

See my update idea posted above.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants