├── .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 | R. S. Doiel, Software Engineer/Analyst - INSTALL 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 26 | 27 |
28 | 29 | 30 |

Installation

31 |

scripttool is a command line program run from a shell like 32 | Bash. You can find compiled version in the releases

34 |

Quick install via curl or 35 | irm

36 |

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 |

Compiled version

42 |

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 |

https://github.com/rsdoiel/scripttool/releases/latest

54 |
55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 |
PlatformZip Filename
Windowsscripttool-VERSION_NUMBER-Windows-x86_64.zip
Mac OS (Intel)scripttool-VERSION_NUMBER-macOS-x86_64.zip
Mac OS (M1,M2)scripttool-VERSION_NUMBER-macOS-arm64.zip
Linux/Intelscripttool-VERSION_NUMBER-Linux-x86_64.zip
Raspberry Piscripttool-VERSION_NUMBER-RaspberryPiOS-arm7.zip
Pine64scripttool-VERSION_NUMBER-Linux-aarch64.zip
89 |

The basic recipe

90 | 111 |

Mac OS

112 |
    113 |
  1. Download the zip file
  2. 114 |
  3. Unzip the zip file
  4. 115 |
  5. Copy the executable to $HOME/bin (or a folder in your path)
  6. 116 |
  7. Make sure the new location in in our path
  8. 117 |
  9. Test
  10. 118 |
119 |

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 |

Windows

128 |
    129 |
  1. Download the zip file
  2. 130 |
  3. Unzip the zip file
  4. 131 |
  5. Copy the executable to $HOME/bin (or a folder in your path)
  6. 132 |
  7. Test
  8. 133 |
134 |

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 |

Linux

143 |
    144 |
  1. Download the zip file
  2. 145 |
  3. Unzip the zip file
  4. 146 |
  5. Copy the executable to $HOME/bin (or a folder in your path)
  6. 147 |
  7. Test
  8. 148 |
149 |

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 |

Raspberry Pi OS

158 |

Released version is for a Raspberry Pi 3 or later use (i.e. requires 159 | ARM 7 support).

160 |
    161 |
  1. Download the zip file
  2. 162 |
  3. Unzip the zip file
  4. 163 |
  5. Copy the executable to $HOME/bin (or a folder in your path)
  6. 164 |
  7. Test
  8. 165 |
166 |

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 |

Compiling from source

