-
-
Notifications
You must be signed in to change notification settings - Fork 84
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
specify the note to export as a separate argument #29
Conversation
Hey @vindex10, thank you for your contribution! Unfortunately, I'm quite hesitant to accept changes without corresponding tests, and there were a few design choices I wasn't entirely happy with, so this lingered for a bit. Your PR inspired me however, and I've now done an alternative implementation of this in #37. I'll be creating a new release over the next couple of days that includes this new functionality. |
Hi @zoni ! Thanks for the feedback :) I'm happy it was somehow inspiring! what do you think about the possibility to export notes, if the directory structure doesn't reflect the graph? say, all my notes form graph by referencing each other but are all in the same dir. Do you think it could be a useful feature? |
I'm not sure I understand. Could you explain in a little more detail what you mean by this? |
I keep notes all in the same directory in obsidian. Some notes refer to other notes. That's how I build the graph. Now I'd like to export only part of this graph. I want to start from some note in the graph, and follow all references. Then follow references of references, etc-etc.. Eventually, I'd like to have exported the initial note and all notes (maybe to some depth) related to it by graph connections. did I make it more clear? :) please ask, I'll do my best to explain! |
Yes, I believe I understand! Basically, you wish to specify a given note to export, and have that note be exported together with every note it references (recursively). That would definitely be a nice feature to have, but implementing it may not be so trivial. This would likely require some extensive changes to the control flow. Right now notes are exported as they are parsed, but what you describe would require a two-phase approach: First going over all notes and maintaining an internal graph of how those notes link together, then traversing (part of) that graph to perform the actual export. |
I agree, it will take some time to implement fully. A simple step forward would be to implement only "forward" references. So you just parse a note, extract references, and then include them into the export. Then recursively do the same with the extracted ones. |
Hi! I suggest the first step towards the exporting of the subgraph. The functionality I lack now, is actual triggering of the export when the reference is discovered in the note.
In this form it is also possible to call obsidian-exporter as a tool from the other code, that conducts the traversal.