Live demo here.
Share a nicely formatted diff of 2 fountain files.
Some apps (like Highland 2) will allow you to track changes and compare differences between versions, but I wanted a way to generate a diff that I could send to any reader and allow them to view with just a web browser.
I considered just using GitHub gists, but they don't wrap and indent text of fountain files in a very readable way.
I also added a few bells and whistles like printing line numbers (so reviewers could comment to the effect of "(123) this line is awkward") and linking to line numbers with #anchors
.
- handle boneyard and bracket comments
- upload and generate URL with diff script
- add scene numbers
- goto next / prev change shortcuts
(1) Generate the diff:
lines=50000
git --no-pager diff --no-index "-U$lines" \
older.fountain \
newer.fountain \
| pbcopy
# OR, use `fountain-diff.sh`
(2) Paste into a GitHub gist.
(3) Get the raw
URL for the gist and load it into the form.
./serve_dev.py # python3 script to serve index.html