Documentation ¶
Overview ¶
scripttool is a package focused on converting to/from different file formats used in working with scripts,screenplays and other creative writing.
@author R. S. Doiel, <[email protected]>
BSD 2-Clause License ¶
Copyright (c) 2021, R. S. Doiel All rights reserved.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
scripttool is a package focused on converting to/from different file formats used in working with scripts,screenplays and other creative writing.
@author R. S. Doiel, <[email protected]>
BSD 2-Clause License ¶
Copyright (c) 2021, R. S. Doiel All rights reserved.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Index ¶
- Constants
- func CharacterList(in io.Reader, out io.Writer, alphaSort bool) error
- func FadeInToFDX(inputFName string, out io.Writer) error
- func FadeInToFountain(inputFName string, out io.Writer) error
- func FadeInToJSON(inputFName string, out io.Writer) error
- func FadeInToOSF(inputFName string, out io.Writer) error
- func FadeInToYAML(inputFName string, out io.Writer) error
- func FdxToFadeIn(in io.Reader, outputFName string) error
- func FdxToFountain(in io.Reader, out io.Writer) error
- func FdxToJSON(in io.Reader, out io.Writer) error
- func FdxToOSF(in io.Reader, out io.Writer) error
- func FdxToYAML(in io.Reader, out io.Writer) error
- func FmtCliHelp(appName string, verb string) string
- func FmtCliText(s string, appName string, verb string, version string) string
- func FmtHelp(src string, appName string, version string, releaseDate string, ...) string
- func FountainFmt(in io.Reader, out io.Writer) error
- func FountainToFadeIn(in io.Reader, outFName string) error
- func FountainToFdx(in io.Reader, out io.Writer) error
- func FountainToFountain(in io.Reader, out io.Writer) error
- func FountainToHTML(in io.Reader, out io.Writer) error
- func FountainToJSON(in io.Reader, out io.Writer) error
- func FountainToOSF(in io.Reader, out io.Writer) error
- func FountainToYAML(in io.Reader, out io.Writer) error
- func OSFToFadeIn(in io.Reader, outputFName string) error
- func OSFToFdx(in io.Reader, out io.Writer) error
- func OSFToFountain(in io.Reader, out io.Writer) error
- func OSFToJSON(in io.Reader, out io.Writer) error
- func OSFToYAML(in io.Reader, out io.Writer) error
- func RunScripttool(in *os.File, out *os.File, eout *os.File, args []string) error
Constants ¶
const ( // Version number of release Version = "0.0.9" // ReleaseDate, the date version.go was generated ReleaseDate = "2024-03-11" // ReleaseHash, the Git hash when version.go was generated ReleaseHash = "7febcd7" LicenseText = `` /* 1258-byte string literal not displayed */ )
const (
HelpText = `% scripttool(1) scripttool user manual
% R. S. Doiel
% Augest 4, 2022
# 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
## 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
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
## 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
fountain2osf
: Convert a Fountain screenplay formatted file to Open Screenplay Format 2.0
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.
# OPTIONS
Below are a set of options available.
-help
: display help
-license
: display license
-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
# 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
~~~
`
)
Variables ¶
This section is empty.
Functions ¶
func CharacterList ¶
CharacterList lists character in a screenplay (in should be fountain formated text).
func FadeInToFDX ¶ added in v0.0.9
FadeInToFDX converts an input file to .fdx format
func FadeInToFountain ¶
FadeInToFountain converts an input file to .fountain format.
func FadeInToJSON ¶ added in v0.0.9
FadeInToJSON converts an input file to JSON format.
func FadeInToOSF ¶ added in v0.0.9
FadeInToOSF converts an input file to .fountain format.
func FadeInToYAML ¶ added in v0.0.9
FadeInToYAML converts an input file to YAML format.
func FdxToFadeIn ¶ added in v0.0.9
FdxToFadeIn converts an input buffer from .fdx to FadeIn file
func FdxToFountain ¶
FdxToFountain converts an input buffer from .fdx to a .fountain format.
func FdxToJSON ¶ added in v0.0.9
FdxToJSON converts an input buffer from a .fdx file to a .json format
func FdxToOSF ¶ added in v0.0.9
FdxToOSF concerts an input buffer from .fdx to Open Screenplay Format 2.0
func FdxToYAML ¶ added in v0.0.9
FdxToYAML converts an input buffer from a .fdx file to a .yaml format
func FmtCliHelp ¶ added in v0.0.9
func FmtCliText ¶ added in v0.0.9
func FmtHelp ¶ added in v0.0.9
func FmtHelp(src string, appName string, version string, releaseDate string, releaseHash string) string
FmtHelp lets you process a text block with simple curly brace markup.
func FountainFmt ¶ added in v0.0.5
FountainFmt pretty prints a fountain document, optionally passing on sections, synopsis and notes.
func FountainToFadeIn ¶
FountainToFadeIn converts an input buffer in .fountain format to output buffer in .fadein
func FountainToFdx ¶
Fountain2Fdx converts an input buffer in .fountain format to output buffer in .fdx
func FountainToFountain ¶
Fountain2Fountain reads a input buffer as .fountain and pretty prints output as .fountain
func FountainToHTML ¶ added in v0.0.5
FountainToHTML takes a fountain script and formats it in the fountain scrippets HTML markup that can be used with the scrippets CSS, see https://fountain.io/scrippets and https://johnaugust.com/2004/screenbox. FIXME: Write wrapping functioHTMLon and add appropriate writer method to fountain package.
func FountainToJSON ¶ added in v0.0.5
FountainToJSON convert .fountain file to JSON
func FountainToOSF ¶
FountainToOSF converts an input buffer in .fountain format to output buffer in .osf
func FountainToYAML ¶ added in v0.0.9
FountainToYAML convert .fountain file to YAML
func OSFToFadeIn ¶ added in v0.0.9
OSFToFadeIn converts the input buffer from .osf to FadeIn file
func OSFToFountain ¶
OSFToFountain converts the input buffer from .osf to .fountain format.
Types ¶
This section is empty.
Directories ¶
Path | Synopsis |
---|---|
cmd
|
|
scripttool
scripttool is a tool for working with screenplay file formats.
|
scripttool is a tool for working with screenplay file formats. |