├── .gitignore ├── CITATION.cff ├── INSTALL.html ├── INSTALL.md ├── LICENSE ├── Makefile ├── NOTES.html ├── NOTES.md ├── README.md ├── TODO.html ├── TODO.md ├── about.html ├── about.md ├── cli.go ├── cli_docs.go ├── cli_test.go ├── cmd └── scripttool │ └── main.go ├── codemeta-about.tmpl ├── codemeta-bash-installer.tmpl ├── codemeta-cff.tmpl ├── codemeta-md.tmpl ├── codemeta-ps1-installer.tmpl ├── codemeta-version-go.tmpl ├── codemeta.json ├── convertions.go ├── css └── site.css ├── fountain-example.css ├── get-optional-testdata.bash ├── go.mod ├── go.sum ├── index.html ├── installer.ps1 ├── installer.sh ├── links-to-html.lua ├── man └── man1 │ └── scripttool.1 ├── page.tmpl ├── pagefind ├── fragment │ ├── en-us_22c354f.pf_fragment │ ├── en-us_39c0fba.pf_fragment │ ├── en-us_3b8d404.pf_fragment │ ├── en-us_553090c.pf_fragment │ ├── en-us_55e866e.pf_fragment │ ├── en-us_75d7b97.pf_fragment │ ├── en-us_8aed591.pf_fragment │ ├── en-us_9072f84.pf_fragment │ ├── en-us_961513d.pf_fragment │ ├── en-us_a138d21.pf_fragment │ ├── en-us_a5ba79c.pf_fragment │ ├── en-us_afb3777.pf_fragment │ ├── en-us_b16a7bf.pf_fragment │ ├── en-us_ba81728.pf_fragment │ ├── en-us_db50262.pf_fragment │ ├── en-us_e85f6ad.pf_fragment │ ├── en-us_f925602.pf_fragment │ ├── en_12a3a6a.pf_fragment │ ├── en_14a5709.pf_fragment │ ├── en_158e7cd.pf_fragment │ ├── en_1948cab.pf_fragment │ ├── en_1e2a8ed.pf_fragment │ ├── en_1f39143.pf_fragment │ ├── en_255e45f.pf_fragment │ ├── en_2852b16.pf_fragment │ ├── en_2facb9a.pf_fragment │ ├── en_357f36f.pf_fragment │ ├── en_39425f8.pf_fragment │ ├── en_39c0fba.pf_fragment │ ├── en_42fc4b6.pf_fragment │ ├── en_5479f72.pf_fragment │ ├── en_553090c.pf_fragment │ ├── en_5be4197.pf_fragment │ ├── en_5dff2da.pf_fragment │ ├── en_624383b.pf_fragment │ ├── en_6319532.pf_fragment │ ├── en_6ca1e74.pf_fragment │ ├── en_6df6c26.pf_fragment │ ├── en_6e71253.pf_fragment │ ├── en_7279c68.pf_fragment │ ├── en_75d7b97.pf_fragment │ ├── en_7a3f1d5.pf_fragment │ ├── en_8a877ab.pf_fragment │ ├── en_8aed591.pf_fragment │ ├── en_8b4e9e9.pf_fragment │ ├── en_961513d.pf_fragment │ ├── en_96f9ed7.pf_fragment │ ├── en_9991584.pf_fragment │ ├── en_9fc45d0.pf_fragment │ ├── en_a0c2cfd.pf_fragment │ ├── en_a5ba79c.pf_fragment │ ├── en_afb3777.pf_fragment │ ├── en_b16a7bf.pf_fragment │ ├── en_b52f7ba.pf_fragment │ ├── en_ba80611.pf_fragment │ ├── en_beb1385.pf_fragment │ ├── en_d9a9992.pf_fragment │ ├── en_deb2ee3.pf_fragment │ ├── en_e0e27c6.pf_fragment │ ├── en_f925602.pf_fragment │ ├── en_f9f2f12.pf_fragment │ ├── en_ff82e8e.pf_fragment │ └── en_ffaacac.pf_fragment ├── index │ ├── en-us_2499a6e.pf_index │ ├── en-us_3e8cda1.pf_index │ ├── en-us_6fa433c.pf_index │ ├── en-us_b29ca94.pf_index │ ├── en-us_b5dc3a2.pf_index │ ├── en-us_cc2f0b2.pf_index │ ├── en-us_e463079.pf_index │ ├── en_4d3a188.pf_index │ ├── en_77cbdc0.pf_index │ ├── en_9e73688.pf_index │ └── en_a5afd18.pf_index ├── pagefind-entry.json ├── pagefind-highlight.js ├── pagefind-modular-ui.css ├── pagefind-modular-ui.js ├── pagefind-ui.css ├── pagefind-ui.js ├── pagefind.en-us_1259a1251d43c.pf_meta ├── pagefind.en-us_1481db529d9e5.pf_meta ├── pagefind.en-us_3836a6e7e8520.pf_meta ├── pagefind.en-us_696b658f4ad09.pf_meta ├── pagefind.en-us_ad2baabbe46a7.pf_meta ├── pagefind.en-us_f0e748c2ed5fd.pf_meta ├── pagefind.en-us_f4b67663f92e1.pf_meta ├── pagefind.en_7d8f3159e1.pf_meta ├── pagefind.en_82e44ff7d1.pf_meta ├── pagefind.en_8d21f838a9.pf_meta ├── pagefind.en_d298c8931c.pf_meta ├── pagefind.js ├── wasm.en-us.pagefind ├── wasm.en.pagefind └── wasm.unknown.pagefind ├── publish.bash ├── release-notes.html ├── release-notes.md ├── release.bash ├── scripttool.1.html ├── scripttool.1.md ├── scripttool.go ├── scripttool_test.go ├── snap └── snapcraft.yaml ├── testdata.html ├── testdata.md ├── testdata ├── OSF-2.0.xml ├── Screenplay_Sample.osf ├── sample-01.fadein ├── sample-01.fdx ├── sample-01.fountain ├── sample-01.osf ├── sample-01.txt ├── sample-02.fadein ├── sample-02.fdx ├── sample-02.fountain ├── sample-02.osf ├── sample-02.txt ├── sample-03.fadein ├── sample-03.fdx ├── sample-03.fountain ├── sample-03.osf ├── sample-03.txt ├── sample-04.fadein ├── sample-04.fdx ├── sample-04.fountain ├── sample-04.osf ├── sample-04.txt ├── sample-05.fadein ├── sample-05.fdx ├── sample-05.fountain ├── sample-05.osf ├── sample-05.txt ├── sample-06.fadein ├── sample-06.fdx ├── sample-06.fountain ├── sample-06.txt ├── sample-07-characters.txt ├── sample-07.fountain ├── sample-08.fountain ├── testplay-01.fountain ├── testplay-01.trelby ├── testplay-01a.fdx ├── testplay-01b.fdx ├── testplay-02.fountain ├── testplay-02.trelby └── testplay-02.txt ├── user_manual.html ├── user_manual.md ├── version.go └── website.mak /.gitignore: -------------------------------------------------------------------------------- 1 | # Binaries for programs and plugins 2 | *.exe 3 | *.dll 4 | *.so 5 | *.dylib 6 | 7 | # Test binary, build with `go test -c` 8 | *.test 9 | 10 | # Output of the go coverage tool, specifically when used with LiteIDE 11 | *.out 12 | 13 | # Project-local glide cache, RE: https://github.com/Masterminds/glide/issues/736 14 | .glide/ 15 | 16 | # Project ignores 17 | bin/ 18 | dist/ 19 | testout/ 20 | testdata/Big-Fish.fdx 21 | testdata/Big-Fish.fountain 22 | testdata/Brick-&-Steel.fdx 23 | testdata/Brick-&-Steel.fountain 24 | testdata/The-Last-Birthday-Card.fdx 25 | testdata/The-Last-Birthday-Card.fountain 26 | *.bak 27 | -------------------------------------------------------------------------------- /CITATION.cff: -------------------------------------------------------------------------------- 1 | cff-version: 1.2.0 2 | message: "If you use this software, please cite it as below." 3 | type: software 4 | title: "scripttool" 5 | abstract: "A library and command line program for working with fdx 6 | (Final Draft XML), osf, Fade In and Fountain formatted Screen Play 7 | files." 8 | authors: 9 | - family-names: Doiel 10 | given-names: Robert 11 | orcid: "https://orcid.org/0000-0003-0900-6903" 12 | 13 | maintainers: 14 | - family-names: 15 | given-names: 16 | orcid: "" 17 | 18 | repository-code: "https://github.com/rsdoiel/scripttool" 19 | version: 0.0.10 20 | license-url: "https://spdx.org/licenses/AGPL-3.0-or-later" 21 | keywords: [ "Github", "text markup", "screen play" ] 22 | -------------------------------------------------------------------------------- /INSTALL.html: -------------------------------------------------------------------------------- 1 | 2 | 3 |
4 | 5 | 6 |scripttool is a command line program run from a shell like 32 | Bash. You can find compiled version in the releases
34 |This project can be installed via curl and sh for POSIX compatible 37 | systems. Enter the following in your shell.
38 |curl https://rsdoiel.github.io/scripttool/installer.sh | sh
39 | On Windows use the following Powershell command.
40 |irm https://rsdoiel.github.io/scripttool/installer.ps1 | iex
41 | This is generalized instructions for a release.
43 |Compiled versions are available for Mac OS (Intel and M1/M2 44 | processor, macOS-x86_64, macOS-arm64), Linux (Intel process, 45 | Linux-x86_64), Windows (Intel processor, Windows-x86_64), Raspberry Pi 46 | OS (arm7 32bit processor, RaspberryPiOS-arm7) and Pine64 (arm64 47 | processor, Linux-aarch64)
48 |VERSION_NUMBER is a semantic version 49 | number (e.g. v0.1.2)
50 |For all the released version go to the project page on GitHub and 51 | click latest release
52 |53 |55 |https://github.com/rsdoiel/scripttool/releases/latest
54 |
Platform | 59 |Zip Filename | 60 |
---|---|
Windows | 65 |scripttool-VERSION_NUMBER-Windows-x86_64.zip | 66 |
Mac OS (Intel) | 69 |scripttool-VERSION_NUMBER-macOS-x86_64.zip | 70 |
Mac OS (M1,M2) | 73 |scripttool-VERSION_NUMBER-macOS-arm64.zip | 74 |
Linux/Intel | 77 |scripttool-VERSION_NUMBER-Linux-x86_64.zip | 78 |
Raspberry Pi | 81 |scripttool-VERSION_NUMBER-RaspberryPiOS-arm7.zip | 82 |
Pine64 | 85 |scripttool-VERSION_NUMBER-Linux-aarch64.zip | 86 |
Here’s an example of the commands run in the Terminal App after 120 | downloading the zip file.
121 | cd Downloads/
122 | unzip scripttool-*-macOS-x86_64.zip
123 | mkdir -p $HOME/bin
124 | cp -v bin/* $HOME/bin/
125 | export PATH=$HOME/bin:$PATH
126 | scripttool -version
127 | Here’s an example of the commands run in from the Bash shell on 135 | Windows 10 after downloading the zip file.
136 | cd Downloads/
137 | unzip scripttool-*-Windows-x86_64.zip
138 | mkdir -p $HOME/bin
139 | cp -v bin/* $HOME/bin/
140 | export PATH=$HOME/bin:$PATH
141 | scripttool -version
142 | Here’s an example of the commands run in from the Bash shell after 150 | downloading the zip file.
151 | cd Downloads/
152 | unzip scripttool-*-Linux-x86_64.zip
153 | mkdir -p $HOME/bin
154 | cp -v bin/* $HOME/bin/
155 | export PATH=$HOME/bin:$PATH
156 | scripttool -version
157 | Released version is for a Raspberry Pi 3 or later use (i.e. requires 159 | ARM 7 support).
160 |Here’s an example of the commands run in from the Bash shell after 167 | downloading the zip file.
168 | cd Downloads/
169 | unzip scripttool-*-RaspberryPiOS-arm7.zip
170 | mkdir -p $HOME/bin
171 | cp -v bin/* $HOME/bin/
172 | export PATH=$HOME/bin:$PATH
173 | scripttool -version
174 | scripttool is “go gettable”. Use the “go get” command to 176 | download the dependent packages as well as scripttool’s source 177 | code.
178 | go get -u github.com/rsdoiel/scripttool/...
179 | Or clone the repository and then compile
180 | cd
181 | git clone https://github.com/rsdoiel/scripttool src/github.com/rsdoiel/scripttool
182 | cd src/github.com/rsdoiel/scripttool
183 | make
184 | make test
185 | make install
186 | { “scripttool”: “A program for converting screen play formats” }
31 |scripttool fountain2json testdata/sample-07.fountain
scripttool characters testdata/sample-07.fountain
A library and command line program for working with fdx (Final Draft 41 | XML), osf, Fade In and Fountain formatted Screen Play files.
42 |A tool for working with screenplay file formats (e.g. fdx, fountain, 38 | osf, FadeIn).
39 |Convert from screenplay.fdx to 42 | screenplay.fountain
43 | scripttool fdx2fountain screenplay.fdx screenplay.fountain
44 | Convert from screenplay.fadein to 45 | screenplay.fountain
46 | scripttool fadein2fountain screenplay.fadein screenplay.fountain
47 | Convert from screenplay.osf to 48 | screenplay.fountain
49 | scripttool osf2fountain screenplay.osf screenplay.fountain
50 | Pretty print fountain files
52 | scripttool fountainfmt screenplay.fountain
53 | Render a fountain file as JSON
54 | scripttool fountain2json screenplay.fountain
55 | Convert from screenplay.fountain to 57 | screenplay.fdx
58 | scripttool fountain2fdx screenplay.fountain screenplay.fdx
59 | Convert from screenplay.fountain to 60 | screenplay.fadein
61 | scripttool fountain2fadein screenplay.fountain screenplay.fadein
62 | Convert from screenplay.fountain to 63 | screenplay.osf
64 | scripttool fountain2osf screenplay.fountain screenplay.osf
65 | NOTE: Currently only fountain documents are supported for reporting. 67 | Currently the character list report is implemented as a proof of 68 | concept.
69 |List the characters in screenplay.fountain
70 | scripttool characters screenplay.fountain
71 | This release is mostly a code re-organization due to changes in how
34 | Go 1.18 supports modules. The packages osf, fountain, and fdx are now
35 | part of the scripttool. The modules are largely stable. It’s been years
36 | since I’ve changed them. The scripttool itself has bee restructure. A
37 | major change is the command line syntax. I am now using a
38 | scripttool [-help|-version|-license] VERB [OPTIONS] [ADDITIONAL_PARAMETERS]
.
39 | Each “verb” can have its own set of options and they come after the
40 | “verb” before it expected additional parameters.
The build process for source code and website have been significantly 42 | updated. I’m using Pandoc and pdtk to build the website. The old 43 | Makefile and Python scripts have been replace by a two new Makefile 44 | (i.e. Makefile, website.mak).
45 |In the scripttool
command the “characters” verb will
46 | list the characters found in a fountain formatted screenplay. By default
47 | it is order of appearance but there is now an option -alpha
48 | for alphabetical sorts.
scripttool
32 |scripttool [-help,-version,-license] VERB OPTIONS [VERB PARAMETERS]
35 |scripttool a program for converting between screenplay 37 | formats (e.g. .fdx, .fadein, .fountain)
38 |scripttool converts screen play file formats. Supported 39 | formats include FileDraft’s XML format, FadeIn’s zipped XML format, 40 | Fountain formatted plain text as the Open Screenplay Format XML 41 | documents. The command line program is based on a Go package also called 42 | scripttool. The Go package can be compiled to a shared library and 43 | integrated with Python via the ctypes package.
44 |Internally scripttool works with Fountain formatter files
45 | for reporting purposes. You can use the fountain2json
verb
46 | to see the data structure represented as JSON for reports.
Like many recent command line tools running under POSIX
49 | scripttool uses a
50 | CMD VERB [INPUT_FILENAME] [OUTPUT_FILENAME]
scheme. The
51 | following verbs are provided. Each “verb” may also have related
52 | options.
Below are a set of options available.
145 |Converting screenplay.fdx to screenplay.fountain (2 208 | examples)
209 | scripttool fdx2fountain screenplay.fdx screenplay.fountain
210 | scripttool fdx2fountain -i screenplay.fdx -o screenplay.fountain
211 | Converting screenplay.fountain to screenplay.fdx (2 212 | examples)
213 | scripttool fountain2fdx screenplay.fountain screenplay.fdx
214 | scripttool fountain2fdx -i screenplay.fountain -o screenplay.fdx
215 | Listing characters from a screenplay.fountain. First list is 216 | order of appearence and the second set is characters sorted 217 | alphabetically using the “-alpha” option.
218 | scripttool characters screenplay.fountain
219 | scripttool characters -alpha screenplay.fountain
220 | The testing data for scripttool and its sub-packages fountain, fdx 32 | and osf are held in common in this repository’s testdata 33 | directory.
34 |The fountain website has some good
35 | files for reviewing formatting difference between fountain, fdx and PDF.
36 | Some are referenced in the test programs but they are optional. It is
37 | not clear to me the licensing arrangements for the text so I have not
38 | included them in this repository. You can use the bash script
39 | get-optional-testdata.bash
to retrieve them from the
40 | fountain.io website.
If you want to include them in the test sequence go to the fountain
42 | website and download them and place them in the testdata
43 | directory. When you run go test
they will be found and
44 | included in the basic test process.