While typing something in the flow, I may accidentally create nodes while I needed to link something else. Over the time some such empty nodes are accumulated. What would be the best way to find such nodes, and merge them with existing node? Ideally to add alias right there too, so such typing issues won’t happen again.
If they are “empty”, I’d delete them, not merge or add an alias. I would simply go to my file manager in my OS, sort the directory by size, and identify which ones I can delete (“empty” would not be size zero, but it should be pretty close to it). And then select and delete them.
I am assuming all my empty nodes would be files (that’s the case for me). If nodes are headings, I would never have an empty one, because I manually add an ID to a heading that is worth being an Org-roam node.
I like this approach, and normally I would do so. However, my problem isn’t about cleaning up empty files. When I type my thoughts down, I tend to insert links about different stuff. Sometimes it doesn’t exists and I create an empty page. However, there’s a small chance that I mistyped something that does exist with a bit different name (3D printer → 3D printing). While in the flow I may not notice it and just keep on going. At the end of the day I may end up with several notes created for stuff that I didn’t want to. All of this false nodes are referenced by others. This is quite tedious work to clean up by hand. therefore I’m looking for a way to automate that.
How do you know if a node is false one? If you wish to automate cleanup, you need a formal definition to differentiate false notes from notes you want to keep.
And you want to delete the false notes? What would you like to do with them? In other words, what are you automating?
If the nodes to clean up is up to 50, it would be probably quicker and easier to do it manually than trying to automate it… You can then review your workflow to prevent this from happening.
Recently hit a similar problem.
I’m travelling and it turns out that I’ve been taking notes/logs in 3 different files somehow:
cambodia.org
, cambodia_2024.org
and cambodia_summer_2024.org
. All 3 have content and links.
Ideally, I’d just merge everything in Cambodia.org
, have my links preserved, etc. Is there a way to do this?
This is but one example, it turns out I have a lot of notes like that.
Are you using IDs in the links? If so, it is easy.
In the destination file, create a header, insert the file you want to insert. Use the title as the header and put the file properties as the header properties. Now, you will need to make all the headers in the file you inserted, children of this header.
Delete original file.
You can then restructure these children if you want.