Skip to content

Bridges

A bridge takes a story written for one format and tells it in another. Some bridges are a single line, format: in the front matter; the others are a command, recit convert … --to …. Récit only promises a bridge whose mapping is closed: every part of the source has one place in the target, written in a table. What the table does not cover is an error with its file and its line, never a guess, a summary or a silent drop.

The bridges

From → toHowMappingStatus
deck → motionformat: motion in the front matterlayouts → animated blocks, one slide → one shotAvailable
report → deckrecit convert report.md --to deckone section → one slide, charts and tables keptAvailable
bible → deckrecit convert cast.md --to deckeach character, set, style or beat template → a slide, traits in the notesPreview
bible → bookrecit convert cast.md --to bookthe characters → one "Dramatis personae" chapter, name and summaryPreview
webtoon → motionwebtoonToFilm of @recit/webtoon/bridgeone panel → one 9:16 shot with a vertical panAvailable
book → docsthe entry of a book in a siteone chapter → one page, table of contents → sidebarPreview
roadmap → calendarinclude: of a roadmap in a calendareach dated milestone or item → an eventAvailable
calendar → webstoryrecit convert cal.md --to webstorythe upcoming events → an "upcoming" storyAvailable
calendar → atlasrecit convert cal.md --to atlaseach event with a geo → a view of the mapPreview
webstory ⇄ motionwebstoryToFilm of @recit/webstory/bridgeone card → one 9:16, 4:5 or 1:1 shot, same animated blocksAvailable
report → webstoryrecit convert report.md --to webstoryeach KPI or chart → a cardAvailable
form → reportrecit convert survey.md --to reportthe prose steps → sections, every field → one printable formPreview
webstory → webtoonrecit convert story.md --to webtoonone card → one panel, its text → captions stacked at the topPreview
Fountain ⇄ webtoonrecit convert script.fountaina scene heading or a shot → a panel, a dialogue → a stacked bubblePreview
→ PDFrecit export --to pdfthe formats of the closed print list, one print chainAvailable
deck → PowerPointrecit export --to pptx (@recit/pptx)measured slides → editable .pptx text, shapes, charts, notesPreview

The formats added since have their own bridges, listed on their page: atlas (to a deck, a film or a web story, and from a calendar), directory and glossary.

Every bridge marked available or preview has a conversion test and a test of the case it refuses. A bridge marked planned does not exist yet: asking for it is refused, it is never approximated.

Who owns a bridge

The source format owns its outgoing bridges: reportToDeck is in @recit/report, atlasToFilm in @recit/atlas. The exception is a bridge that would make the source depend on its target. Three bridges are owned by their target for that reason, each one tested:

BridgeOwned byWhy
roadmap → calendarroadmapCalendarEvents of @recit/calendarthe roadmap would depend on the calendar it feeds
calendar → webstorycalendarToWebstory of @recit/webstory/bridgethe calendar would depend on the webstory format
calendar → atlascalendarToAtlas of @recit/atlas/bridgethe calendar would depend on the atlas and its maps

Each one reads only the fields of the source model it needs, so the dependency goes one way.

calendarToAtlas is the exception written down on purpose: it stays in @recit/atlas/bridge, and the calendar model it reads, Calendar, CalendarEvent and Occurrence, lives in @recit/time/calendar (re-exported by @recit/calendar), so @recit/atlas depends on @recit/time and never on @recit/calendar. The same goes for calendarToWebstory in @recit/webstory/bridge. The webstory, calendar and roadmap pages show them.

Deck → motion, the bridge of 1.0

A deck becomes a film by one line. The source stays the same, scenes keep their id, and the layouts map to the blocks of the motion format:

MarkdownMarkdown
--- title: Lorem ipsum format: motion --- --- id=open layout=cover # Dolor sit amet. --- id=chapter layout=section ## Consectetur adipiscing
Deck layoutMotion block
covertitle
sectionchapter
quotestatement
a listlist

The whole table, with the shapes each block accepts, is on the motion page. A deck written for slides plays as a film when its scenes keep to that table. When one does not, the film is refused, and the message names every scene that has no block, at its line:

Code
slides.md:42: layout "grid" has no motion block

This bridge and the ./bridge subpaths of the formats in the 1.0 contract (report, webtoon, calendar, roadmap, directory, webstory) are part of Récit 1.0 (see Stability). A bridge whose source or target stays outside 1.0 (docs, atlas, @recit/pptx) joins the contract with that package, in a 1.x minor.

A story outside every bridge

Asking for a target no bridge reaches is an error too, before anything is written:

Code
$ recit convert slides.md --to deck slides.md is a deck story: only a report converts to a deck (--to deck).

recit convert without --to keeps the format and switches between the Markdown and its JSON twin, which is not a bridge: the story stays the same, only its notation changes.