How kevboh/longform works
Project type and purpose
• Longform is an Obsidian community plugin that helps users organize, edit, and compile multi-scene or single-scene writing projects (novels, screenplays, essays) stored in an Obsidian vault.
• It integrates deeply with Obsidian’s plugin API, providing a custom sidebar pane, commands, modals, and a compile‐pipeline to assemble manuscripts from Markdown notes.
File structure
• Top‐level config: manifest.json, package.json, rollup.config.js, tsconfig.json, vitest.config.ts.
• src/api: external HTTP integration (LongformAPI).
• src/commands: Command handlers (registering Obsidian commands for UI actions).
• src/compile: The compile‐pipeline and compile steps (Strategy pattern).
• src/model: In‐memory stores, vault synchronization, scene navigation, migration logic.
• src/view: Svelte components for the sidebar pane, modals, compile UI, explorer view, settings.
• src/utils: File I/O helpers.
• src/main.ts: Plugin entrypoint—initializes UI, commands, event listeners.
Key insights from the README
• The plugin watches vault files with a longform frontmatter, builds an in‐memory model of projects/drafts/scenes, and syncs changes back to disk only to the project index file.
• Users interact via the Obsidian sidebar (Scenes, Project, Compile tabs) and context‐menu commands.
• The Compile tab drives a customizable sequence of compile steps that transform scene Markdown into a final manuscript.