mjrusso / mountain

A tool for working with files in the Fountain screenplay format.
http://blog.mjrusso.com/2014/08/15/mountain-screenwriting-with-fountain.html
MIT License
20 stars 1 forks source link

Error when splitting without closing reference tag #3

Closed rnkn closed 3 years ago

rnkn commented 10 years ago

I wanted to push Mountain to breaking point, because I'm a jerk, sorry.

I feel like the syntax for splitting a screenplay should allow the writer not to need closing tags, e.g. the following throws an error:

# ACT I

= Meet the **Hero**.

[[#reference intro.fountain]]

FADE IN:

# ACT II

# ACT III

## Finale

[[#reference the-end.fountain]]

> FADE OUT.

>THE END<

[[/reference]]

Ideally, I'd like the writer to be able to think "I'll just split this monster into smaller chunks" and go through pasting a stupidly simple tag. Even something like...

# ACT I

= Meet the **Hero**.

[[ split ]]

FADE IN:

# ACT II

# ACT III

## Finale

[[ split: the-end.fountain ]]

> FADE OUT.

>THE END<

And Mountain would chug on through, splitting into three *.fountain files, automatically numbered:

# ACT I

= Meet the **Hero**.

FADE IN:

# ACT II

# ACT III

## Finale

> FADE OUT.

>THE END<

(Where split is an alias for reference.)

I have some ideas about how to make the above syntax compatible with the rather genius way that Mountain can run join and split back and forth over the same files, but I figure my above ideas are annoying enough already!

rnkn commented 10 years ago

Let me know what you think of this Gist

drusso commented 9 years ago

+1 for optional closing tags.

mjrusso commented 9 years ago

In the example in this ticket's description, you have # ACT I = Meet the **Hero**. automatically written to screenplay-ref1.fountain. These lines precede a split directive.

However, in the gist, the entire EXT. CAFE - MORNING is not written to an auto-numbered file (it stays put, in the manifest) -- but, like the other example, it also precedes a split directive.

This seems inconsistent to me, and it's one of a few examples in the file where it's not clear to me what the correct behaviour should be.

I also don't like auto-numbered files because they don't play nice with source control (and even if you aren't using proper source control for your screenplay, if you're using Dropbox or something like it, you get file history for free, which this would interfere with). There's also the matter of not being able to look at the "joined" screenplay file and determine which smaller file to edit, without first opening the manifest, which feels wrong to me. I also think that you end up with a better, more useful manifest file if you need to be deliberate about placing closing tags.

I know that this would be an optional feature, but I'm still not convinced that it adds more value than the complexity it introduces.

rnkn commented 9 years ago

Ah yeah I tried to make the gist complicated to try cover all bases. Probably wasn't a good idea because I appear to have confused myself. My examples are indeed inconsistent. The upper part of the gist was supposed to be the very messy way a very messy writer might attempt to use the syntax. I don't now what I was thinking with the lower gist section (so I've now removed it).

I think the crux of my somewhat fractured thinking was two separate but related ideas. The first is optional closing tags; the second is optional filename specification. Considering I managed to easily confuse myself with optional filename specification, and the the source control issues it presents, let's dismiss that idea outright.

To simplify, what if an opening [[ reference: *.fountain ]] directive may be closed by either [[ /reference ]], another [[ reference: *.fountain ]], or the end of file?

# ACT I

= Meet the **Hero**.

[[ reference: foo.fountain ]]

FADE IN:

# ACT II

[[ /reference ]]

# ACT III

[[ reference: bar.fountain ]]

## Finale

[[ reference: baz.fountain ]]

> FADE OUT.

>THE END<

....becomes...


FADE IN:

# ACT II

## Finale

> FADE OUT.

>THE END<

In this way, opening directives still need to be closed, but can be closed in a simpler fashion.

mjrusso commented 9 years ago

This sounds a lot more sane to me. Does this introduce any issues with going in the reverse direction? (And back-and-forth-and-back-again?)

If anyone wants to take a stab at implementing this, feel free :)

rnkn commented 9 years ago

I'd only propose that the writer can be lazy in adding closing /reference tags in the first instance, i.e when first running mountain split, and that mountain join would always insert closing tags.

I guess this means a user can mountain join a screenplay, then points such as this

[[ reference: big-fight.fountain ]]
...
[[ /reference ]]
[[ reference: the-end.fountain ]]
...

would be equivalent to

[[ reference: big-fight.fountain ]]
...
[[ reference: the-end.fountain ]]
...

I can take a stab at implementing, although fair warning, my python skills are weak, the stabs wounds may be messy and ineffectual.

mjrusso commented 9 years ago

Great idea -- having mountain join always insert closing tags makes sense to me.

rnkn commented 3 years ago

Sorry to dust off something from the distant past; I actually use Makefiles for joining projects these days, so for the sake of housekeeping you can close this if you like.