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

Error when splitting without closing reference tag #3

Closed
rnkn opened this issue Oct 18, 2014 · 8 comments
Closed

Error when splitting without closing reference tag #3

rnkn opened this issue Oct 18, 2014 · 8 comments

Comments

@rnkn
Copy link

rnkn commented Oct 18, 2014

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:

  • screenplay-ref1.fountain:
# ACT I

= Meet the **Hero**.

  • screenplay-ref2.fountain:

FADE IN:

# ACT II

# ACT III

## Finale

  • the-end.fountain:

> 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
Copy link
Author

rnkn commented Oct 18, 2014

Let me know what you think of this Gist

@drusso
Copy link
Collaborator

drusso commented Oct 27, 2014

+1 for optional closing tags.

@mjrusso
Copy link
Owner

mjrusso commented Nov 7, 2014

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
Copy link
Author

rnkn commented Nov 7, 2014

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...

  • foo.fountain

FADE IN:

# ACT II

  • bar.fountain

## Finale

  • baz.fountain

> FADE OUT.

>THE END<

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

@mjrusso
Copy link
Owner

mjrusso commented Nov 8, 2014

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
Copy link
Author

rnkn commented Nov 9, 2014

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
Copy link
Owner

mjrusso commented Nov 11, 2014

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

@rnkn
Copy link
Author

rnkn commented Aug 29, 2021

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.

@rnkn rnkn closed this as completed Sep 18, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants