Repository navigation
Expand file tree
/
Copy pathcli_docs.go
More file actions
215 lines (136 loc) · 4.93 KB
/
Copy pathcli_docs.go
File metadata and controls
215 lines (136 loc) · 4.93 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
package scripttool
const (
HelpText = `% scripttool(1) scripttool user manual
% R. S. Doiel
% October 27, 2026
# NAME
scripttool
# SYNOPSIS
scripttool [-help,-version,-license] VERB [OPTIONS] [VERB PARAMETERS]
# DESCRIPTION
_scripttool_ a program for converting between screenplay formats (e.g. .fdx, .fadein, .fountain)
_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.
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.
# verbs
Like many recent command line tools running under POSIX _scripttool_ uses
a ` + "`" + `CMD VERB [INPUT_FILENAME] [OUTPUT_FILENAME]` + "`" + ` scheme. The following verbs are provided. Each "verb" may also have related options.
## Convert FadeIn files
fadein2fdx
: Converts a FadeIn file to Final Draft XML
fadein2fountain
: Converts a FadeIn file to fountain screenplay format
fadein2json
: Convert a FadeIn file to JSON format
fadein2osf
: Convert a FadeIn file to Open Screenplay Format 2.0
fadein2yaml
: Convert a FadeIn file to YAML format
## Convert Final Draft XML
fdx2fadein
: Convert from Final Draft XML ("*.fdx" files) to FadeIn format
fdx2fountain
: Convert from Final Draft XML ("*.fdx" files) to Fountain screenplay format)
fdx2json
: Convert from Final Draft XML ("*.fdx" files) to JSON
fdx2yaml
: Convert from Final Draft XML ("*.fdx" files) to YAML
fdx2osf
: Convert from Final Draft XML ("*.fdx" files) to Open Screenplay Format 2.0
## Convert Open Screenplay Format 2.0
osf2fadein
: Convert from Open Screenplay Format 2.0 to FadeIn
osf2fdx
: Convert from Open Screenplay Format 2.0 to Final Draft XML
osf2fountain
: Convert from Open Screenplay Format 2.0 to Fountain screenplay format
osf2json
: Convert from Open Screenplay Format 2.0 to JSON
osf2yaml
: Convert from Open Screenplay Format 2.0 to YAML
## Convert Fountain fomat
fountain2fadein
: Converts a fountain screenplay formatted file to FadeIn formatted file.
fountain2fdx
: Convert a Fountain screenplay formatted file to Final Draft XML
fountain2json
: Convert a Fountain screenplay formatted file to JSON
fountain2yaml
: Convert a Fountain screenplay formatted file to YAML
fountain2osf
: Convert a Fountain screenplay formatted file to Open Screenplay Format 2.0
fountain2fountain
: Parse a Fountain screenplay and write it back out as Fountain
fountain2html
: Render a Fountain screenplay as Fountain scrippets HTML
fountainfmt
: Pretty print a fountain screenplay format
characters
: 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.
# HELP TOPICS
_scripttool help_ prints this manual. _scripttool help index_ lists the help
topics and _scripttool help TOPIC_ prints one of them.
# OPTIONS
Below are a set of options available.
-h, -help
: display help
-l, -license
: display license
-v, -version
: display version number
# VERB OPTIONS
-i
: set input filename
-o
: set output filename
-notes
: include notes in output
-synopsis
: include synopsis in output
-section
: include section headings in output
-width
: set max width in integers
-html
: output full HTML page
-inline-css
: include inline CSS (works with -html option)
-link-css
: include CSS link (works with -html option)
-pretty
: pretty print output
-alpha
: sort characters alphabetically instead of appearence order
# EXIT STATUS
0
: success
2
: bad command line: an unknown option or verb, a surplus argument, a missing FadeIn file name
65
: the input cannot be read as the format the verb expects
66
: an input file does not exist
73
: the output file cannot be created
74
: reading or writing failed part way
77
: the operating system refused access to a file
The output file is created only after the conversion has succeeded.
# EXAMPLES
Converting *screenplay.fdx* to *screenplay.fountain* (2 examples)
~~~shell
scripttool fdx2fountain screenplay.fdx screenplay.fountain
scripttool fdx2fountain -i screenplay.fdx -o screenplay.fountain
~~~
Converting *screenplay.fountain* to *screenplay.fdx* (2 examples)
~~~shell
scripttool fountain2fdx screenplay.fountain screenplay.fdx
scripttool fountain2fdx -i screenplay.fountain -o screenplay.fdx
~~~
Listing characters from a *screenplay.fountain*. First list is order of appearence and the second set is characters sorted alphabetically using the "-alpha" option.
~~~shell
scripttool characters screenplay.fountain
scripttool characters -alpha screenplay.fountain
~~~
`
)