kevboh / longform

A plugin for Obsidian that helps you write and edit novels, screenplays, and other long projects.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Compile: Workflows & steps

kevboh opened this issue · comments

Instead of a single preset option, Compile should let you create and save custom workflows that go from a draft to a final product. Workflows are made up of steps. Steps come in three shapes:

  1. Scene steps
  2. Stitch steps
  3. Manuscript steps

Scene steps operate per scene. They accept either a scene's markdown or the product of a previous scene step, and output a known format.

Stitch steps combine the output of the last scene step for every scene into a single file, a manuscript.

Manuscript steps operate per stitched-together manuscript.

Some examples of workflows would be:

1. Scene step: Preprocess the markdown by removing internal links.
2. Scene step: Insert an H1 at the top of each scene with the scene's title.
3. Stitch step: Combine all the resultant markdown into a single file.
4. Manuscript step: Convert to PDF.

…or…

1. Scene step: Convert each scene to LaTeX via pandoc.
2. Stitch step: Join the LaTeX docs into a single doc.
3. Manuscript step: Render the LaTeX doc as a PDF.

…or…

1. Scene step: Convert each scene into an HTML index file, using a base path to render internal links.
2. Stitch step: Move all index files into a single folder somewhere on your machine.
3. Manuscript step: Add any other files needed to generate a website.

You get the idea. Will likely be a gradual process of adding steps. Steps much validate their input and output types against their neighbors.

From #13:

I think a compile option for those would be helpful. Stuff like tags can be helpful during writing, but are often unnecessary for the finished work. in a more abstract sense, some replace / regex functionality during compile might be useful.

Such a feature could also be used to implement sth like variables for a longform project – you would define variables in a separate note and during compile you would insert the variables there. Something like this could be useful for character names etc. This pandoc filter does something quite similar by by using "mustaches" ({{variable}}) to mark variables.

as another interesting option, I'd like to put the compile option "removing yaml-frontmatter" on the table. yaml headers could be useful to organize scenes, but naturally you do not want them after compiling.

@chrisgrieser … except probably a "main YAML" that controls your Pandoc → LaTeX workflow ;-)
I—for now—put that into a separate "YAML" scene at the top.

Closed with #40