kevboh / longform

A plugin for Obsidian that helps you write and edit novels, screenplays, and other long projects.
Other
610 stars 30 forks source link

Compile Step Request: Expand Wikilink Note content #121

Open conceptia2020 opened 1 year ago

conceptia2020 commented 1 year ago

tl;dr: I'd like to have a compile step that automatically replaced any wikiLinks with the text of the note the link represents.

Hello. Brand new user of longform and really appreciating it. (If it does not already exist) I would like to be able to reference my existing obsidian notes (that are in various different folders of my vault) in my scenes, and then during compile have the links replaced with the actual content represented by the link. I think this would promote reuse of notes and would highly align with the spirit of the zettlekasten concept - i.e. assembling atomic notes into larger works. It would also drastically cut down on the copy/paste work to create a longform piece of work. Also, as users enriched their underlying atomic notes, the longform content will automatically be enriched over time (which would practically automate creating new editions of long form work.) Perhaps a new step "Expand Links" with a boolean option {'Remove H1 Header'} could be created? I suggest the remove H1 header option since the context in which I'm using the atomic note may change from draft to draft or project to project. Does this functionality (or a workaround) already exist? Thanks.

conceptia2020 commented 1 year ago

replaceLinks.js.zip

Hello @kevboh! I found a developer to create the compile step I described above. I've tested it in my vault and it appears to work very well. I'm (hopefully) attaching it here in case you'd like to include it as a core compile step in a future version or in case anyone else can benefit from this. Thanks to @paulbuehlerdev for the excellent work and quick turn around on this!

pdworkman commented 1 year ago

Sounds like a great idea! I have downloaded your script to give it a try sometime!

djsudduth commented 1 year ago

@kevboh - did this get incorporated yet - or will you be adding this (plus for issue #90 )??

kevboh commented 1 year ago

Not yet. Will get to it when I can. User steps should help--I will never be able to cover every compile use case.

djsudduth commented 1 year ago

Ok. I'll try to do it and send a pull request.