Skip to main content

Convert Scrivener projects to Obsidian-compatible Markdown, preserving binder structure, links, and metadata

Project description

Scrivenite Logo

Scrivenite

Convert Scrivener projects to Obsidian-compatible Markdown โ€” preserving your binder structure, internal links, and inspector metadata.

Buy Me A Coffee

Features

  • ๐Ÿ“ Binder Structure Preserved: Your Scrivener folder hierarchy maps directly to folders in your Obsidian vault, with optional 01 - ordering prefixes so the Manuscript reads in binder order
  • ๐Ÿ”— Wikilink Conversion: Internal Scrivener links (scrivlnk:// and scrivener://) become Obsidian [[Wikilinks]], with aliases when the link text differs from the title
  • ๐Ÿท๏ธ YAML Frontmatter: Every note gets frontmatter with its original scrivener_id and the document title as an alias, for robust search and cross-referencing
  • ๐Ÿ“‹ Metadata Rescue: Synopses, inspector Notes, and inline Comments are appended to each note under ## Synopsis, ## Notes, and ## Comments headers
  • ๐Ÿ–ผ๏ธ Media Support: Images and PDFs are copied over with companion .md files containing ![[embeds]]
  • ๐Ÿงน Clean Markdown Output: Strips RTF artifacts, excessive escaping, Scrivener compile placeholders (<$PROJECTTITLE>, <$wc100>, โ€ฆ), and stray backticks
  • ๐Ÿ”€ Collision-Safe Filenames: Titles become safe filenames (truncated to 100 chars); name collisions get a short UUID suffix

Prerequisites

  • Python 3.8 or higher
  • Pandoc (macOS: brew install pandoc)

Installation

git clone https://github.com/krishnakumar-kapil/scrivenite.git
cd scrivenite
pip install -e .

Usage

Point the script at the .scrivx file inside your .scriv project bundle:

python scriv_to_obsidian.py path/to/MyNovel.scriv/MyNovel.scrivx output_folder

Options

Option Description
-v, --verbose Detailed logging of every item processed
--clear Delete the output folder before converting (useful when re-running)
-o, --ordered-folders Folder titles whose contents get 01 - ordering prefixes (default: Manuscript; repeatable)
--skip-trash Don't convert the contents of the Trash folder
--conservative Disable opinionated cleanup heuristics (stray-backtick stripping, character-sheet header promotion). Use if your documents contain inline code or literal backticks

Example with options:

python scriv_to_obsidian.py MyNovel.scriv/MyNovel.scrivx vault/MyNovel --clear -o Manuscript -o Characters -v

Example Project Structure

Input Scrivener binder:

MyNovel.scriv
โ”œโ”€โ”€ Manuscript
โ”‚   โ”œโ”€โ”€ Chapter 1
โ”‚   โ”‚   โ”œโ”€โ”€ Scene 1
โ”‚   โ”‚   โ””โ”€โ”€ Scene 2
โ”‚   โ””โ”€โ”€ Chapter 2
โ””โ”€โ”€ Characters
    โ””โ”€โ”€ Protagonist

Generated Obsidian vault:

output_folder/
โ”œโ”€โ”€ Manuscript/
โ”‚   โ”œโ”€โ”€ 01 - Chapter_1/
โ”‚   โ”‚   โ”œโ”€โ”€ 01 - Scene_1.md
โ”‚   โ”‚   โ””โ”€โ”€ 02 - Scene_2.md
โ”‚   โ””โ”€โ”€ 02 - Chapter_2/
โ””โ”€โ”€ Characters/
    โ””โ”€โ”€ Protagonist.md

Troubleshooting

  • "File name too long" errors: Filenames are automatically truncated to 100 characters โ€” update to the latest version if you still see this.
  • Backticks around normal text: An artifact of RTF conversion; the cleanup pass removes them. Please open an issue with a sample if any slip through.
  • XML errors on start: Check that you passed the .scrivx file (not the .scriv folder) and that it isn't empty (0 bytes).
  • Pandoc errors: Make sure pandoc is installed and on your PATH (pandoc --version).

Roadmap

  • Publish to PyPI (pip install scrivenite)
  • Fully configurable header detection (currently tuned for character-sheet templates)
  • Long-term: a native Obsidian plugin for 1-click imports

Development

Install with test dependencies and run the suite:

pip install -e ".[test]"
pytest

For iterating on cleanup rules or link resolution, convert into the same output directory each time (with --clear) so you can diff results in one vault. A --debug-port 5678 option is available for attaching a remote debugger (pip install debugpy).

Project Structure

  • scriv_to_obsidian.py: Main script with conversion logic
  • tests/: Unit tests and a sample Scrivener project under tests/data/

Contributing

  1. Fork the repository
  2. Create a feature branch
  3. Make your changes
  4. Run the tests
  5. Submit a pull request

Bug reports with weird RTF edge cases or unusual Scrivener templates are especially welcome โ€” they make the parser more robust for everyone.

License

MIT License - See LICENSE file for details

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

scrivenite-0.1.0.tar.gz (19.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

scrivenite-0.1.0-py3-none-any.whl (13.8 kB view details)

Uploaded Python 3

File details

Details for the file scrivenite-0.1.0.tar.gz.

File metadata

  • Download URL: scrivenite-0.1.0.tar.gz
  • Upload date:
  • Size: 19.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.2

File hashes

Hashes for scrivenite-0.1.0.tar.gz
Algorithm Hash digest
SHA256 8a52268a8626bc941dd21294b5d5df917370d525aa40a6a63eba424e043b003f
MD5 2bbe063bd46294680296213c35278c67
BLAKE2b-256 46f9d50d6021989df7965ab2eb49214440b828dda311315ce1ede49f463ba2f4

See more details on using hashes here.

File details

Details for the file scrivenite-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: scrivenite-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 13.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.2

File hashes

Hashes for scrivenite-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 63dca3432bd830869d12898a052b990af2b7b53f32d96e2f70d34c32bc6ebc5a
MD5 0becbc79b042a06a8e890bc18520d95c
BLAKE2b-256 1017ec40f72e993138e58b30c1ff7193c6e934b5342b656c12abf0b4801db546

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page