175 |

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 |
187 | 188 | 190 | 191 | 192 | 193 | -------------------------------------------------------------------------------- /INSTALL.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: scripttool installation 3 | --- 4 | 5 | Installation 6 | ============ 7 | 8 | *scripttool* is a command line program run from a shell like Bash. You can find compiled version in the [releases](https://github.com/rsdoiel/scripttool/releases/latest) 9 | 10 | ## Quick install via curl or irm 11 | 12 | This project can be installed via curl and sh for POSIX compatible systems. 13 | Enter the following in your shell. 14 | 15 | ~~~ 16 | curl https://rsdoiel.github.io/scripttool/installer.sh | sh 17 | ~~~ 18 | 19 | On Windows use the following Powershell command. 20 | 21 | ~~~ 22 | irm https://rsdoiel.github.io/scripttool/installer.ps1 | iex 23 | ~~~ 24 | 25 | Compiled version 26 | ---------------- 27 | 28 | This is generalized instructions for a release. 29 | 30 | Compiled versions are available for Mac OS (Intel and M1/M2 processor, macOS-x86_64, macOS-arm64), 31 | Linux (Intel process, Linux-x86_64), Windows (Intel processor, Windows-x86_64), 32 | Raspberry Pi OS (arm7 32bit processor, RaspberryPiOS-arm7) and Pine64 (arm64 processor, Linux-aarch64) 33 | 34 | VERSION\_NUMBER is a [semantic version number](http://semver.org/) (e.g. v0.1.2) 35 | 36 | 37 | For all the released version go to the project page on GitHub and click latest release 38 | 39 | > https://github.com/rsdoiel/scripttool/releases/latest 40 | 41 | 42 | | Platform | Zip Filename | 43 | |----------------|-------------------------------------------------| 44 | | Windows | scripttool-VERSION_NUMBER-Windows-x86_64.zip | 45 | | Mac OS (Intel) | scripttool-VERSION_NUMBER-macOS-x86_64.zip | 46 | | Mac OS (M1,M2) | scripttool-VERSION_NUMBER-macOS-arm64.zip | 47 | | Linux/Intel | scripttool-VERSION_NUMBER-Linux-x86_64.zip | 48 | | Raspberry Pi | scripttool-VERSION_NUMBER-RaspberryPiOS-arm7.zip | 49 | | Pine64 | scripttool-VERSION_NUMBER-Linux-aarch64.zip | 50 | 51 | 52 | The basic recipe 53 | ---------------- 54 | 55 | + Find the Zip file listed matching the architecture you're running and download it 56 | + (e.g. if you're on a Windows 10 laptop/Surface with a amd64 style CPU you'd choose the Zip file with "windows-amd64" in the name). 57 | + Download the zip file and unzip the file. 58 | + Copy the contents of the folder named "bin" to a folder that is in your path 59 | + (e.g. "$HOME/bin" is common). 60 | + Adjust your PATH if needed 61 | + (e.g. export PATH="$HOME/bin:$PATH") 62 | + Test 63 | 64 | 65 | ### Mac OS 66 | 67 | 1. Download the zip file 68 | 2. Unzip the zip file 69 | 3. Copy the executable to $HOME/bin (or a folder in your path) 70 | 4. Make sure the new location in in our path 71 | 5. Test 72 | 73 | Here's an example of the commands run in the Terminal App after downloading the 74 | zip file. 75 | 76 | ```shell 77 | cd Downloads/ 78 | unzip scripttool-*-macOS-x86_64.zip 79 | mkdir -p $HOME/bin 80 | cp -v bin/* $HOME/bin/ 81 | export PATH=$HOME/bin:$PATH 82 | scripttool -version 83 | ``` 84 | 85 | ### Windows 86 | 87 | 1. Download the zip file 88 | 2. Unzip the zip file 89 | 3. Copy the executable to $HOME/bin (or a folder in your path) 90 | 4. Test 91 | 92 | Here's an example of the commands run in from the Bash shell on Windows 10 after 93 | downloading the zip file. 94 | 95 | ```shell 96 | cd Downloads/ 97 | unzip scripttool-*-Windows-x86_64.zip 98 | mkdir -p $HOME/bin 99 | cp -v bin/* $HOME/bin/ 100 | export PATH=$HOME/bin:$PATH 101 | scripttool -version 102 | ``` 103 | 104 | 105 | ### Linux 106 | 107 | 1. Download the zip file 108 | 2. Unzip the zip file 109 | 3. Copy the executable to $HOME/bin (or a folder in your path) 110 | 4. Test 111 | 112 | Here's an example of the commands run in from the Bash shell after 113 | downloading the zip file. 114 | 115 | ```shell 116 | cd Downloads/ 117 | unzip scripttool-*-Linux-x86_64.zip 118 | mkdir -p $HOME/bin 119 | cp -v bin/* $HOME/bin/ 120 | export PATH=$HOME/bin:$PATH 121 | scripttool -version 122 | ``` 123 | 124 | 125 | ### Raspberry Pi OS 126 | 127 | Released version is for a Raspberry Pi 3 or later use (i.e. requires ARM 7 support). 128 | 129 | 1. Download the zip file 130 | 2. Unzip the zip file 131 | 3. Copy the executable to $HOME/bin (or a folder in your path) 132 | 4. Test 133 | 134 | Here's an example of the commands run in from the Bash shell after 135 | downloading the zip file. 136 | 137 | ```shell 138 | cd Downloads/ 139 | unzip scripttool-*-RaspberryPiOS-arm7.zip 140 | mkdir -p $HOME/bin 141 | cp -v bin/* $HOME/bin/ 142 | export PATH=$HOME/bin:$PATH 143 | scripttool -version 144 | ``` 145 | 146 | 147 | Compiling from source 148 | --------------------- 149 | 150 | _scripttool_ is "go gettable". Use the "go get" command to download the dependent packages 151 | as well as _scripttool_'s source code. 152 | 153 | ```shell 154 | go get -u github.com/rsdoiel/scripttool/... 155 | ``` 156 | 157 | Or clone the repository and then compile 158 | 159 | ```shell 160 | cd 161 | git clone https://github.com/rsdoiel/scripttool src/github.com/rsdoiel/scripttool 162 | cd src/github.com/rsdoiel/scripttool 163 | make 164 | make test 165 | make install 166 | ``` 167 | 168 | 169 | -------------------------------------------------------------------------------- /NOTES.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | R. S. Doiel, Software Engineer/Analyst - NOTES 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 26 | 27 |
28 | 29 | 30 |

Misc dev notes

31 | 40 |
41 | 42 | 44 | 45 | 46 | 47 | -------------------------------------------------------------------------------- /NOTES.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: scripttool, a program for converting screen play formats 3 | --- 4 | 5 | # Misc dev notes 6 | 7 | + [Courier Prime](https://quoteunquoteapps.com/courierprime/) - 8 | + [Scrippets](https://wordpress.org/plugins/wp-scrippets/) - a WP plugin for fountain fragments 9 | + John Augusts's Scrippets [Call to Coders](https://johnaugust.com/2008/scrippets-php-and-a-call-to-coders) 10 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | 2 | [![Project Status: Active – The project has reached a stable, usable state and is being actively developed.](https://www.repostatus.org/badges/latest/active.svg)](https://www.repostatus.org/#active) 3 | 4 | [![Get it from the Snap Store](https://snapcraft.io/static/images/badges/en/snap-store-white.svg)](https://snapcraft.io/scripttool) 5 | 6 | scripttool 7 | ========== 8 | 9 | A tool for working with screenplay file formats (e.g. fdx, fountain, osf, FadeIn). 10 | 11 | Converting to fountain format 12 | ----------------------------- 13 | 14 | Convert from *screenplay.fdx* to *screenplay.fountain* 15 | 16 | ~~~shell 17 | scripttool fdx2fountain screenplay.fdx screenplay.fountain 18 | ~~~ 19 | 20 | Convert from *screenplay.fadein* to *screenplay.fountain* 21 | 22 | ~~~shell 23 | scripttool fadein2fountain screenplay.fadein screenplay.fountain 24 | ~~~ 25 | 26 | Convert from *screenplay.osf* to *screenplay.fountain* 27 | 28 | ~~~shell 29 | scripttool osf2fountain screenplay.osf screenplay.fountain 30 | ~~~ 31 | 32 | 33 | Working with fountain files 34 | --------------------------- 35 | 36 | Pretty print fountain files 37 | 38 | ~~~shell 39 | scripttool fountainfmt screenplay.fountain 40 | ~~~ 41 | 42 | Render a fountain file as JSON 43 | 44 | ~~~shell 45 | scripttool fountain2json screenplay.fountain 46 | ~~~ 47 | 48 | 49 | Convert from fountain format 50 | ---------------------------- 51 | 52 | Convert from *screenplay.fountain* to *screenplay.fdx* 53 | 54 | ~~~shell 55 | scripttool fountain2fdx screenplay.fountain screenplay.fdx 56 | ~~~ 57 | 58 | Convert from *screenplay.fountain* to *screenplay.fadein* 59 | 60 | ~~~shell 61 | scripttool fountain2fadein screenplay.fountain screenplay.fadein 62 | ~~~ 63 | 64 | Convert from *screenplay.fountain* to *screenplay.osf* 65 | 66 | ~~~shell 67 | scripttool fountain2osf screenplay.fountain screenplay.osf 68 | ~~~ 69 | 70 | 71 | 72 | Script Reports 73 | -------------- 74 | 75 | NOTE: Currently only fountain documents are supported for reporting. Currently the character list report is implemented as a proof of concept. 76 | 77 | List the characters in *screenplay.fountain* 78 | 79 | ~~~shell 80 | scripttool characters screenplay.fountain 81 | ~~~ 82 | 83 | -------------------------------------------------------------------------------- /TODO.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | R. S. Doiel, Software Engineer/Analyst - TODO 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 26 | 27 |
28 | 29 | 30 |

{ “scripttool”: “A program for converting screen play formats” }

31 |

Action Items

32 |

Bugs

33 | 43 |

Next

44 | 96 |

Someday, Maybe

97 | 119 | 120 | 134 |
135 | 136 | 138 | 139 | 140 | 141 | -------------------------------------------------------------------------------- /TODO.md: -------------------------------------------------------------------------------- 1 | { 2 | "scripttool": "A program for converting screen play formats" 3 | } 4 | 5 | Action Items 6 | ============ 7 | 8 | Bugs 9 | ---- 10 | 11 | - [ ] fountain parser is miss-identifying some elements as character when they are things like scene headings. This should up in JSON output and characters report, see testdata/sample-07.fountain for example of bug 12 | - `scripttool fountain2json testdata/sample-07.fountain` 13 | - `scripttool characters testdata/sample-07.fountain` 14 | 15 | 16 | Next 17 | ---- 18 | 19 | + [x] fountain2html 20 | + [x] fountain2json 21 | + [x] fountain2fdx (Fountain to Final Draft XML) 22 | + [x] fountain2osf (Fountain to Open Screenplay Format 1.2,2.0) 23 | + [x] fdx2fountain (build on fdx2txt in [fdx](https://github.com/rsdoiel/fdx), handle TitlePage better) 24 | + [x] fdx2osf (Final Draft XML to Open Screenplay Format 1.2,2.0 XML) 25 | + [x] osf2fdx (Open Screenplay Format 1.2,2.0 XML to Final Draft XML) 26 | + [x] osf2fountain (Open Screenplay Format 1.2,2.0 XML to Fountain) 27 | + [x] fountain2fadein, fadein2fountain 28 | + [ ] edit (simple line oriented editor with colorization for Fountain/Markdown) 29 | + auto-convert to/fountain on open 30 | + auto-convert from fountain to origin version on save 31 | + timed-autosave 32 | + backup original files 33 | + [ ] headings - report the headings as a outline 34 | + [ ] scenes - report the number of scenes, order and estimate time 35 | + [ ] lines - report line count 36 | + [ ] words - report word count 37 | + [ ] character - report character count 38 | + [ ] outline (OPML) to scenes/chapters 39 | + [ ] notes, sections and synopsis 40 | + [ ] eprints like metadata for the script 41 | + [ ] Story timeline (using stn) for temporal story outlines 42 | + [ ] Scene beat report, summaries per scene happenings (who speaks, description, estimated running time) 43 | + [ ] Search/indexing for script and related assets 44 | 45 | 46 | Someday, Maybe 47 | -------------- 48 | 49 | + [ ] GUI for managing a screenplay project (like Scrivener but GTK based so as can running under Linux) 50 | + [ ] PDF generation from various formats (possibly via Pandoc) 51 | + [ ] write and fountain2html, fdx2html, osf2html, fadein2html using [scrippets](https://fountain.io/scrippets) approach 52 | + [ ] Create a fountain text to speech script reader 53 | + [ ] Should support configuration for assigning voices to different characters 54 | + [ ] fountain2trelby 55 | + [ ] osf2trelby 56 | + [ ] fdx2trelby 57 | + [ ] trelby2fdx 58 | + [ ] trelby2fountain 59 | + [ ] trelby2osf 60 | 61 | Reference Links 62 | --------------- 63 | 64 | + [gofpdf](https://github.com/jung-kurt/gofpdf) - Kurt Jung's Go implementation of fpdf 65 | + [Fountain](https://fountain.io) 66 | + [Open Screenplay Format 2.0](https://sourceforge.net/projects/openscrfmt/) 67 | + [Open Screenplay Format 2.1](https://github.com/severdia/Open-Screenplay-Format) 68 | + [Screenbox HTML and CSS](https://johnaugust.com/2004/screenbox) is some CSS for marking up HTML classes hand presenting a script section in an HTML page 69 | + [scrippets Wordpress Plugin](https://wordpress.org/plugins/wp-scrippets/), scrippets.org website appears gone. 70 | 71 | -------------------------------------------------------------------------------- /about.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | R. S. Doiel, Software Engineer/Analyst - about 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 26 | 27 |
28 | 29 | 30 |

About this software

31 |

scripttool 0.0.10

32 |

Authors

33 | 36 |

Maintainers

37 | 40 |

A library and command line program for working with fdx (Final Draft 41 | XML), osf, Fade In and Fountain formatted Screen Play files.

42 | 50 |

Programming languages

51 | 54 |
55 | 56 | 58 | 59 | 60 | 61 | -------------------------------------------------------------------------------- /about.md: -------------------------------------------------------------------------------- 1 | --- 2 | cff-version: 1.2.0 3 | message: "If you use this software, please cite it as below." 4 | type: software 5 | title: "scripttool" 6 | abstract: "A library and command line program for working with fdx 7 | (Final Draft XML), osf, Fade In and Fountain formatted Screen Play 8 | files." 9 | authors: 10 | - family-names: Doiel 11 | given-names: Robert 12 | orcid: "https://orcid.org/0000-0003-0900-6903" 13 | 14 | repository-code: "https://github.com/rsdoiel/scripttool" 15 | version: 0.0.10 16 | license-url: "https://spdx.org/licenses/AGPL-3.0-or-later" 17 | keywords: [ "Github", "text markup", "screen play" ] 18 | 19 | --- 20 | 21 | About this software 22 | =================== 23 | 24 | ## scripttool 0.0.10 25 | 26 | ### Authors 27 | 28 | - Robert Doiel 29 | 30 | 31 | ### Maintainers 32 | 33 | - 34 | 35 | A library and command line program for working with fdx (Final Draft 36 | XML), osf, Fade In and Fountain formatted Screen Play files. 37 | 38 | - License: 39 | - GitHub: 40 | - Issues: 41 | 42 | 43 | ### Programming languages 44 | 45 | - Go 46 | 47 | 48 | -------------------------------------------------------------------------------- /cli.go: -------------------------------------------------------------------------------- 1 | package scripttool 2 | 3 | import ( 4 | "flag" 5 | "fmt" 6 | "os" 7 | "path" 8 | "strings" 9 | 10 | // My packages 11 | "github.com/rsdoiel/fountain" 12 | ) 13 | 14 | func FmtCliText(s string, appName string, verb string, version string) string { 15 | return strings.ReplaceAll(strings.ReplaceAll(strings.ReplaceAll(s, "{app_name}", appName), "{verb}", verb), "{version}", version) 16 | } 17 | 18 | func FmtCliHelp(appName string, verb string) string { 19 | return fmt.Sprintf("%s %s is not documented", appName, verb) 20 | } 21 | 22 | func RunScripttool(in *os.File, out *os.File, eout *os.File, args []string) error { 23 | var ( 24 | // Options 25 | showHelp bool 26 | inputFName string 27 | outputFName string 28 | alphaSort bool 29 | 30 | err error 31 | ) 32 | 33 | appName := path.Base(args[0]) 34 | if len(args) == 1 { 35 | return fmt.Errorf("%s", FmtCliText(HelpText, appName, "", Version)) 36 | } 37 | 38 | verb := strings.ToLower(strings.TrimSpace(args[1])) 39 | 40 | // Standard flags 41 | flagSet := flag.NewFlagSet(fmt.Sprintf("%s.%s", appName, verb), flag.ExitOnError) 42 | flagSet.BoolVar(&showHelp, "h", false, "display verb help") 43 | flagSet.BoolVar(&showHelp, "help", false, "display verb help") 44 | flagSet.StringVar(&inputFName, "i", "", "set input filename") 45 | flagSet.StringVar(&outputFName, "o", "", "set output filename") 46 | flagSet.BoolVar(&fountain.ShowNotes, "notes", false, "include notes in output") 47 | flagSet.BoolVar(&fountain.ShowSynopsis, "synopsis", false, "include synopsis in output") 48 | flagSet.BoolVar(&fountain.ShowSection, "section", false, "include section headings in output") 49 | flagSet.IntVar(&fountain.MaxWidth, "width", fountain.MaxWidth, "set width in integers") 50 | flagSet.BoolVar(&fountain.AsHTMLPage, "html", false, "output as HTML") 51 | flagSet.BoolVar(&fountain.InlineCSS, "inline-css", false, "include inline CSS") 52 | flagSet.BoolVar(&fountain.LinkCSS, "link-css", false, "include CSS link") 53 | flagSet.BoolVar(&fountain.PrettyPrint, "pretty", false, "prety print output") 54 | flagSet.BoolVar(&alphaSort, "alpha", false, "sort a character list alpha betically versus order of appearence") 55 | flagSet.Parse(args[2:]) 56 | args = flagSet.Args() 57 | 58 | if showHelp { 59 | fmt.Fprintln(out, FmtCliHelp(appName, verb)) 60 | return nil 61 | } 62 | 63 | if inputFName == "" && len(args) >= 1 { 64 | inputFName = args[0] 65 | } 66 | if outputFName == "" && len(args) >= 2 { 67 | outputFName = args[1] 68 | } 69 | 70 | // Figure out if we need to open files or use in, out, eout 71 | if inputFName != "" && inputFName != "-" { 72 | in, err = os.Open(inputFName) 73 | if err != nil { 74 | return err 75 | } 76 | defer in.Close() 77 | } 78 | 79 | if outputFName != "" && outputFName != "-" { 80 | out, err = os.Create(outputFName) 81 | if err != nil { 82 | return err 83 | } 84 | defer out.Close() 85 | } 86 | 87 | switch verb { 88 | // fadein to something 89 | case "fadein2fdx": 90 | if inputFName != "" { 91 | return FadeInToFDX(inputFName, out) 92 | } 93 | return fmt.Errorf("A FadeIn filename required for input") 94 | case "fadein2fountain": 95 | if inputFName != "" { 96 | return FadeInToFountain(inputFName, out) 97 | } 98 | return fmt.Errorf("A FadeIn filename required for input") 99 | case "fadein2json": 100 | if inputFName != "" { 101 | return FadeInToJSON(inputFName, out) 102 | 103 | } 104 | return fmt.Errorf("A FadeIn filename required for input") 105 | case "fadein2yaml": 106 | if inputFName != "" { 107 | return FadeInToYAML(inputFName, out) 108 | } 109 | case "fadein2osf": 110 | if inputFName != "" { 111 | return FadeInToOSF(inputFName, out) 112 | 113 | } 114 | return fmt.Errorf("A FadeIn filename required for input") 115 | 116 | // fdx to something 117 | case "fdx2fadein": 118 | if outputFName != "" { 119 | return FdxToFadeIn(in, outputFName) 120 | } 121 | return fmt.Errorf("A FadeIn filename required for output") 122 | case "fdx2fountain": 123 | return FdxToFountain(in, out) 124 | case "fdx2json": 125 | return FdxToJSON(in, out) 126 | case "fdx2yaml": 127 | return FdxToYAML(in, out) 128 | case "fdx2osf": 129 | return FdxToOSF(in, out) 130 | 131 | // fountain to something 132 | case "fountain2fadein": 133 | if outputFName != "" { 134 | return FountainToFadeIn(in, outputFName) 135 | } 136 | return fmt.Errorf("A FadeIn filename required for output") 137 | case "fountain2fdx": 138 | return FountainToFdx(in, out) 139 | case "fountain2json": 140 | return FountainToJSON(in, out) 141 | case "fountain2yaml": 142 | return FountainToYAML(in, out) 143 | case "fountain2osf": 144 | return FountainToOSF(in, out) 145 | 146 | // osf to something 147 | case "osf2fadein": 148 | if outputFName != "" { 149 | return OSFToFadeIn(in, outputFName) 150 | } 151 | return fmt.Errorf("A FadeIn filename required for output") 152 | case "osf2fdx": 153 | return OSFToFdx(in, out) 154 | case "osf2fountain": 155 | return OSFToFountain(in, out) 156 | case "osf2json": 157 | return OSFToJSON(in, out) 158 | case "osf2yaml": 159 | return OSFToYAML(in, out) 160 | 161 | // Utility fountain functions 162 | case "fountain2fountain": 163 | return FountainToFountain(in, out) 164 | case "fountainfmt": 165 | return FountainFmt(in, out) 166 | case "fountain2html": 167 | return FountainToHTML(in, out) 168 | case "characters": 169 | //FIXME: add detection of file type, convert to fountain then 170 | // run report. 171 | return CharacterList(in, out, alphaSort) 172 | 173 | // Help system 174 | case "help": 175 | fmt.Fprintln(out, FmtCliText(HelpText, appName, verb, Version)) 176 | return nil 177 | 178 | // If we got this far we have an unknown verb 179 | default: 180 | return fmt.Errorf("do not understand %q in %q", verb, strings.Join(args, " ")) 181 | } 182 | return nil 183 | } 184 | -------------------------------------------------------------------------------- /cli_docs.go: -------------------------------------------------------------------------------- 1 | package scripttool 2 | 3 | const ( 4 | HelpText = `% scripttool(1) scripttool user manual 5 | % R. S. Doiel 6 | % Augest 4, 2022 7 | 8 | # NAME 9 | 10 | scripttool 11 | 12 | # SYNOPSIS 13 | 14 | scripttool [-help,-version,-license] VERB [OPTIONS] [VERB PARAMETERS] 15 | 16 | 17 | # DESCRIPTION 18 | 19 | _scripttool_ a program for converting between screenplay formats (e.g. .fdx, .fadein, .fountain) 20 | 21 | _scripttool_ converts screen play file formats. Supported formats include FileDraft's XML format, FadeIn's zipped XML format, Fountain formatted plain text as the Open Screenplay Format XML documents. The command line program is based on a Go package also called scripttool. The Go package can be compiled to a shared library and integrated with Python via the ctypes package. 22 | 23 | Internally _scripttool_ works with Fountain formatter files for reporting purposes. You can use the ` + "`" + `fountain2json` + "`" + ` verb to see the data structure represented as JSON for reports. 24 | 25 | # verbs 26 | 27 | Like many recent command line tools running under POSIX _scripttool_ uses 28 | a ` + "`" + `CMD VERB [INPUT_FILENAME] [OUTPUT_FILENAME]` + "`" + ` scheme. The following verbs are provided. Each "verb" may also have related options. 29 | 30 | ## Convert FadeIn files 31 | 32 | fadein2fdx 33 | : Converts a FadeIn file to Final Draft XML 34 | 35 | fadein2fountain 36 | : Converts a FadeIn file to fountain screenplay format 37 | 38 | fadein2json 39 | : Convert a FadeIn file to JSON format 40 | 41 | fadein2osf 42 | : Convert a FadeIn file to Open Screenplay Format 2.0 43 | 44 | ## Convert Final Draft XML 45 | 46 | fdx2fadein 47 | : Convert from Final Draft XML ("*.fdx" files) to FadeIn format 48 | 49 | fdx2fountain 50 | : Convert from Final Draft XML ("*.fdx" files) to Fountain screenplay format) 51 | 52 | fdx2json 53 | : Convert from Final Draft XML ("*.fdx" files) to JSON 54 | 55 | fdx2osf 56 | : Convert from Final Draft XML ("*.fdx" files) to Open Screenplay Format 2.0 57 | 58 | ## Convert Open Screenplay Format 2.0 59 | 60 | osf2fadein 61 | : Convert from Open Screenplay Format 2.0 to FadeIn 62 | 63 | osf2fdx 64 | : Convert from Open Screenplay Format 2.0 to Final Draft XML 65 | 66 | osf2fountain 67 | : Convert from Open Screenplay Format 2.0 to Fountain screenplay format 68 | 69 | osf2json 70 | : Convert from Open Screenplay Format 2.0 to JSON 71 | 72 | ## Convert Fountain fomat 73 | 74 | fountain2fadein 75 | : Converts a fountain screenplay formatted file to FadeIn formatted file. 76 | 77 | fountain2fdx 78 | : Convert a Fountain screenplay formatted file to Final Draft XML 79 | 80 | fountain2json 81 | : Convert a Fountain screenplay formatted file to JSON 82 | 83 | fountain2osf 84 | : Convert a Fountain screenplay formatted file to Open Screenplay Format 2.0 85 | 86 | fountainfmt 87 | : Pretty print a fountain screenplay format 88 | 89 | characters 90 | : Provide a character list from a fountain formatted file. Internally the fountain file is parse and resulting JSON structure is analyzed to produce the count of character references in the elements of the file. 91 | 92 | 93 | 94 | # OPTIONS 95 | 96 | Below are a set of options available. 97 | 98 | -help 99 | : display help 100 | 101 | -license 102 | : display license 103 | 104 | -version 105 | : display version number 106 | 107 | # VERB OPTIONS 108 | 109 | -i 110 | : set input filename 111 | 112 | -o 113 | : set output filename 114 | 115 | -notes 116 | : include notes in output 117 | 118 | -synopsis 119 | : include synopsis in output 120 | 121 | -section 122 | : include section headings in output 123 | 124 | -width 125 | : set max width in integers 126 | 127 | -html 128 | : output full HTML page 129 | 130 | -inline-css 131 | : include inline CSS (works with -html option) 132 | 133 | -link-css 134 | : include CSS link (works with -html option) 135 | 136 | -pretty 137 | : pretty print output 138 | 139 | -alpha 140 | : sort characters alphabetically instead of appearence order 141 | 142 | 143 | # EXAMPLES 144 | 145 | Converting *screenplay.fdx* to *screenplay.fountain* (2 examples) 146 | 147 | ~~~shell 148 | scripttool fdx2fountain screenplay.fdx screenplay.fountain 149 | scripttool fdx2fountain -i screenplay.fdx -o screenplay.fountain 150 | ~~~ 151 | 152 | Converting *screenplay.fountain* to *screenplay.fdx* (2 examples) 153 | 154 | ~~~shell 155 | scripttool fountain2fdx screenplay.fountain screenplay.fdx 156 | scripttool fountain2fdx -i screenplay.fountain -o screenplay.fdx 157 | ~~~ 158 | 159 | Listing characters from a *screenplay.fountain*. First list is order of appearence and the second set is characters sorted alphabetically using the "-alpha" option. 160 | 161 | ~~~shell 162 | scripttool characters screenplay.fountain 163 | scripttool characters -alpha screenplay.fountain 164 | ~~~ 165 | 166 | ` 167 | ) 168 | -------------------------------------------------------------------------------- /cli_test.go: -------------------------------------------------------------------------------- 1 | package scripttool 2 | 3 | import ( 4 | "io/fs" 5 | "os" 6 | "path" 7 | "strings" 8 | "testing" 9 | ) 10 | 11 | var ( 12 | testdataBase = "testdata" 13 | testoutBase = "testout" 14 | ) 15 | 16 | func TestRunScripttool(t *testing.T) { 17 | var verb string 18 | appName := os.Args[0] 19 | // Run the JSON command 20 | if _, err := os.Stat(testoutBase); err == nil { 21 | os.RemoveAll(testoutBase) 22 | } 23 | os.MkdirAll(testoutBase, 0775) 24 | fSys := os.DirFS(testdataBase) 25 | fs.WalkDir(fSys, ".", func(p string, info fs.DirEntry, err error) error { 26 | if !info.IsDir() { 27 | inName := info.Name() 28 | inExt := path.Ext(inName) 29 | outName := strings.TrimSuffix(inName, inExt) + ".json" 30 | 31 | //fmt.Printf("DEBUG pth: %q fName: %q, ext: %q\n", p, inName, inExt) 32 | switch inExt { 33 | case ".txt": 34 | verb = "fountain2json" 35 | case ".fountain": 36 | verb = "fountain2json" 37 | case ".fdx": 38 | verb = "fdx2json" 39 | case ".fadein": 40 | verb = "fadein2json" 41 | case ".osf": 42 | verb = "osf2json" 43 | default: 44 | // We're only doing 45 | //fmt.Printf("Skipping %q, unsupported to file extension %q\n", inName, inExt) 46 | return nil 47 | } 48 | // We'll just rely on our standard VERB INPUT_NAME OUTPUT_NAME 49 | in := os.Stdin 50 | out := os.Stdout 51 | eout := os.Stderr 52 | inputFName := path.Join(testdataBase, inName) 53 | outputFName := path.Join(testoutBase, outName) 54 | args := []string{appName, verb, inputFName, outputFName} 55 | if err := RunScripttool(in, out, eout, args); err != nil { 56 | t.Errorf("unexpected error RunScripttool(in, out, eout, %+v) -> %s", args, err) 57 | } 58 | } 59 | return nil 60 | }) 61 | } 62 | -------------------------------------------------------------------------------- /cmd/scripttool/main.go: -------------------------------------------------------------------------------- 1 | // scripttool is a tool for working with screenplay file formats. 2 | // 3 | // # BSD 2-Clause License 4 | // 5 | // Copyright (c) 2021, R. S. Doiel 6 | // All rights reserved. 7 | // 8 | // Redistribution and use in source and binary forms, with or without 9 | // modification, are permitted provided that the following conditions are met: 10 | // 11 | // - Redistributions of source code must retain the above copyright notice, this 12 | // list of conditions and the following disclaimer. 13 | // 14 | // - Redistributions in binary form must reproduce the above copyright notice, 15 | // this list of conditions and the following disclaimer in the documentation 16 | // and/or other materials provided with the distribution. 17 | // 18 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 19 | // AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 20 | // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 21 | // DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE 22 | // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 23 | // DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 24 | // SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 25 | // CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 26 | // OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 27 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 | package main 29 | 30 | import ( 31 | "flag" 32 | "fmt" 33 | "os" 34 | "path" 35 | 36 | // My packages 37 | "github.com/rsdoiel/scripttool" 38 | ) 39 | 40 | var ( 41 | // Standard Options 42 | showHelp bool 43 | showLicense bool 44 | showVersion bool 45 | ) 46 | 47 | func main() { 48 | appName := path.Base(os.Args[0]) 49 | if len(os.Args) == 1 { 50 | fmt.Fprintln(os.Stderr, scripttool.FmtCliText(scripttool.HelpText, appName, "", scripttool.Version)) 51 | os.Exit(1) 52 | } 53 | flag.BoolVar(&showHelp, "help", false, "display help") 54 | flag.BoolVar(&showVersion, "version", false, "display version") 55 | flag.BoolVar(&showLicense, "license", false, "display license") 56 | flag.Parse() 57 | if showHelp { 58 | fmt.Println(scripttool.FmtCliText(scripttool.HelpText, appName, "", scripttool.Version)) 59 | os.Exit(0) 60 | } 61 | if showLicense { 62 | fmt.Println(scripttool.FmtCliText(scripttool.LicenseText, appName, "", scripttool.Version)) 63 | os.Exit(0) 64 | } 65 | if showVersion { 66 | fmt.Printf("%s %s\n", appName, scripttool.Version) 67 | os.Exit(0) 68 | } 69 | 70 | if err := scripttool.RunScripttool(os.Stdin, os.Stdout, os.Stderr, os.Args); err != nil { 71 | fmt.Fprintf(os.Stderr, "%s\n", err) 72 | os.Exit(1) 73 | } 74 | } 75 | -------------------------------------------------------------------------------- /codemeta-about.tmpl: -------------------------------------------------------------------------------- 1 | --- 2 | cff-version: 1.2.0 3 | message: "If you use this software, please cite it as below." 4 | type: software 5 | ${if(name)}title: "${name}"${endif} 6 | ${if(description)}abstract: "${description}"${endif} 7 | ${if(author)}authors: 8 | ${for(author)} 9 | - family-names: ${it.familyName} 10 | given-names: ${it.givenName} 11 | orcid: "${it.at__id}" 12 | ${endfor}${endif} 13 | ${if(codeRepository)}repository-code: "${codeRepository}"${endif} 14 | ${if(version)}version: ${version}${endif} 15 | ${if(license)}license-url: "${license}"${endif} 16 | ${if(keywords)}keywords: [ ${for(keywords)}"${it}"${sep}, ${endfor} ]${endif} 17 | ${if(datePublished)}date-released: ${datePublished}${endif} 18 | --- 19 | 20 | About this software 21 | =================== 22 | 23 | ## ${name} ${version} 24 | 25 | ${if(author)} 26 | ### Authors 27 | 28 | ${for(author)} 29 | - ${it.givenName} ${it.familyName} 30 | ${endfor} 31 | ${endif} 32 | 33 | ${if(contributor)} 34 | ### Contributors 35 | 36 | ${for(contributor)} 37 | - ${it.givenName} ${it.familyName} 38 | ${endfor} 39 | ${endif} 40 | 41 | ${if(maintainer)} 42 | ### Maintainers 43 | 44 | ${for(maintainer)} 45 | - ${it.givenName} ${it.familyName} 46 | ${endfor} 47 | ${endif} 48 | 49 | ${if(description)} 50 | ${description} 51 | ${endif} 52 | 53 | ${if(license)}- License: <${license}>${endif} 54 | ${if(codeRepository)}- GitHub: <${codeRepository}>${endif} 55 | ${if(issueTracker)}- Issues: <${issueTracker}>${endif} 56 | 57 | 58 | ${if(programmingLanguage)} 59 | ### Programming languages 60 | 61 | ${for(programmingLanguage)} 62 | - ${programmingLanguage} 63 | ${endfor} 64 | ${endif} 65 | 66 | ${if(operatingSystem)} 67 | ### Operating Systems 68 | 69 | ${for(operatingSystem)} 70 | - ${operatingSystem} 71 | ${endfor} 72 | ${endif} 73 | 74 | ${if(softwareRequirements)} 75 | ### Software Requiremets 76 | 77 | ${for(softwareRequirements)} 78 | - ${softwareRequirements} 79 | ${endfor} 80 | $endif$ 81 | 82 | -------------------------------------------------------------------------------- /codemeta-bash-installer.tmpl: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # 4 | # Set the package name and version to install 5 | # 6 | PACKAGE="$name$" 7 | VERSION="$version$" 8 | GIT_GROUP="$git_org_or_person$" 9 | RELEASE="https://github.com/$$GIT_GROUP/$$PACKAGE/releases/tag/v$$VERSION" 10 | if [ "$$PKG_VERSION" != "" ]; then 11 | VERSION="$${PKG_VERSION}" 12 | echo "$${PKG_VERSION} used for version v$${VERSION}" 13 | fi 14 | 15 | # 16 | # Get the name of this script. 17 | # 18 | INSTALLER="$$(basename "$$0")" 19 | 20 | # 21 | # Figure out what the zip file is named 22 | # 23 | OS_NAME="$$(uname)" 24 | MACHINE="$$(uname -m)" 25 | case "$$OS_NAME" in 26 | Darwin) 27 | OS_NAME="macOS" 28 | ;; 29 | GNU/Linux) 30 | OS_NAME="Linux" 31 | ;; 32 | esac 33 | 34 | if [ "$$1" != "" ]; then 35 | VERSION="$$1" 36 | echo "Version set to v$${VERSION}" 37 | fi 38 | 39 | ZIPFILE="$$PACKAGE-v$$VERSION-$$OS_NAME-$$MACHINE.zip" 40 | 41 | # 42 | # Check to see if this zip file has been downloaded. 43 | # 44 | DOWNLOAD_URL="https://github.com/$$GIT_GROUP/$$PACKAGE/releases/download/v$$VERSION/$$ZIPFILE" 45 | if ! curl -L -o "$$HOME/Downloads/$$ZIPFILE" "$$DOWNLOAD_URL"; then 46 | echo "Curl failed to get $$DOWNLOAD_URL" 47 | fi 48 | cat<.binfiles.tmp 87 | while read -r APP; do 88 | V=$$("./$$APP" --version) 89 | if [ "$$V" = "" ]; then 90 | EXPLAIN_OS_POLICY="yes" 91 | fi 92 | mv "$$APP" "$$HOME/bin/" 93 | done <.binfiles.tmp 94 | rm .binfiles.tmp 95 | 96 | # 97 | # Make sure $$HOME/bin is in the path 98 | # 99 | case :$$PATH: in 100 | *:$$HOME/bin:*) 101 | ;; 102 | *) 103 | # shellcheck disable=SC2016 104 | echo 'export PATH="$$HOME/bin:$$PATH"' >>"$$HOME/.bashrc" 105 | # shellcheck disable=SC2016 106 | echo 'export PATH="$$HOME/bin:$$PATH"' >>"$$HOME/.zshrc" 107 | ;; 108 | esac 109 | 110 | # shellcheck disable=SC2031 111 | if [ "$$EXPLAIN_OS_POLICY" = "no" ]; then 112 | cat < 6 | // 7 | // # BSD 2-Clause License 8 | // 9 | // Copyright (c) 2021, R. S. Doiel 10 | // All rights reserved. 11 | // 12 | // Redistribution and use in source and binary forms, with or without 13 | // modification, are permitted provided that the following conditions are met: 14 | // 15 | // - Redistributions of source code must retain the above copyright notice, this 16 | // list of conditions and the following disclaimer. 17 | // 18 | // - Redistributions in binary form must reproduce the above copyright notice, 19 | // this list of conditions and the following disclaimer in the documentation 20 | // and/or other materials provided with the distribution. 21 | // 22 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 23 | // AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 24 | // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 25 | // DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE 26 | // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 27 | // DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 28 | // SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 29 | // CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 30 | // OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 31 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 32 | package scripttool 33 | 34 | import ( 35 | 36 | // My packages 37 | "github.com/rsdoiel/fdx" 38 | "github.com/rsdoiel/fountain" 39 | "github.com/rsdoiel/osf" 40 | ) 41 | 42 | // 43 | // Below are conversions to other formats (e.g. .osf/.fadein, and .fdx) 44 | // 45 | 46 | // fountainToOSF takes a Fountain struct and returns a osf.OpenScreenplay struct 47 | func fountainToOSF(document *fountain.Fountain) *osf.OpenScreenplay { 48 | screenplay := new(osf.OpenScreenplay) 49 | screenplay.Version = "2.0" 50 | screenplay.FromFountain(document) 51 | return screenplay 52 | } 53 | 54 | // fountainToFdx takes a Fountain struct and returns a fdx.FinalDraft struct 55 | func fountainToFdx(document *fountain.Fountain) *fdx.FinalDraft { 56 | screenplay := new(fdx.FinalDraft) 57 | screenplay.FromFountain(document) 58 | return screenplay 59 | } 60 | -------------------------------------------------------------------------------- /css/site.css: -------------------------------------------------------------------------------- 1 | @import 'https://fonts.googleapis.com/css?family=Concert+One|Dosis'; 2 | 3 | body { 4 | font-family: 'Dosis', sans-serif; 5 | font-size: calc(1em+1vw); 6 | padding: 0; 7 | margin: 0; 8 | width: 100%; 9 | height: auto; 10 | color: black; 11 | background-color: white; 12 | } 13 | 14 | a, a:link, a:visited { 15 | color: forestgreen; 16 | text-decoration: none; 17 | } 18 | 19 | a:active, a:focus, a:hover { 20 | color: maroon; 21 | text-decoration: underline; 22 | } 23 | 24 | 25 | 26 | ul { 27 | padding: 0; 28 | margin-left: 1.24em; 29 | /* list-style-type: disc;*/ 30 | } 31 | 32 | nav { 33 | position:fixed; 34 | top:0; 35 | display: block; 36 | width: 100%; 37 | height: auto; 38 | padding: 0; 39 | padding: 0.20em; 40 | /* caltech orange, white and black 41 | color: white; 42 | background-color: #FF6E1E; 43 | */ 44 | /* white on deep red */ 45 | color: white; 46 | background-color: #5f0202; 47 | } 48 | 49 | nav a, nav a:link, nav a:visited { 50 | font-weight: lighter; 51 | color: white; 52 | text-decoration: none; 53 | } 54 | 55 | nav a:active, nav a:focus, nav a:hover { 56 | font-weight: lighter; 57 | color: orange; 58 | text-decoration: none; 59 | text-transform: uppercase; 60 | } 61 | 62 | 63 | nav ul { 64 | display: block; 65 | width: 100%; 66 | height: auto; 67 | list-style: none; 68 | list-style-type: none; 69 | padding: 0; 70 | margin: 0; 71 | } 72 | 73 | nav ul li { 74 | display: inline-block; 75 | text-align: left; 76 | padding-top: 0em; 77 | padding-left: 0.82em; 78 | padding-right: 0.24em; 79 | padding-bottom: 0em; 80 | margin: 0; 81 | } 82 | 83 | section, article { 84 | display: block; 85 | width: 90%; 86 | height: auto; 87 | padding: 1.24em; 88 | margin-top: 1.24em; 89 | margin-bottom: 0.24em; 90 | } 91 | 92 | 93 | img.rss-valid { 94 | display: inline; 95 | width: auto; 96 | height: 0.82em; 97 | } 98 | 99 | h1 { 100 | font-family: 'Concert One', cursive; 101 | font-size: 200%; 102 | } 103 | 104 | h2 { 105 | font-family: 'Concert One', cursive; 106 | font-weight: lighter; 107 | font-size: 170%; 108 | } 109 | 110 | h3 { 111 | font-family: 'Concert One', cursive; 112 | font-weight: lighter; 113 | font-size: 120%; 114 | text-transform: uppercase; 115 | } 116 | 117 | h4 { 118 | font-family: 'Concert One', cursive; 119 | font-weight: lighter; 120 | font-size: 100%; 121 | text-transform: lowercase; 122 | } 123 | 124 | header { 125 | display: block; 126 | width: 100%; 127 | padding: 0; 128 | margin: 0; 129 | } 130 | 131 | header h1 { 132 | display: block; 133 | width: 100%; 134 | height: auto; 135 | padding-top: 2em; 136 | padding-left: 0; 137 | padding-right: 0; 138 | padding-bottom: 0; 139 | margin: 0; 140 | text-align: center; 141 | } 142 | 143 | footer { 144 | position: fixed; 145 | bottom: 0; 146 | font-size: 0.82em; 147 | font-weight: lighter; 148 | padding: 0; 149 | margin: 0; 150 | width: 100%; 151 | height: auto; 152 | color: white; 153 | background-color: black; 154 | } 155 | 156 | /* NOTE: Ingnore a P tag inserted by Markdown when rendering headers */ 157 | footer p { 158 | display: block; 159 | width: 100%; 160 | height: auto; 161 | padding: 0; 162 | margin: 0; 163 | font-family: 'Dosis', sans-serif; 164 | font-size: 0.82em; 165 | font-weight: lighter; 166 | margin-top: 0.32em; 167 | margin-left: 0; 168 | margin-right: 0; 169 | margin-bottom: 0; 170 | } 171 | 172 | footer img { 173 | display: block; 174 | float: left; 175 | vertical-align: top; 176 | border: 1px solid black; 177 | border-top-left-radius: 1.2em; 178 | border-top-right-radius: 1.2em; 179 | box-shadow: inset 0.12em 0.12em black; 180 | width: 3.2em; 181 | height: auto; 182 | margin: 0.24em; 183 | } 184 | 185 | footer a, footer a:link, footer a:visited { 186 | font-weight: lighter; 187 | /* caltech orange */ 188 | color: #FF6E1E; 189 | } 190 | 191 | footer a:active, footer a:focus, footer a:hover { 192 | font-weight: lighter; 193 | color: lightgreen; 194 | } 195 | 196 | -------------------------------------------------------------------------------- /fountain-example.css: -------------------------------------------------------------------------------- 1 | /** 2 | * fountain.css - CSS for displaying foutain2html generated HTML. 3 | * It was inspired by scrippet.css found on the Fountain 4 | * website at https://fountain.io/_css/scrippets.css which is attributed 5 | * to John August, updated in 2012. 6 | * 7 | * 2019-06-18, RSD 8 | */ 9 | 10 | .fountain { 11 | margin: 0; 12 | padding: 0; 13 | display: block; 14 | } 15 | 16 | .fountain { 17 | max-width: 400px; 18 | background: #fffffc; 19 | color: #000000; 20 | padding: 5px 14px 15px 14px !important; 21 | clear: both; 22 | margin-bottom: 2.5em; 23 | margin-top: 2.5em; 24 | } 25 | 26 | section.title-page, 27 | section.script { 28 | width: 36em; 29 | padding-left: 1em; 30 | padding-bottom: 2em; 31 | margin-bottom: 2em; 32 | border: 0.12em solid #d2d2d2; 33 | border-radius: 3px; 34 | } 35 | 36 | .title-page, 37 | .script { 38 | min-height: 20em; 39 | } 40 | 41 | /* Simulate a page feed */ 42 | .script .page-feed { 43 | overflow: visible; 44 | border: 0; 45 | padding: 0; 46 | margin: 0; 47 | margin-top: 4em; 48 | margin-left: -1em; 49 | /* For IE */ 50 | height: 30px; 51 | border-style: solid; 52 | border-color: black; 53 | border-width: 1px 0 0 0; 54 | border-radius: 8px; 55 | } 56 | .script .page-feed:before { 57 | display: block; 58 | content: ""; 59 | height: 30px; 60 | border: 0; 61 | padding: 0; 62 | margin: 0; 63 | margin-top: -31px; 64 | border-style: solid; 65 | border-color: black; 66 | border-width: 0 0 1px 0; 67 | border-radius: 8px; 68 | } 69 | 70 | 71 | .title { 72 | text-align: center; 73 | padding-left: 33%; 74 | padding-right: 33%; 75 | text-transform: uppercase; 76 | text-decoration: underline; 77 | margin-top: 1em; 78 | margin-bottom: 1em; 79 | } 80 | 81 | .author { 82 | text-align: center; 83 | padding-left: 33%; 84 | padding-right: 33%; 85 | margin-top: 0em; 86 | margin-bottom: 0em; 87 | } 88 | 89 | .draft-date, 90 | .date { 91 | text-align: center; 92 | padding-left: 33%; 93 | padding-right: 33%; 94 | margin-top: 0; 95 | margin-bottom: 6em; 96 | } 97 | 98 | .copyright { 99 | display: block; 100 | padding: 0; 101 | margin: 0; 102 | text-align: left; 103 | text-transform: none; 104 | text-decoration: none; 105 | } 106 | 107 | .contact { 108 | display: block; 109 | padding: 0; 110 | margin: 0; 111 | text-align: left; 112 | text-transform: none; 113 | text-decoration: none; 114 | } 115 | 116 | .script { 117 | padding-top: 2em; 118 | padding-left: 0; 119 | padding-right: 0; 120 | padding-bottom: 2em; 121 | } 122 | 123 | .scene-heading, 124 | .action, 125 | .character, 126 | .parenthetical, 127 | .transition, 128 | .dialogue { 129 | font: 12px/14px Courier, "Courier New", monospace; 130 | text-align: left !important; 131 | letter-spacing: 0 !important; 132 | margin-top: 0px !important; 133 | margin-bottom: 0px !important; 134 | display: block; 135 | } 136 | 137 | .scene-heading, 138 | .action, 139 | .character { 140 | padding-top: 1.5ex !important; 141 | display: block; 142 | } 143 | 144 | .action { 145 | padding-right: 5% !important; 146 | font-size: 12px !important; 147 | line-height: 14px !important; 148 | } 149 | 150 | .character { 151 | padding-left: 40% !important; 152 | } 153 | 154 | .dialogue { 155 | padding-left: 20% !important; 156 | padding-right: 20% !important; 157 | } 158 | 159 | .parenthetical { 160 | display: block; 161 | padding-left: 32% !important; 162 | padding-right: 30% !important; 163 | } 164 | 165 | .dialogue+.parenthetical { 166 | padding-bottom: 0 !important; 167 | } 168 | 169 | .left-align { 170 | float: left; 171 | padding-left: 2em; 172 | text-align: left; 173 | } 174 | 175 | .centered { 176 | padding-left: 33%; 177 | padding-right: 33%; 178 | text-align: center; 179 | } 180 | 181 | .right-align { 182 | float: right; 183 | padding-right: 2em; 184 | text-align: right; 185 | } 186 | 187 | .empty { 188 | display: none; 189 | height: 0; 190 | } 191 | -------------------------------------------------------------------------------- /get-optional-testdata.bash: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | START=$(pwd) 4 | cd testdata 5 | curl -L -O "https://fountain.io/_downloads/Big-Fish.fountain" 6 | curl -L -O "https://fountain.io/_downloads/Big-Fish.fdx" 7 | #curl -L -O "https://fountain.io/_downloads/Big-Fish.pdf" 8 | curl -L -O "https://fountain.io/_downloads/Brick-&-Steel.fountain" 9 | curl -L -O "https://fountain.io/_downloads/Brick-&-Steel.fdx" 10 | #curl -L -O "https://fountain.io/_downloads/Brick-&-Steel.pdf" 11 | curl -L -O "https://fountain.io/_downloads/The-Last-Birthday-Card.fountain" 12 | curl -L -O "https://fountain.io/_downloads/The-Last-Birthday-Card.fdx" 13 | #curl -L -O "https://fountain.io/_downloads/The-Last-Birthday-Card.pdf" 14 | cd "$START" 15 | -------------------------------------------------------------------------------- /go.mod: -------------------------------------------------------------------------------- 1 | module github.com/rsdoiel/scripttool 2 | 3 | go 1.22.0 4 | 5 | require ( 6 | github.com/rsdoiel/fdx v1.0.2 7 | github.com/rsdoiel/fountain v1.0.1 8 | github.com/rsdoiel/osf v0.0.7 9 | ) 10 | 11 | require gopkg.in/yaml.v3 v3.0.1 12 | -------------------------------------------------------------------------------- /go.sum: -------------------------------------------------------------------------------- 1 | github.com/rsdoiel/fdx v1.0.2 h1:TMBGgYdG7CaPbnM6kMAkRebYyCfWK9dK/qooPhEITU8= 2 | github.com/rsdoiel/fdx v1.0.2/go.mod h1:hXJBkY2UoujfU1EZ1tiR8aa3AZgcReOydZZ7dAuyg9o= 3 | github.com/rsdoiel/fountain v1.0.1 h1:m5JZbnasFendZbYzoTsOsJ/gcup7VNTUjJGTANshQck= 4 | github.com/rsdoiel/fountain v1.0.1/go.mod h1:Sd3MZuWObP+tssyGIuUUfl3+nslvRVndkEEpBVsWAJU= 5 | github.com/rsdoiel/osf v0.0.6 h1:5ijMEfFH1zzBsYTeChyCi06sYQhboMBX7rSr/gW7ZnY= 6 | github.com/rsdoiel/osf v0.0.6/go.mod h1:UzyqbsRFk5rL3WTiFvlfvL4jsqgt/EPHVlbs9FShFwI= 7 | github.com/rsdoiel/osf v0.0.7 h1:woMTMPktKWhQJdPGVt1zmVbq9jJFmPiq0lqzWNnmR/s= 8 | github.com/rsdoiel/osf v0.0.7/go.mod h1:jmOePx0mqICIH+G7GuIFnWGckQB7XWovQhdGMp9dPgE= 9 | gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM= 10 | gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= 11 | gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= 12 | gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= 13 | -------------------------------------------------------------------------------- /index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | R. S. Doiel, Software Engineer/Analyst - README 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 26 | 27 |
28 | 29 | 30 |

Project Status: Active – The project has reached a stable, usable state and is being actively developed.

33 |

Get it from the Snap Store

36 |

scripttool

37 |

A tool for working with screenplay file formats (e.g. fdx, fountain, 38 | osf, FadeIn).

39 |

Converting to fountain 40 | format

41 |

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 |

Working with fountain files

51 |

Pretty print fountain files

52 |
    scripttool fountainfmt screenplay.fountain
53 |

Render a fountain file as JSON

54 |
    scripttool fountain2json screenplay.fountain
55 |

Convert from fountain format

56 |

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 |

Script Reports

66 |

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 |
72 | 73 |
74 |
75 | 76 | 77 | 78 | -------------------------------------------------------------------------------- /installer.ps1: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env pwsh 2 | # Generated with codemeta-ps1-installer.tmpl, see https://github.com/caltechlibrary/codemeta-pandoc-examples 3 | 4 | # 5 | # Set the package name and version to install 6 | # 7 | $PACKAGE = "scripttool" 8 | $VERSION = "0.0.10" 9 | $GIT_GROUP = "rsdoiel" 10 | $RELEASE = "https://github.com/${GIT_GROUP}/${PACKAGE}/releases/tag/v${VERSION}" 11 | $SYSTEM_TYPE = Get-ComputerInfo -Property CsSystemType 12 | if ($SYSTEM_TYPE.CsSystemType.Contains("ARM64")) { 13 | $MACHINE = "arm64" 14 | } else { 15 | $MACHINE = "x86_64" 16 | } 17 | 18 | # FIGURE OUT Install directory 19 | $BIN_DIR = "${Home}\bin" 20 | Write-Output "${PACKAGE} will be installed in ${BIN_DIR}" 21 | 22 | # 23 | # Figure out what the zip file is named 24 | # 25 | $ZIPFILE = "${PACKAGE}-v${VERSION}-Windows-${MACHINE}.zip" 26 | 27 | # 28 | # Check to see if this zip file has been downloaded. 29 | # 30 | $DOWNLOAD_URL = "https://github.com/${GIT_GROUP}/${PACKAGE}/releases/download/v${VERSION}/${ZIPFILE}" 31 | 32 | if (!(Test-Path $BIN_DIR)) { 33 | New-Item $BIN_DIR -ItemType Directory | Out-Null 34 | } 35 | curl.exe -Lo "${ZIPFILE}" "${DOWNLOAD_URL}" 36 | 37 | tar.exe xf "${ZIPFILE}" -C "${Home}" 38 | 39 | Remove-Item $ZIPFILE 40 | 41 | $User = [System.EnvironmentVariableTarget]::User 42 | $Path = [System.Environment]::GetEnvironmentVariable('Path', $User) 43 | if (!(";${Path};".ToLower() -like "*;${BIN_DIR};*".ToLower())) { 44 | [System.Environment]::SetEnvironmentVariable('Path', "${Path};${BIN_DIR}", $User) 45 | $Env:Path += ";${BIN_DIR}" 46 | } 47 | 48 | Write-Output "${PACKAGE} was installed successfully to ${BIN_DIR}" 49 | -------------------------------------------------------------------------------- /installer.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # 4 | # Set the package name and version to install 5 | # 6 | PACKAGE="scripttool" 7 | VERSION="0.0.10" 8 | GIT_GROUP="rsdoiel" 9 | RELEASE="https://github.com/$GIT_GROUP/$PACKAGE/releases/tag/v$VERSION" 10 | 11 | # 12 | # Get the name of this script. 13 | # 14 | INSTALLER="$(basename "$0")" 15 | 16 | # 17 | # Figure out what the zip file is named 18 | # 19 | OS_NAME="$(uname -o)" 20 | MACHINE="$(uname -m)" 21 | case "$OS_NAME" in 22 | Darwin) 23 | OS_NAME="macOS" 24 | ;; 25 | GNU/Linux) 26 | OS_NAME="Linux" 27 | ;; 28 | esac 29 | 30 | ZIPFILE="$PACKAGE-v$VERSION-$OS_NAME-$MACHINE.zip" 31 | 32 | # 33 | # Check to see if this zip file has been downloaded. 34 | # 35 | DOWNLOAD_URL="https://github.com/$GIT_GROUP/$PACKAGE/releases/download/v$VERSION/$ZIPFILE" 36 | if ! curl -L -o "$HOME/Downloads/$ZIPFILE" "$DOWNLOAD_URL"; then 37 | echo "Curl failed to get $DOWNLOAD_URL" 38 | fi 39 | cat<.binfiles.tmp 75 | while read -r APP; do 76 | V=$("./$APP" --version) 77 | if [ "$V" = "" ]; then 78 | EXPLAIN_OS_POLICY="yes" 79 | fi 80 | mv "$APP" "$HOME/bin/" 81 | done <.binfiles.tmp 82 | rm .binfiles.tmp 83 | 84 | # 85 | # Make sure $HOME/bin is in the path 86 | # 87 | case :$PATH: in 88 | *:$HOME/bin:*) 89 | ;; 90 | *) 91 | # shellcheck disable=SC2016 92 | echo 'export PATH="$HOME/bin:$PATH"' >>"$HOME/.bashrc" 93 | # shellcheck disable=SC2016 94 | echo 'export PATH="$HOME/bin:$PATH"' >>"$HOME/.zshrc" 95 | ;; 96 | esac 97 | 98 | # shellcheck disable=SC2031 99 | if [ "$EXPLAIN_OS_POLICY" = "no" ]; then 100 | cat < 2 | 3 | 4 | 5 | 6 | $if(title)$R. S. Doiel, Software Engineer/Analyst - $title$$else$R. S. Doiel, Software Engineer/Analyst$endif$ 7 | 8 | 9 | 10 | 11 | 12 | $if(sourcefile)$$endif$ 13 | 14 | 15 | 32 | 33 |
34 | 35 | 36 | $body$ 37 |
38 | 39 |
40 | $for(include-after)$ 41 | $include-after$ 42 | $endfor$ 43 |
44 | 45 | 46 | 47 | 48 | -------------------------------------------------------------------------------- /pagefind/fragment/en-us_22c354f.pf_fragment: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rsdoiel/scripttool/3426f9bd02994d6445974c84d5a2066ec970e89f/pagefind/fragment/en-us_22c354f.pf_fragment -------------------------------------------------------------------------------- /pagefind/fragment/en-us_39c0fba.pf_fragment: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rsdoiel/scripttool/3426f9bd02994d6445974c84d5a2066ec970e89f/pagefind/fragment/en-us_39c0fba.pf_fragment -------------------------------------------------------------------------------- /pagefind/fragment/en-us_3b8d404.pf_fragment: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rsdoiel/scripttool/3426f9bd02994d6445974c84d5a2066ec970e89f/pagefind/fragment/en-us_3b8d404.pf_fragment -------------------------------------------------------------------------------- /pagefind/fragment/en-us_553090c.pf_fragment: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rsdoiel/scripttool/3426f9bd02994d6445974c84d5a2066ec970e89f/pagefind/fragment/en-us_553090c.pf_fragment -------------------------------------------------------------------------------- /pagefind/fragment/en-us_55e866e.pf_fragment: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rsdoiel/scripttool/3426f9bd02994d6445974c84d5a2066ec970e89f/pagefind/fragment/en-us_55e866e.pf_fragment -------------------------------------------------------------------------------- /pagefind/fragment/en-us_75d7b97.pf_fragment: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rsdoiel/scripttool/3426f9bd02994d6445974c84d5a2066ec970e89f/pagefind/fragment/en-us_75d7b97.pf_fragment -------------------------------------------------------------------------------- /pagefind/fragment/en-us_8aed591.pf_fragment: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rsdoiel/scripttool/3426f9bd02994d6445974c84d5a2066ec970e89f/pagefind/fragment/en-us_8aed591.pf_fragment -------------------------------------------------------------------------------- /pagefind/fragment/en-us_9072f84.pf_fragment: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rsdoiel/scripttool/3426f9bd02994d6445974c84d5a2066ec970e89f/pagefind/fragment/en-us_9072f84.pf_fragment -------------------------------------------------------------------------------- /pagefind/fragment/en-us_961513d.pf_fragment: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rsdoiel/scripttool/3426f9bd02994d6445974c84d5a2066ec970e89f/pagefind/fragment/en-us_961513d.pf_fragment -------------------------------------------------------------------------------- /pagefind/fragment/en-us_a138d21.pf_fragment: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rsdoiel/scripttool/3426f9bd02994d6445974c84d5a2066ec970e89f/pagefind/fragment/en-us_a138d21.pf_fragment -------------------------------------------------------------------------------- /pagefind/fragment/en-us_a5ba79c.pf_fragment: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rsdoiel/scripttool/3426f9bd02994d6445974c84d5a2066ec970e89f/pagefind/fragment/en-us_a5ba79c.pf_fragment -------------------------------------------------------------------------------- /pagefind/fragment/en-us_afb3777.pf_fragment: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rsdoiel/scripttool/3426f9bd02994d6445974c84d5a2066ec970e89f/pagefind/fragment/en-us_afb3777.pf_fragment -------------------------------------------------------------------------------- /pagefind/fragment/en-us_b16a7bf.pf_fragment: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rsdoiel/scripttool/3426f9bd02994d6445974c84d5a2066ec970e89f/pagefind/fragment/en-us_b16a7bf.pf_fragment -------------------------------------------------------------------------------- /pagefind/fragment/en-us_ba81728.pf_fragment: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rsdoiel/scripttool/3426f9bd02994d6445974c84d5a2066ec970e89f/pagefind/fragment/en-us_ba81728.pf_fragment -------------------------------------------------------------------------------- /pagefind/fragment/en-us_db50262.pf_fragment: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rsdoiel/scripttool/3426f9bd02994d6445974c84d5a2066ec970e89f/pagefind/fragment/en-us_db50262.pf_fragment -------------------------------------------------------------------------------- /pagefind/fragment/en-us_e85f6ad.pf_fragment: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rsdoiel/scripttool/3426f9bd02994d6445974c84d5a2066ec970e89f/pagefind/fragment/en-us_e85f6ad.pf_fragment -------------------------------------------------------------------------------- /pagefind/fragment/en-us_f925602.pf_fragment: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rsdoiel/scripttool/3426f9bd02994d6445974c84d5a2066ec970e89f/pagefind/fragment/en-us_f925602.pf_fragment -------------------------------------------------------------------------------- /pagefind/fragment/en_12a3a6a.pf_fragment: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rsdoiel/scripttool/3426f9bd02994d6445974c84d5a2066ec970e89f/pagefind/fragment/en_12a3a6a.pf_fragment -------------------------------------------------------------------------------- /pagefind/fragment/en_14a5709.pf_fragment: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rsdoiel/scripttool/3426f9bd02994d6445974c84d5a2066ec970e89f/pagefind/fragment/en_14a5709.pf_fragment -------------------------------------------------------------------------------- /pagefind/fragment/en_158e7cd.pf_fragment: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rsdoiel/scripttool/3426f9bd02994d6445974c84d5a2066ec970e89f/pagefind/fragment/en_158e7cd.pf_fragment -------------------------------------------------------------------------------- /pagefind/fragment/en_1948cab.pf_fragment: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rsdoiel/scripttool/3426f9bd02994d6445974c84d5a2066ec970e89f/pagefind/fragment/en_1948cab.pf_fragment -------------------------------------------------------------------------------- /pagefind/fragment/en_1e2a8ed.pf_fragment: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rsdoiel/scripttool/3426f9bd02994d6445974c84d5a2066ec970e89f/pagefind/fragment/en_1e2a8ed.pf_fragment -------------------------------------------------------------------------------- /pagefind/fragment/en_1f39143.pf_fragment: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rsdoiel/scripttool/3426f9bd02994d6445974c84d5a2066ec970e89f/pagefind/fragment/en_1f39143.pf_fragment -------------------------------------------------------------------------------- /pagefind/fragment/en_255e45f.pf_fragment: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rsdoiel/scripttool/3426f9bd02994d6445974c84d5a2066ec970e89f/pagefind/fragment/en_255e45f.pf_fragment -------------------------------------------------------------------------------- /pagefind/fragment/en_2852b16.pf_fragment: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rsdoiel/scripttool/3426f9bd02994d6445974c84d5a2066ec970e89f/pagefind/fragment/en_2852b16.pf_fragment -------------------------------------------------------------------------------- /pagefind/fragment/en_2facb9a.pf_fragment: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rsdoiel/scripttool/3426f9bd02994d6445974c84d5a2066ec970e89f/pagefind/fragment/en_2facb9a.pf_fragment -------------------------------------------------------------------------------- /pagefind/fragment/en_357f36f.pf_fragment: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rsdoiel/scripttool/3426f9bd02994d6445974c84d5a2066ec970e89f/pagefind/fragment/en_357f36f.pf_fragment -------------------------------------------------------------------------------- /pagefind/fragment/en_39425f8.pf_fragment: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rsdoiel/scripttool/3426f9bd02994d6445974c84d5a2066ec970e89f/pagefind/fragment/en_39425f8.pf_fragment -------------------------------------------------------------------------------- /pagefind/fragment/en_39c0fba.pf_fragment: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rsdoiel/scripttool/3426f9bd02994d6445974c84d5a2066ec970e89f/pagefind/fragment/en_39c0fba.pf_fragment -------------------------------------------------------------------------------- /pagefind/fragment/en_42fc4b6.pf_fragment: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rsdoiel/scripttool/3426f9bd02994d6445974c84d5a2066ec970e89f/pagefind/fragment/en_42fc4b6.pf_fragment -------------------------------------------------------------------------------- /pagefind/fragment/en_5479f72.pf_fragment: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rsdoiel/scripttool/3426f9bd02994d6445974c84d5a2066ec970e89f/pagefind/fragment/en_5479f72.pf_fragment -------------------------------------------------------------------------------- /pagefind/fragment/en_553090c.pf_fragment: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rsdoiel/scripttool/3426f9bd02994d6445974c84d5a2066ec970e89f/pagefind/fragment/en_553090c.pf_fragment -------------------------------------------------------------------------------- /pagefind/fragment/en_5be4197.pf_fragment: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rsdoiel/scripttool/3426f9bd02994d6445974c84d5a2066ec970e89f/pagefind/fragment/en_5be4197.pf_fragment -------------------------------------------------------------------------------- /pagefind/fragment/en_5dff2da.pf_fragment: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rsdoiel/scripttool/3426f9bd02994d6445974c84d5a2066ec970e89f/pagefind/fragment/en_5dff2da.pf_fragment -------------------------------------------------------------------------------- /pagefind/fragment/en_624383b.pf_fragment: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rsdoiel/scripttool/3426f9bd02994d6445974c84d5a2066ec970e89f/pagefind/fragment/en_624383b.pf_fragment -------------------------------------------------------------------------------- /pagefind/fragment/en_6319532.pf_fragment: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rsdoiel/scripttool/3426f9bd02994d6445974c84d5a2066ec970e89f/pagefind/fragment/en_6319532.pf_fragment -------------------------------------------------------------------------------- /pagefind/fragment/en_6ca1e74.pf_fragment: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rsdoiel/scripttool/3426f9bd02994d6445974c84d5a2066ec970e89f/pagefind/fragment/en_6ca1e74.pf_fragment -------------------------------------------------------------------------------- /pagefind/fragment/en_6df6c26.pf_fragment: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rsdoiel/scripttool/3426f9bd02994d6445974c84d5a2066ec970e89f/pagefind/fragment/en_6df6c26.pf_fragment -------------------------------------------------------------------------------- /pagefind/fragment/en_6e71253.pf_fragment: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rsdoiel/scripttool/3426f9bd02994d6445974c84d5a2066ec970e89f/pagefind/fragment/en_6e71253.pf_fragment -------------------------------------------------------------------------------- /pagefind/fragment/en_7279c68.pf_fragment: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rsdoiel/scripttool/3426f9bd02994d6445974c84d5a2066ec970e89f/pagefind/fragment/en_7279c68.pf_fragment -------------------------------------------------------------------------------- /pagefind/fragment/en_75d7b97.pf_fragment: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rsdoiel/scripttool/3426f9bd02994d6445974c84d5a2066ec970e89f/pagefind/fragment/en_75d7b97.pf_fragment -------------------------------------------------------------------------------- /pagefind/fragment/en_7a3f1d5.pf_fragment: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rsdoiel/scripttool/3426f9bd02994d6445974c84d5a2066ec970e89f/pagefind/fragment/en_7a3f1d5.pf_fragment -------------------------------------------------------------------------------- /pagefind/fragment/en_8a877ab.pf_fragment: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rsdoiel/scripttool/3426f9bd02994d6445974c84d5a2066ec970e89f/pagefind/fragment/en_8a877ab.pf_fragment -------------------------------------------------------------------------------- /pagefind/fragment/en_8aed591.pf_fragment: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rsdoiel/scripttool/3426f9bd02994d6445974c84d5a2066ec970e89f/pagefind/fragment/en_8aed591.pf_fragment -------------------------------------------------------------------------------- /pagefind/fragment/en_8b4e9e9.pf_fragment: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rsdoiel/scripttool/3426f9bd02994d6445974c84d5a2066ec970e89f/pagefind/fragment/en_8b4e9e9.pf_fragment -------------------------------------------------------------------------------- /pagefind/fragment/en_961513d.pf_fragment: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rsdoiel/scripttool/3426f9bd02994d6445974c84d5a2066ec970e89f/pagefind/fragment/en_961513d.pf_fragment -------------------------------------------------------------------------------- /pagefind/fragment/en_96f9ed7.pf_fragment: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rsdoiel/scripttool/3426f9bd02994d6445974c84d5a2066ec970e89f/pagefind/fragment/en_96f9ed7.pf_fragment -------------------------------------------------------------------------------- /pagefind/fragment/en_9991584.pf_fragment: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rsdoiel/scripttool/3426f9bd02994d6445974c84d5a2066ec970e89f/pagefind/fragment/en_9991584.pf_fragment -------------------------------------------------------------------------------- /pagefind/fragment/en_9fc45d0.pf_fragment: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rsdoiel/scripttool/3426f9bd02994d6445974c84d5a2066ec970e89f/pagefind/fragment/en_9fc45d0.pf_fragment -------------------------------------------------------------------------------- /pagefind/fragment/en_a0c2cfd.pf_fragment: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rsdoiel/scripttool/3426f9bd02994d6445974c84d5a2066ec970e89f/pagefind/fragment/en_a0c2cfd.pf_fragment -------------------------------------------------------------------------------- /pagefind/fragment/en_a5ba79c.pf_fragment: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rsdoiel/scripttool/3426f9bd02994d6445974c84d5a2066ec970e89f/pagefind/fragment/en_a5ba79c.pf_fragment -------------------------------------------------------------------------------- /pagefind/fragment/en_afb3777.pf_fragment: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rsdoiel/scripttool/3426f9bd02994d6445974c84d5a2066ec970e89f/pagefind/fragment/en_afb3777.pf_fragment -------------------------------------------------------------------------------- /pagefind/fragment/en_b16a7bf.pf_fragment: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rsdoiel/scripttool/3426f9bd02994d6445974c84d5a2066ec970e89f/pagefind/fragment/en_b16a7bf.pf_fragment -------------------------------------------------------------------------------- /pagefind/fragment/en_b52f7ba.pf_fragment: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rsdoiel/scripttool/3426f9bd02994d6445974c84d5a2066ec970e89f/pagefind/fragment/en_b52f7ba.pf_fragment -------------------------------------------------------------------------------- /pagefind/fragment/en_ba80611.pf_fragment: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rsdoiel/scripttool/3426f9bd02994d6445974c84d5a2066ec970e89f/pagefind/fragment/en_ba80611.pf_fragment -------------------------------------------------------------------------------- /pagefind/fragment/en_beb1385.pf_fragment: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rsdoiel/scripttool/3426f9bd02994d6445974c84d5a2066ec970e89f/pagefind/fragment/en_beb1385.pf_fragment -------------------------------------------------------------------------------- /pagefind/fragment/en_d9a9992.pf_fragment: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rsdoiel/scripttool/3426f9bd02994d6445974c84d5a2066ec970e89f/pagefind/fragment/en_d9a9992.pf_fragment -------------------------------------------------------------------------------- /pagefind/fragment/en_deb2ee3.pf_fragment: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rsdoiel/scripttool/3426f9bd02994d6445974c84d5a2066ec970e89f/pagefind/fragment/en_deb2ee3.pf_fragment -------------------------------------------------------------------------------- /pagefind/fragment/en_e0e27c6.pf_fragment: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rsdoiel/scripttool/3426f9bd02994d6445974c84d5a2066ec970e89f/pagefind/fragment/en_e0e27c6.pf_fragment -------------------------------------------------------------------------------- /pagefind/fragment/en_f925602.pf_fragment: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rsdoiel/scripttool/3426f9bd02994d6445974c84d5a2066ec970e89f/pagefind/fragment/en_f925602.pf_fragment -------------------------------------------------------------------------------- /pagefind/fragment/en_f9f2f12.pf_fragment: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rsdoiel/scripttool/3426f9bd02994d6445974c84d5a2066ec970e89f/pagefind/fragment/en_f9f2f12.pf_fragment -------------------------------------------------------------------------------- /pagefind/fragment/en_ff82e8e.pf_fragment: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rsdoiel/scripttool/3426f9bd02994d6445974c84d5a2066ec970e89f/pagefind/fragment/en_ff82e8e.pf_fragment -------------------------------------------------------------------------------- /pagefind/fragment/en_ffaacac.pf_fragment: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rsdoiel/scripttool/3426f9bd02994d6445974c84d5a2066ec970e89f/pagefind/fragment/en_ffaacac.pf_fragment -------------------------------------------------------------------------------- /pagefind/index/en-us_2499a6e.pf_index: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rsdoiel/scripttool/3426f9bd02994d6445974c84d5a2066ec970e89f/pagefind/index/en-us_2499a6e.pf_index -------------------------------------------------------------------------------- /pagefind/index/en-us_3e8cda1.pf_index: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rsdoiel/scripttool/3426f9bd02994d6445974c84d5a2066ec970e89f/pagefind/index/en-us_3e8cda1.pf_index -------------------------------------------------------------------------------- /pagefind/index/en-us_6fa433c.pf_index: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rsdoiel/scripttool/3426f9bd02994d6445974c84d5a2066ec970e89f/pagefind/index/en-us_6fa433c.pf_index -------------------------------------------------------------------------------- /pagefind/index/en-us_b29ca94.pf_index: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rsdoiel/scripttool/3426f9bd02994d6445974c84d5a2066ec970e89f/pagefind/index/en-us_b29ca94.pf_index -------------------------------------------------------------------------------- /pagefind/index/en-us_b5dc3a2.pf_index: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rsdoiel/scripttool/3426f9bd02994d6445974c84d5a2066ec970e89f/pagefind/index/en-us_b5dc3a2.pf_index -------------------------------------------------------------------------------- /pagefind/index/en-us_cc2f0b2.pf_index: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rsdoiel/scripttool/3426f9bd02994d6445974c84d5a2066ec970e89f/pagefind/index/en-us_cc2f0b2.pf_index -------------------------------------------------------------------------------- /pagefind/index/en-us_e463079.pf_index: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rsdoiel/scripttool/3426f9bd02994d6445974c84d5a2066ec970e89f/pagefind/index/en-us_e463079.pf_index -------------------------------------------------------------------------------- /pagefind/index/en_4d3a188.pf_index: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rsdoiel/scripttool/3426f9bd02994d6445974c84d5a2066ec970e89f/pagefind/index/en_4d3a188.pf_index -------------------------------------------------------------------------------- /pagefind/index/en_77cbdc0.pf_index: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rsdoiel/scripttool/3426f9bd02994d6445974c84d5a2066ec970e89f/pagefind/index/en_77cbdc0.pf_index -------------------------------------------------------------------------------- /pagefind/index/en_9e73688.pf_index: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rsdoiel/scripttool/3426f9bd02994d6445974c84d5a2066ec970e89f/pagefind/index/en_9e73688.pf_index -------------------------------------------------------------------------------- /pagefind/index/en_a5afd18.pf_index: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rsdoiel/scripttool/3426f9bd02994d6445974c84d5a2066ec970e89f/pagefind/index/en_a5afd18.pf_index -------------------------------------------------------------------------------- /pagefind/pagefind-entry.json: -------------------------------------------------------------------------------- 1 | {"version":"1.1.0","languages":{"en-us":{"hash":"en-us_f4b67663f92e1","wasm":"en-us","page_count":9}}} -------------------------------------------------------------------------------- /pagefind/pagefind-modular-ui.css: -------------------------------------------------------------------------------- 1 | :root { 2 | --pagefind-ui-scale: 0.8; 3 | --pagefind-ui-primary: #034AD8; 4 | --pagefind-ui-fade: #707070; 5 | --pagefind-ui-text: #393939; 6 | --pagefind-ui-background: #ffffff; 7 | --pagefind-ui-border: #eeeeee; 8 | --pagefind-ui-tag: #eeeeee; 9 | --pagefind-ui-border-width: 2px; 10 | --pagefind-ui-border-radius: 8px; 11 | --pagefind-ui-image-border-radius: 8px; 12 | --pagefind-ui-image-box-ratio: 3 / 2; 13 | --pagefind-ui-font: system, -apple-system, ".SFNSText-Regular", 14 | "San Francisco", "Roboto", "Segoe UI", "Helvetica Neue", 15 | "Lucida Grande", sans-serif; 16 | } 17 | 18 | [data-pfmod-hidden] { 19 | display: none !important; 20 | } 21 | 22 | [data-pfmod-suppressed] { 23 | opacity: 0 !important; 24 | pointer-events: none !important; 25 | } 26 | 27 | [data-pfmod-sr-hidden] { 28 | -webkit-clip: rect(0 0 0 0) !important; 29 | clip: rect(0 0 0 0) !important; 30 | -webkit-clip-path: inset(100%) !important; 31 | clip-path: inset(100%) !important; 32 | height: 1px !important; 33 | overflow: hidden !important; 34 | overflow: clip !important; 35 | position: absolute !important; 36 | white-space: nowrap !important; 37 | width: 1px !important; 38 | } 39 | 40 | [data-pfmod-loading] { 41 | color: var(--pagefind-ui-text); 42 | background-color: var(--pagefind-ui-text); 43 | border-radius: var(--pagefind-ui-border-radius); 44 | opacity: 0.1; 45 | pointer-events: none; 46 | } 47 | 48 | /* Input */ 49 | 50 | .pagefind-modular-input-wrapper { 51 | position: relative; 52 | } 53 | 54 | .pagefind-modular-input-wrapper::before { 55 | background-color: var(--pagefind-ui-text); 56 | width: calc(18px * var(--pagefind-ui-scale)); 57 | height: calc(18px * var(--pagefind-ui-scale)); 58 | top: calc(23px * var(--pagefind-ui-scale)); 59 | left: calc(20px * var(--pagefind-ui-scale)); 60 | content: ""; 61 | position: absolute; 62 | display: block; 63 | opacity: 0.7; 64 | -webkit-mask-image: url("data:image/svg+xml,%3Csvg width='18' height='18' viewBox='0 0 18 18' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M12.7549 11.255H11.9649L11.6849 10.985C12.6649 9.845 13.2549 8.365 13.2549 6.755C13.2549 3.165 10.3449 0.255005 6.75488 0.255005C3.16488 0.255005 0.254883 3.165 0.254883 6.755C0.254883 10.345 3.16488 13.255 6.75488 13.255C8.36488 13.255 9.84488 12.665 10.9849 11.685L11.2549 11.965V12.755L16.2549 17.745L17.7449 16.255L12.7549 11.255ZM6.75488 11.255C4.26488 11.255 2.25488 9.245 2.25488 6.755C2.25488 4.26501 4.26488 2.255 6.75488 2.255C9.24488 2.255 11.2549 4.26501 11.2549 6.755C11.2549 9.245 9.24488 11.255 6.75488 11.255Z' fill='%23000000'/%3E%3C/svg%3E%0A"); 65 | mask-image: url("data:image/svg+xml,%3Csvg width='18' height='18' viewBox='0 0 18 18' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M12.7549 11.255H11.9649L11.6849 10.985C12.6649 9.845 13.2549 8.365 13.2549 6.755C13.2549 3.165 10.3449 0.255005 6.75488 0.255005C3.16488 0.255005 0.254883 3.165 0.254883 6.755C0.254883 10.345 3.16488 13.255 6.75488 13.255C8.36488 13.255 9.84488 12.665 10.9849 11.685L11.2549 11.965V12.755L16.2549 17.745L17.7449 16.255L12.7549 11.255ZM6.75488 11.255C4.26488 11.255 2.25488 9.245 2.25488 6.755C2.25488 4.26501 4.26488 2.255 6.75488 2.255C9.24488 2.255 11.2549 4.26501 11.2549 6.755C11.2549 9.245 9.24488 11.255 6.75488 11.255Z' fill='%23000000'/%3E%3C/svg%3E%0A"); 66 | -webkit-mask-size: 100%; 67 | mask-size: 100%; 68 | z-index: 9; 69 | pointer-events: none; 70 | } 71 | 72 | .pagefind-modular-input { 73 | height: calc(64px * var(--pagefind-ui-scale)); 74 | padding: 0 calc(70px * var(--pagefind-ui-scale)) 0 calc(54px * var(--pagefind-ui-scale)); 75 | background-color: var(--pagefind-ui-background); 76 | border: var(--pagefind-ui-border-width) solid var(--pagefind-ui-border); 77 | border-radius: var(--pagefind-ui-border-radius); 78 | font-size: calc(21px * var(--pagefind-ui-scale)); 79 | position: relative; 80 | appearance: none; 81 | -webkit-appearance: none; 82 | display: flex; 83 | width: 100%; 84 | box-sizing: border-box; 85 | font-weight: 700; 86 | } 87 | 88 | .pagefind-modular-input::placeholder { 89 | opacity: 0.2; 90 | } 91 | 92 | .pagefind-modular-input-clear { 93 | position: absolute; 94 | top: calc(2px * var(--pagefind-ui-scale)); 95 | right: calc(2px * var(--pagefind-ui-scale)); 96 | height: calc(60px * var(--pagefind-ui-scale)); 97 | border-radius: var(--pagefind-ui-border-radius); 98 | padding: 0 calc(15px * var(--pagefind-ui-scale)) 0 calc(2px * var(--pagefind-ui-scale)); 99 | color: var(--pagefind-ui-text); 100 | font-size: calc(14px * var(--pagefind-ui-scale)); 101 | cursor: pointer; 102 | background-color: var(--pagefind-ui-background); 103 | border: none; 104 | appearance: none; 105 | } 106 | 107 | /* ResultList */ 108 | 109 | .pagefind-modular-list-result { 110 | list-style-type: none; 111 | display: flex; 112 | align-items: flex-start; 113 | gap: min(calc(40px * var(--pagefind-ui-scale)), 3%); 114 | padding: calc(30px * var(--pagefind-ui-scale)) 0 calc(40px * var(--pagefind-ui-scale)); 115 | border-top: solid var(--pagefind-ui-border-width) var(--pagefind-ui-border); 116 | } 117 | 118 | .pagefind-modular-list-result:last-of-type { 119 | border-bottom: solid var(--pagefind-ui-border-width) var(--pagefind-ui-border); 120 | } 121 | 122 | .pagefind-modular-list-thumb { 123 | width: min(30%, 124 | calc((30% - (100px * var(--pagefind-ui-scale))) * 100000)); 125 | max-width: calc(120px * var(--pagefind-ui-scale)); 126 | margin-top: calc(10px * var(--pagefind-ui-scale)); 127 | aspect-ratio: var(--pagefind-ui-image-box-ratio); 128 | position: relative; 129 | } 130 | 131 | .pagefind-modular-list-image { 132 | display: block; 133 | position: absolute; 134 | left: 50%; 135 | transform: translateX(-50%); 136 | font-size: 0; 137 | width: auto; 138 | height: auto; 139 | max-width: 100%; 140 | max-height: 100%; 141 | border-radius: var(--pagefind-ui-image-border-radius); 142 | } 143 | 144 | .pagefind-modular-list-inner { 145 | flex: 1; 146 | display: flex; 147 | flex-direction: column; 148 | align-items: flex-start; 149 | margin-top: calc(10px * var(--pagefind-ui-scale)); 150 | } 151 | 152 | .pagefind-modular-list-title { 153 | display: inline-block; 154 | font-weight: 700; 155 | font-size: calc(21px * var(--pagefind-ui-scale)); 156 | margin-top: 0; 157 | margin-bottom: 0; 158 | } 159 | 160 | .pagefind-modular-list-link { 161 | color: var(--pagefind-ui-text); 162 | text-decoration: none; 163 | } 164 | 165 | .pagefind-modular-list-link:hover { 166 | text-decoration: underline; 167 | } 168 | 169 | .pagefind-modular-list-excerpt { 170 | display: inline-block; 171 | font-weight: 400; 172 | font-size: calc(16px * var(--pagefind-ui-scale)); 173 | margin-top: calc(4px * var(--pagefind-ui-scale)); 174 | margin-bottom: 0; 175 | min-width: calc(250px * var(--pagefind-ui-scale)); 176 | } 177 | 178 | /* FilterPills */ 179 | 180 | .pagefind-modular-filter-pills-wrapper { 181 | overflow-x: scroll; 182 | padding: 15px 0; 183 | } 184 | 185 | .pagefind-modular-filter-pills { 186 | display: flex; 187 | gap: 6px; 188 | } 189 | 190 | .pagefind-modular-filter-pill { 191 | display: flex; 192 | justify-content: center; 193 | align-items: center; 194 | border: none; 195 | appearance: none; 196 | padding: 0 calc(24px * var(--pagefind-ui-scale)); 197 | background-color: var(--pagefind-ui-background); 198 | color: var(--pagefind-ui-fade); 199 | border: var(--pagefind-ui-border-width) solid var(--pagefind-ui-border); 200 | border-radius: calc(25px * var(--pagefind-ui-scale)); 201 | font-size: calc(18px * var(--pagefind-ui-scale)); 202 | height: calc(50px * var(--pagefind-ui-scale)); 203 | cursor: pointer; 204 | white-space: nowrap; 205 | } 206 | 207 | .pagefind-modular-filter-pill:hover { 208 | border-color: var(--pagefind-ui-primary); 209 | } 210 | 211 | .pagefind-modular-filter-pill[aria-pressed="true"] { 212 | border-color: var(--pagefind-ui-primary); 213 | color: var(--pagefind-ui-primary); 214 | } -------------------------------------------------------------------------------- /pagefind/pagefind.en-us_1259a1251d43c.pf_meta: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rsdoiel/scripttool/3426f9bd02994d6445974c84d5a2066ec970e89f/pagefind/pagefind.en-us_1259a1251d43c.pf_meta -------------------------------------------------------------------------------- /pagefind/pagefind.en-us_1481db529d9e5.pf_meta: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rsdoiel/scripttool/3426f9bd02994d6445974c84d5a2066ec970e89f/pagefind/pagefind.en-us_1481db529d9e5.pf_meta -------------------------------------------------------------------------------- /pagefind/pagefind.en-us_3836a6e7e8520.pf_meta: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rsdoiel/scripttool/3426f9bd02994d6445974c84d5a2066ec970e89f/pagefind/pagefind.en-us_3836a6e7e8520.pf_meta -------------------------------------------------------------------------------- /pagefind/pagefind.en-us_696b658f4ad09.pf_meta: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rsdoiel/scripttool/3426f9bd02994d6445974c84d5a2066ec970e89f/pagefind/pagefind.en-us_696b658f4ad09.pf_meta -------------------------------------------------------------------------------- /pagefind/pagefind.en-us_ad2baabbe46a7.pf_meta: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rsdoiel/scripttool/3426f9bd02994d6445974c84d5a2066ec970e89f/pagefind/pagefind.en-us_ad2baabbe46a7.pf_meta -------------------------------------------------------------------------------- /pagefind/pagefind.en-us_f0e748c2ed5fd.pf_meta: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rsdoiel/scripttool/3426f9bd02994d6445974c84d5a2066ec970e89f/pagefind/pagefind.en-us_f0e748c2ed5fd.pf_meta -------------------------------------------------------------------------------- /pagefind/pagefind.en-us_f4b67663f92e1.pf_meta: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rsdoiel/scripttool/3426f9bd02994d6445974c84d5a2066ec970e89f/pagefind/pagefind.en-us_f4b67663f92e1.pf_meta -------------------------------------------------------------------------------- /pagefind/pagefind.en_7d8f3159e1.pf_meta: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rsdoiel/scripttool/3426f9bd02994d6445974c84d5a2066ec970e89f/pagefind/pagefind.en_7d8f3159e1.pf_meta -------------------------------------------------------------------------------- /pagefind/pagefind.en_82e44ff7d1.pf_meta: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rsdoiel/scripttool/3426f9bd02994d6445974c84d5a2066ec970e89f/pagefind/pagefind.en_82e44ff7d1.pf_meta -------------------------------------------------------------------------------- /pagefind/pagefind.en_8d21f838a9.pf_meta: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rsdoiel/scripttool/3426f9bd02994d6445974c84d5a2066ec970e89f/pagefind/pagefind.en_8d21f838a9.pf_meta -------------------------------------------------------------------------------- /pagefind/pagefind.en_d298c8931c.pf_meta: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rsdoiel/scripttool/3426f9bd02994d6445974c84d5a2066ec970e89f/pagefind/pagefind.en_d298c8931c.pf_meta -------------------------------------------------------------------------------- /pagefind/wasm.en-us.pagefind: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rsdoiel/scripttool/3426f9bd02994d6445974c84d5a2066ec970e89f/pagefind/wasm.en-us.pagefind -------------------------------------------------------------------------------- /pagefind/wasm.en.pagefind: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rsdoiel/scripttool/3426f9bd02994d6445974c84d5a2066ec970e89f/pagefind/wasm.en.pagefind -------------------------------------------------------------------------------- /pagefind/wasm.unknown.pagefind: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rsdoiel/scripttool/3426f9bd02994d6445974c84d5a2066ec970e89f/pagefind/wasm.unknown.pagefind -------------------------------------------------------------------------------- /publish.bash: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # 3 | 4 | WORKING_BRANCH=$(git branch | grep -E "\* " | cut -d\ -f 2) 5 | if [ "$WORKING_BRANCH" = "gh-pages" ]; then 6 | git commit -am "publishing to gh-pages branch" 7 | git push origin gh-pages 8 | else 9 | echo "You're in $WORKING_BRANCH branch" 10 | echo "You need to pull in changes to the gh-pages branch to publish" 11 | read -p "Pull into gh-pages and publish? Y/N " YES_NO 12 | if [ "$YES_NO" = "Y" ] || [ "$YES_NO" = "y" ]; then 13 | echo "Committing and pushing to $WORKING_BRANCH" 14 | git commit -am "commiting to $WORKING_BRANCH" 15 | git push origin "$WORKING_BRANCH" 16 | echo "Changing branchs from $WORKING_BRANCH to gh-pages" 17 | git checkout gh-pages 18 | echo "Merging changes from origin gh-pages" 19 | git pull origin gh-pages 20 | git commit -am "merging origin gh-pages" 21 | echo "Pulling changes from $WORKING_BRANCH info gh-pages" 22 | git pull origin "$WORKING_BRANCH" 23 | echo "Merging changes from $WORKING_BRANCH" 24 | git commit -am "merging $WORKING_BRANCH with gh-pages" 25 | echo "Pushing changes up and publishing" 26 | git push origin gh-pages 27 | echo "Changing back to your working branch $WORKING_BRANCH" 28 | git checkout "$WORKING_BRANCH" 29 | fi 30 | fi 31 | -------------------------------------------------------------------------------- /release-notes.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | R. S. Doiel, Software Engineer/Analyst - release-notes 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 26 | 27 |
28 | 29 | 30 |

Releases

31 |

v0.0.7, 2022-08-07, project 32 | refresh

33 |

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.

41 |

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.

49 |
50 | 51 |
52 |
53 | 54 | 55 | 56 | -------------------------------------------------------------------------------- /release-notes.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: scripttool releases 3 | --- 4 | 5 | Releases 6 | ======== 7 | 8 | v0.0.7, 2022-08-07, project refresh 9 | ----------------------------------- 10 | 11 | This release is mostly a code re-organization due to changes in how Go 1.18 supports modules. The packages osf, fountain, and fdx are now part of the scripttool. The modules are largely stable. It's been years since I've changed them. The scripttool itself has bee restructure. A major change is the command line syntax. I am now using a `scripttool [-help|-version|-license] VERB [OPTIONS] [ADDITIONAL_PARAMETERS]`. Each "verb" can have its own set of options and they come after the "verb" before it expected additional parameters. 12 | 13 | The build process for source code and website have been significantly updated. I'm using Pandoc and pdtk to build the website. The old Makefile and Python scripts have been replace by a two new Makefile (i.e. Makefile, website.mak). 14 | 15 | In the `scripttool` command the "characters" verb will list the characters found in a fountain formatted screenplay. By default it is order of appearance but there is now an option `-alpha` for alphabetical sorts. 16 | 17 | -------------------------------------------------------------------------------- /release.bash: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # 4 | # Generate a new draft release using jq and gh 5 | # 6 | RELEASE_TAG="v$(jq -r .version codemeta.json)" 7 | RELEASE_NOTES="$(jq -r .releaseNotes codemeta.json)" 8 | make save msg="prep for ${RELEASE_TAG}, $RELEASE_NOTES}" 9 | # Now generate a draft releas 10 | gh release create "${RELEASE_TAG}" \ 11 | --verify-tag --draft \ 12 | --notes="${RELEASE_NOTES}" \ 13 | dist/*.zip 14 | echo "Now goto repo release and finalize draft" 15 | -------------------------------------------------------------------------------- /scripttool.1.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | R. S. Doiel, Software Engineer/Analyst - scripttool.1 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 26 | 27 |
28 | 29 | 30 |

NAME

31 |

scripttool

32 |

SYNOPSIS

33 |

scripttool [-help,-version,-license] VERB OPTIONS [VERB PARAMETERS]

35 |

DESCRIPTION

36 |

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.

47 |

verbs

48 |

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.

53 |

Convert FadeIn files

54 |
55 |
fadein2fdx
56 |
57 | Converts a FadeIn file to Final Draft XML 58 |
59 |
fadein2fountain
60 |
61 | Converts a FadeIn file to fountain screenplay format 62 |
63 |
fadein2json
64 |
65 | Convert a FadeIn file to JSON format 66 |
67 |
fadein2osf
68 |
69 | Convert a FadeIn file to Open Screenplay Format 2.0 70 |
71 |
72 |

Convert Final Draft XML

73 |
74 |
fdx2fadein
75 |
76 | Convert from Final Draft XML (“*.fdx” files) to FadeIn format 77 |
78 |
fdx2fountain
79 |
80 | Convert from Final Draft XML (“*.fdx” files) to Fountain screenplay 81 | format) 82 |
83 |
fdx2json
84 |
85 | Convert from Final Draft XML (“*.fdx” files) to JSON 86 |
87 |
fdx2osf
88 |
89 | Convert from Final Draft XML (“*.fdx” files) to Open Screenplay Format 90 | 2.0 91 |
92 |
93 |

Convert Open Screenplay 94 | Format 2.0

95 |
96 |
osf2fadein
97 |
98 | Convert from Open Screenplay Format 2.0 to FadeIn 99 |
100 |
osf2fdx
101 |
102 | Convert from Open Screenplay Format 2.0 to Final Draft XML 103 |
104 |
osf2fountain
105 |
106 | Convert from Open Screenplay Format 2.0 to Fountain screenplay format 107 |
108 |
osf2json
109 |
110 | Convert from Open Screenplay Format 2.0 to JSON 111 |
112 |
113 |

Convert Fountain fomat

114 |
115 |
fountain2fadein
116 |
117 | Converts a fountain screenplay formatted file to FadeIn formatted file. 118 |
119 |
fountain2fdx
120 |
121 | Convert a Fountain screenplay formatted file to Final Draft XML 122 |
123 |
fountain2json
124 |
125 | Convert a Fountain screenplay formatted file to JSON 126 |
127 |
fountain2osf
128 |
129 | Convert a Fountain screenplay formatted file to Open Screenplay Format 130 | 2.0 131 |
132 |
fountainfmt
133 |
134 | Pretty print a fountain screenplay format 135 |
136 |
characters
137 |
138 | Provide a character list from a fountain formatted file. Internally the 139 | fountain file is parse and resulting JSON structure is analyzed to 140 | produce the count of character references in the elements of the file. 141 |
142 |
143 |

OPTIONS

144 |

Below are a set of options available.

145 |
146 |
-help
147 |
148 | display help 149 |
150 |
-license
151 |
152 | display license 153 |
154 |
-version
155 |
156 | display version number 157 |
158 |
159 |

VERB OPTIONS

160 |
161 |
-i
162 |
163 | set input filename 164 |
165 |
-o
166 |
167 | set output filename 168 |
169 |
-notes
170 |
171 | include notes in output 172 |
173 |
-synopsis
174 |
175 | include synopsis in output 176 |
177 |
-section
178 |
179 | include section headings in output 180 |
181 |
-width
182 |
183 | set max width in integers 184 |
185 |
-html
186 |
187 | output full HTML page 188 |
189 |
-inline-css
190 |
191 | include inline CSS (works with -html option) 192 |
193 |
-link-css
194 |
195 | include CSS link (works with -html option) 196 |
197 |
-pretty
198 |
199 | pretty print output 200 |
201 |
-alpha
202 |
203 | sort characters alphabetically instead of appearence order 204 |
205 |
206 |

EXAMPLES

207 |

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 |
221 | 222 |
223 |
224 | 225 | 226 | 227 | -------------------------------------------------------------------------------- /scripttool.1.md: -------------------------------------------------------------------------------- 1 | % scripttool(1) scripttool user manual 2 | % R. S. Doiel 3 | % Augest 4, 2022 4 | 5 | # NAME 6 | 7 | scripttool 8 | 9 | # SYNOPSIS 10 | 11 | scripttool [-help,-version,-license] VERB [OPTIONS] [VERB PARAMETERS] 12 | 13 | 14 | # DESCRIPTION 15 | 16 | _scripttool_ a program for converting between screenplay formats (e.g. .fdx, .fadein, .fountain) 17 | 18 | _scripttool_ converts screen play file formats. Supported formats include FileDraft's XML format, FadeIn's zipped XML format, Fountain formatted plain text as the Open Screenplay Format XML documents. The command line program is based on a Go package also called scripttool. The Go package can be compiled to a shared library and integrated with Python via the ctypes package. 19 | 20 | Internally _scripttool_ works with Fountain formatter files for reporting purposes. You can use the `fountain2json` verb to see the data structure represented as JSON for reports. 21 | 22 | # verbs 23 | 24 | Like many recent command line tools running under POSIX _scripttool_ uses 25 | a `CMD VERB [INPUT_FILENAME] [OUTPUT_FILENAME]` scheme. The following verbs are provided. Each "verb" may also have related options. 26 | 27 | ## Convert FadeIn files 28 | 29 | fadein2fdx 30 | : Converts a FadeIn file to Final Draft XML 31 | 32 | fadein2fountain 33 | : Converts a FadeIn file to fountain screenplay format 34 | 35 | fadein2json 36 | : Convert a FadeIn file to JSON format 37 | 38 | fadein2osf 39 | : Convert a FadeIn file to Open Screenplay Format 2.0 40 | 41 | ## Convert Final Draft XML 42 | 43 | fdx2fadein 44 | : Convert from Final Draft XML ("*.fdx" files) to FadeIn format 45 | 46 | fdx2fountain 47 | : Convert from Final Draft XML ("*.fdx" files) to Fountain screenplay format) 48 | 49 | fdx2json 50 | : Convert from Final Draft XML ("*.fdx" files) to JSON 51 | 52 | fdx2osf 53 | : Convert from Final Draft XML ("*.fdx" files) to Open Screenplay Format 2.0 54 | 55 | ## Convert Open Screenplay Format 2.0 56 | 57 | osf2fadein 58 | : Convert from Open Screenplay Format 2.0 to FadeIn 59 | 60 | osf2fdx 61 | : Convert from Open Screenplay Format 2.0 to Final Draft XML 62 | 63 | osf2fountain 64 | : Convert from Open Screenplay Format 2.0 to Fountain screenplay format 65 | 66 | osf2json 67 | : Convert from Open Screenplay Format 2.0 to JSON 68 | 69 | ## Convert Fountain fomat 70 | 71 | fountain2fadein 72 | : Converts a fountain screenplay formatted file to FadeIn formatted file. 73 | 74 | fountain2fdx 75 | : Convert a Fountain screenplay formatted file to Final Draft XML 76 | 77 | fountain2json 78 | : Convert a Fountain screenplay formatted file to JSON 79 | 80 | fountain2osf 81 | : Convert a Fountain screenplay formatted file to Open Screenplay Format 2.0 82 | 83 | fountainfmt 84 | : Pretty print a fountain screenplay format 85 | 86 | characters 87 | : Provide a character list from a fountain formatted file. Internally the fountain file is parse and resulting JSON structure is analyzed to produce the count of character references in the elements of the file. 88 | 89 | 90 | 91 | # OPTIONS 92 | 93 | Below are a set of options available. 94 | 95 | -help 96 | : display help 97 | 98 | -license 99 | : display license 100 | 101 | -version 102 | : display version number 103 | 104 | # VERB OPTIONS 105 | 106 | -i 107 | : set input filename 108 | 109 | -o 110 | : set output filename 111 | 112 | -notes 113 | : include notes in output 114 | 115 | -synopsis 116 | : include synopsis in output 117 | 118 | -section 119 | : include section headings in output 120 | 121 | -width 122 | : set max width in integers 123 | 124 | -html 125 | : output full HTML page 126 | 127 | -inline-css 128 | : include inline CSS (works with -html option) 129 | 130 | -link-css 131 | : include CSS link (works with -html option) 132 | 133 | -pretty 134 | : pretty print output 135 | 136 | -alpha 137 | : sort characters alphabetically instead of appearence order 138 | 139 | 140 | # EXAMPLES 141 | 142 | Converting *screenplay.fdx* to *screenplay.fountain* (2 examples) 143 | 144 | ~~~shell 145 | scripttool fdx2fountain screenplay.fdx screenplay.fountain 146 | scripttool fdx2fountain -i screenplay.fdx -o screenplay.fountain 147 | ~~~ 148 | 149 | Converting *screenplay.fountain* to *screenplay.fdx* (2 examples) 150 | 151 | ~~~shell 152 | scripttool fountain2fdx screenplay.fountain screenplay.fdx 153 | scripttool fountain2fdx -i screenplay.fountain -o screenplay.fdx 154 | ~~~ 155 | 156 | Listing characters from a *screenplay.fountain*. First list is order of appearence and the second set is characters sorted alphabetically using the "-alpha" option. 157 | 158 | ~~~shell 159 | scripttool characters screenplay.fountain 160 | scripttool characters -alpha screenplay.fountain 161 | ~~~ 162 | 163 | 164 | -------------------------------------------------------------------------------- /scripttool_test.go: -------------------------------------------------------------------------------- 1 | // scripttool is a package focused on converting to/from different 2 | // file formats used in working with scripts, screenplays and other 3 | // creative writing. 4 | // 5 | // @author R. S. Doiel, 6 | // 7 | // # BSD 2-Clause License 8 | // 9 | // Copyright (c) 2021, R. S. Doiel 10 | // All rights reserved. 11 | // 12 | // Redistribution and use in source and binary forms, with or without 13 | // modification, are permitted provided that the following conditions are met: 14 | // 15 | // - Redistributions of source code must retain the above copyright notice, this 16 | // list of conditions and the following disclaimer. 17 | // 18 | // - Redistributions in binary form must reproduce the above copyright notice, 19 | // this list of conditions and the following disclaimer in the documentation 20 | // and/or other materials provided with the distribution. 21 | // 22 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 23 | // AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 24 | // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 25 | // DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE 26 | // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 27 | // DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 28 | // SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 29 | // CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 30 | // OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 31 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 32 | package scripttool 33 | 34 | import ( 35 | "encoding/xml" 36 | "fmt" 37 | "io/ioutil" 38 | "os" 39 | "path" 40 | "testing" 41 | 42 | // My Packages 43 | "github.com/rsdoiel/fdx" 44 | ) 45 | 46 | var ( 47 | expectedDocs map[string][]byte 48 | ) 49 | 50 | func screenplayFile(t *testing.T, dir, fname string) { 51 | dName := "testout" 52 | if _, err := os.Stat(dName); os.IsNotExist(err) { 53 | os.MkdirAll(dName, 0775) 54 | } 55 | src, err := ioutil.ReadFile(path.Join(dir, fname)) 56 | if err != nil { 57 | if fname == "Big-Fish.fdx" { 58 | fmt.Fprintf(os.Stderr, "Skipping %s\n", fname) 59 | } else { 60 | fmt.Fprintf(os.Stderr, "Skipping %s, %s\n", fname, err) 61 | } 62 | return 63 | } 64 | screenplay := new(fdx.FinalDraft) 65 | if err := xml.Unmarshal(src, &screenplay); err != nil { 66 | t.Errorf("%s", err) 67 | t.FailNow() 68 | } else { 69 | os.RemoveAll(path.Join("testout", path.Base(fname))) 70 | if src2, err := xml.MarshalIndent(screenplay, " ", " "); err != nil { 71 | t.Errorf("%s", err) 72 | } else { 73 | if err := ioutil.WriteFile(path.Join("testout", path.Base(fname)), src2, 0666); err != nil { 74 | t.Errorf("%s", err) 75 | } 76 | } 77 | } 78 | } 79 | 80 | func TestConversion(t *testing.T) { 81 | screenplayFile(t, "testdata", "testplay-01a.fdx") 82 | screenplayFile(t, "testdata", "testplay-01b.fdx") 83 | screenplayFile(t, "testdata", "Big-Fish.fdx") 84 | } 85 | 86 | func TestMain(m *testing.M) { 87 | // Setup everything, process flags, etc. 88 | os.Exit(m.Run()) 89 | } 90 | -------------------------------------------------------------------------------- /snap/snapcraft.yaml: -------------------------------------------------------------------------------- 1 | name: scripttool # you probably want to 'snapcraft register ' 2 | base: core20 # the base snap is the execution environment for this snap 3 | version: '0.0.9' # just for humans, typically '1.2+git' or '1.3.2' 4 | summary: scripttool, a program for converting screen play formats 5 | description: | 6 | scripttool can be used to convert common "plain text" style 7 | screenplay markups such as Fountain, OSF (Open Screenplay Format), 8 | FadeIn and FinalDraft's fdx XML format. 9 | 10 | See https://github.com/rsdoiel/scripttool 11 | 12 | grade: devel # must be 'stable' to release into candidate/stable channels 13 | confinement: strict # use 'strict' once you have the right plugs and slots 14 | 15 | apps: 16 | scripttool: 17 | command: bin/scripttool 18 | plugs: 19 | - home 20 | - desktop 21 | - removable-media 22 | 23 | parts: 24 | scripttool: 25 | # See 'snapcraft plugins' 26 | plugin: go 27 | go-channel: stable 28 | build-environment: 29 | - "CGO_ENABLED" : "1" 30 | source-type: git 31 | source: https://github.com/rsdoiel/scripttool 32 | -------------------------------------------------------------------------------- /testdata.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | R. S. Doiel, Software Engineer/Analyst - testdata 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 26 | 27 |
28 | 29 | 30 |

About the test data

31 |

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.

41 |

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.

45 |

Optional test FDX files

46 | 72 |
73 | 74 |
75 |
76 | 77 | 78 | 79 | -------------------------------------------------------------------------------- /testdata.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: scripttool, a program for converting screen play formats 3 | --- 4 | 5 | About the test data 6 | =================== 7 | 8 | The testing data for scripttool and its sub-packages fountain, fdx and 9 | osf are held in common in this repository's _testdata_ directory. 10 | 11 | The [fountain](https://fountain.io) website has some good files 12 | for reviewing formatting difference between fountain, fdx and 13 | PDF. Some are referenced in the test programs but they are 14 | optional. It is not clear to me the licensing arrangements for 15 | the text so I have not included them in this repository. You can 16 | use the *bash* script `get-optional-testdata.bash` to retrieve 17 | them from the fountain.io website. 18 | 19 | If you want to include them in the test sequence go to the 20 | fountain website and download them and place them in the _testdata_ 21 | directory. When you run `go test` they will be found and included 22 | in the basic test process. 23 | 24 | Optional test FDX files 25 | ----------------------- 26 | 27 | + [Big Fish](https://fountain.io/_downloads/Big%20Fish.fountain) 28 | + [fdx](https://fountain.io/_downloads/Big%20Fish.fdx) 29 | + [pdf](https://fountain.io/_downloads/Big%20Fish.pdf) 30 | + [Brick & Steel](https://fountain.io/_downloads/Brick%20&%20Steel.fountain) 31 | + [fdx](https://fountain.io/_downloads/Brick%20&%20Steel.fdx) 32 | + [pdf](https://fountain.io/_downloads/Brick%20&%20Steel.pdf) 33 | + [Birthday Card](https://fountain.io/_downloads/The%20Last%20Birthday%20Card.fountain) 34 | + [fdx](https://fountain.io/_downloads/The%20Last%20Birthday%20Card.fdx) 35 | + [pdf](https://fountain.io/_downloads/The%20Last%20Birthday%20Card.pdf) 36 | 37 | -------------------------------------------------------------------------------- /testdata/Screenplay_Sample.osf: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 |