Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Syntax idea: starred revisions #2

Open
lichendust opened this issue Oct 7, 2023 · 0 comments
Open

Syntax idea: starred revisions #2

lichendust opened this issue Oct 7, 2023 · 0 comments
Assignees
Labels
idea Proposal for a new idea
Milestone

Comments

@lichendust
Copy link
Owner

Every other Fountain editor that supports starred revisions does so by switching the container format to some arbitrary binary or zipping the text file alongside some other blobs of diff data.

Meander won't ever do that. No binaries, only plain text. The zip is somewhat acceptable, but once you've opened the Pandora's box of adding extended syntax... you may as well just continue. Looking at you, John August.

I've experimented with starred revisions to a surprising degree of success by having Meander simply read Git and Mercurial diffs as a switching mode in the parser. I based the target historical versions on tags rather than commits, so that tags could be moved around to provide the writer's preferred historical commit (in case they thought to add something new to the pink revision and now needed to bump it).

As a simplification, the working copy (whatever was on disk at that moment) was always compared to a historical target. You couldn't compare two arbitrary historical points unless you checked the newer one out and compared it to the older.

The issue was that in semi-rare cases, Git would take it upon itself to do it's job very very efficiently, which is storing the diff in the smallest possible form. This meant that some changes were not localised to the site of the writer's actual changes and would result in a big stripe of green or red in the diff — now half the page is starred unnecessarily.

The other issue with this is that asking the average non-technical writer to interface with Meander is already a bit of a stretch, let alone asking them to also deal with Git. The hurried writer making amendments in their trailer on a break is hardly going to want to deal with Git's utterly maddening CLI interface to move a tag around.


Instead, it seems like it might be a better idea to provide a tag in syntax that writers can use to mark changed paragraphs. If they want to version their screenplay, they can do so with whatever tools they like externally. As mentioned before, working copy is always the canonical one in this paradigm.

Anyway, here's a pseudo-syntactic example of what this might look like:

        DANIEL @pink
    (rage consuming him)
_I DRINK YOUR MILKSHAKE!_

The writer can then export the screenplay with the -r pink flag and all items tagged as pink will be marked with stars.

It could also be combined with the page-locking feature, where pages with headers featuring these tags would be considered the only pages in the output: a -r pink build would then create a PDF with only those pages ready for printing.

I want some feedback on this idea before I implement it natively, but it's otherwise a relatively easy addition to the project.

@lichendust lichendust added this to the v0.3.0 milestone Oct 7, 2023
@lichendust lichendust self-assigned this Oct 7, 2023
@lichendust lichendust added the idea Proposal for a new idea label Oct 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
idea Proposal for a new idea
Projects
None yet
Development

No branches or pull requests

1 participant