oskusalerma / blyte

Screenplay writing program

This URL has Read+Write access

blyte / fileformat.txt
100644 158 lines (105 sloc) 4.53 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
The screenplay is represented as a series of lines. Lines are separated by
a single byte 0x0A. The file is encoded in UTF-8, and begins with the
Unicode BOM marker, i.e. the bytes "EF BB BF".
 
There are two kinds of lines: Normal lines and config lines.
 
Config lines are of the form: "#", "Config-Name", " " (space),
"Config-Value". Config-Value can be empty. Example: "#Version 1". The
file's first line must contain the "Version" config value.
 
Config values:
 
"Version". Required. Value: integer >= 0. The fileformat version that the
file uses. Currently only version 1 exists.
 
"Title-Page". Value: None. Starts a new title page.
 
"Title-String". Adds a new string to the current title page. If no title
pages exist yet, creates one. Example:
 
 0.000000,70.000000,24,cb,Helvetica,,text here
 
 Format is: xpos,ypos,fontsize,flags,font,reserved,text
 
  'xpos' and 'ypos' are floating point values, giving the offset in
  millimeters of the upper-left corner of the text string from the
  upper-left corner of the page.
 
  'fontsize' is font size in points, e.g. 1/72 inch units.
 
  'flags' contains any combination of the following characters:
 
   c: Text is centered horizontally on the page. In this case xpos is not
   used for anything.
 
   b, i, u: Text is bold / italic / underlined.
 
  'font' is the font name. Currently supported are Courier, Helvetica and
  Times (Times-Roman).
 
  'reserved' is reserved for future expansion and is empty for now.
 
  'text' is the text string.
 
"Header-String". Adds a new header string. Example:
 
 1,0,r,,${PAGE}.
 
 Format is: line,xoff,flags,reserved,text
 
 'line' is the 1-based line number.
 
 'xoff' is the number of characters by which the string is offsetted in
 the horizontal direction. Can be negative.
 
 'flags' contains:
 
  Any combination of the following characters:
 
   b, i, u: Text is bold / italic / underlined.
 
  One of the following characters:
 
   l, c, r: Alignment is left / centered / right.
 
  'reserved' is reserved for future expansion and is empty for now.
 
  'text' is the text string.
 
"Header-Empty-Lines". Value: integer >= 0. If there are header lines, this
is the number of empty lines between headers and actual script contents.
 
 
Normal lines:
 
Each normal line has two bytes at the beginning that signal the type of
linebreak at the end of that line and the general type of the line, and
everything after that is the text of the line.
 
Linebreak types:
 
'>' - A single space.
 
'+' - Two spaces.
 
'&' - Nothing.
 
'|' - Forced.
 
'.' - Last line of the element.
 
More linebreak types are possibly going to be added in the future without
increasing the fileformat version number, so unknown linebreak types
should be converted to '>', and a warning given to user about this.
 
Line types:
 
'\' - Scene heading.
 
'.' - Action.
 
'_' - Character.
 
':' - Dialogue.
 
'(' - Parenthetical.
 
'/' - Transition.
 
'=' - Shot
 
'%' - Note
 
More line types are probably going to be added in the future without
increasing the fileformat version number, so unknown line types should be
converted to Action, and a warning given to user about this.
 
 
An example screenplay using this format:
 
#Version 1
#Title-String 0.000000,70.000000,24,cb,Helvetica,UNTITLED SCREENPLAY
#Title-String 0.000000,85.460000,12,c,Courier,by
#Title-String 0.000000,93.930000,12,c,Courier,Anonymous Writer
#Header-String 1,0,r,${PAGE}.
#Header-Empty-Lines 1
.\INT. WAREHOUSE - NIGHT
>.JIM and JASON, two men in their thirties, are standing in
>.the middle of an empty warehouse. The place looks like it was
..abandoned a long time ago.
..Jason walks behind a barrel and stoops to pick something up.
.=Insert - gun in Jason's hand.
._JIM
.:Hey, what's happening here?
.((looks at Jason)
>:What are you doing with that gun --
.:Hey man --
|.Jason SHOOTS Jim in the chest, twice.
..Jim collapses to the ground and twitches for a while, then stops.
.%Do we need a more gruesome death scene?
._JASON
.:Bad things happen to bad people.
..Jason pockets the gun and hurriedly exits the building.
>.A ghost-like figure rises up from Jim's body and hovers
..above the ground.
._JIM
.:Hey man, you almost killed me!
..He notices his own dead body on the ground.
._JIM
>:Uhh...I am dead, on second thought.
>:Sorry Jason, didn't mean to
.:question your shooting skills.
./DISSOLVE TO:
.\EXT. HIGHWAY, LOS ANGELES - DAY
>.Jason is driving along in his Porsche convertible. The sun
>.is shining, the radio is loud, and he has his sunglasses on.
..All in all, the world is looking up for him right now.