-
Notifications
You must be signed in to change notification settings - Fork 35
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #12 from Dash-Industry-Forum/update-sscgen
Add generate_ccs.py to generate ccs file and update sccgen.py.
- Loading branch information
Showing
4 changed files
with
53 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
00:00:00:00 | ||
# > is command | ||
# RCL = Resume Caption Loading (selects POP-ON) | ||
# ENM = Erase Non-Displaced Memory | ||
# EDM = Erase Displaced Memory | ||
# PAC = Preamble Address code | ||
# EOC = END of Caption. Will display caption | ||
> RCL ENM PAC_1_white | ||
eng: 00:00:00:00 | ||
> EDM EOC | ||
# Next second | ||
00:00:01:00 | ||
> RCL ENM PAC_2_green | ||
eng: 00:00:01:00 | ||
> EDM EOC |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
import os, sys | ||
from optparse import OptionParser | ||
|
||
def main(): | ||
parser = OptionParser(usage="%prog [options]", description="Create .ccs file with rolling timestamps every second") | ||
parser.add_option('-d', '--dur', help='duration in seconds [default: %default]', | ||
type='int', action='store', default=10, dest='duration') | ||
parser.add_option('-l', '--language', help='language [default: %default]', | ||
type='string', action='store', default="eng", dest='lang') | ||
(opts, _) = parser.parse_args() | ||
secs = 0 | ||
line_nrs = (1, 2, 3, 4, 5, 10, 11, 12, 13, 14) | ||
colors = ("white", "green", "blue", "cyan", "red", "yellow", "magenta", "italics") | ||
while secs < opts.duration: | ||
line_nr = line_nrs[secs % len(line_nrs)] | ||
color = colors[secs % len(colors)] | ||
minutes, seconds = divmod(secs, 60) | ||
print("00:%02d:%02d:00" % (minutes, seconds)) | ||
print("> RCL ENM PAC_%d_%s" % (line_nr, color)) | ||
print("%s: 00:%02d:%02d:00" % (opts.lang, minutes, seconds)) | ||
print("> EDM EOC") | ||
print("") | ||
secs += 1 | ||
|
||
if __name__ == "__main__": | ||
main() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters