sm-transcript 0.0.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (45) hide show
  1. data/LICENSE.txt +23 -0
  2. data/README.txt +140 -0
  3. data/Rakefile +31 -0
  4. data/bin/results/PLACEHOLDER.txt +8 -0
  5. data/bin/sm-transcript +12 -0
  6. data/bin/transcripts/PLACEHOLDER.txt +8 -0
  7. data/lib/sm_transcript/LICENSE.txt +23 -0
  8. data/lib/sm_transcript/metadata.rb +69 -0
  9. data/lib/sm_transcript/metadata_reader.rb +56 -0
  10. data/lib/sm_transcript/options.rb +89 -0
  11. data/lib/sm_transcript/optparseExample.rb +113 -0
  12. data/lib/sm_transcript/process_csv_files_to_html.rb +58 -0
  13. data/lib/sm_transcript/process_seg_files.rb +21 -0
  14. data/lib/sm_transcript/process_seg_files_to_csv.rb +24 -0
  15. data/lib/sm_transcript/process_seg_files_to_html.rb +31 -0
  16. data/lib/sm_transcript/require_relative.rb +14 -0
  17. data/lib/sm_transcript/runner.rb +70 -0
  18. data/lib/sm_transcript/seg_reader.rb +42 -0
  19. data/lib/sm_transcript/transcript.rb +130 -0
  20. data/lib/sm_transcript/word.rb +31 -0
  21. data/lib/sm_transcript/wrd_reader.rb +42 -0
  22. data/test/Rakefile +14 -0
  23. data/test/results/IIHS_Diane_Davis_Nov2009.seg +425 -0
  24. data/test/results/NERCOMP-SpokenMedia4.wrd +6791 -0
  25. data/test/results/PLACEHOLDER.txt +8 -0
  26. data/test/results/PLACEHOLDER.txt.ignore +8 -0
  27. data/test/results/vijay_kumar.wrd +1675 -0
  28. data/test/results/wirehair-beetle.txt +6 -0
  29. data/test/test_metadata.rb +39 -0
  30. data/test/test_metadatareader.rb +30 -0
  31. data/test/test_options.rb +47 -0
  32. data/test/test_runner.rb +52 -0
  33. data/test/test_segreader.rb +39 -0
  34. data/test/test_transcript.rb +62 -0
  35. data/test/test_wrdreader.rb +43 -0
  36. data/test/transcripts/IIHS_Diane_Davis_Nov2009-t1.html +148 -0
  37. data/test/transcripts/PLACEHOLDER.txt +8 -0
  38. data/test/transcripts/data.js +24 -0
  39. data/test/transcripts/vijay_kumar-1.-t1.html +557 -0
  40. data/test/transcripts/vijay_kumar-1.t1.html +557 -0
  41. data/test/transcripts/vijay_kumar-t1.html +557 -0
  42. data/test/transcripts/vijay_kumar-t1.ttml +569 -0
  43. data/test/transcripts/vijay_kumar.data.js +2 -0
  44. data/test/transcripts/wirehair-beetle.data.js +3 -0
  45. metadata +234 -0
@@ -0,0 +1,2 @@
1
+ var SMData = {
2
+ 'videos': [
@@ -0,0 +1,3 @@
1
+ {"audio":{"en-US":"../audio/"},"transcripts":{"en-US":"transcript.trn"},"duration":523,"speaker":"The Right Reverend Castro Mayhem","title":"The Song of the Wirehair Beetle","id":"Nimrod Olson-1003261000","defaultLocale":"en-US","height":240,"video":"aboriginal_hairstyling.mov","preview":"preview.png","width":320}, {"locales":{"en-US":"English (US)"}}
2
+ ]
3
+ }
metadata ADDED
@@ -0,0 +1,234 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: sm-transcript
3
+ version: !ruby/object:Gem::Version
4
+ prerelease: false
5
+ segments:
6
+ - 0
7
+ - 0
8
+ - 3
9
+ version: 0.0.3
10
+ platform: ruby
11
+ authors:
12
+ - Peter Wilkins
13
+ autorequire:
14
+ bindir: bin
15
+ cert_chain: []
16
+
17
+ date: 2010-03-26 00:00:00 -04:00
18
+ default_executable:
19
+ dependencies: []
20
+
21
+ description: "$Id: README.txt 187 2010-03-22 19:32:07Z pwilkins $\n\n\
22
+ sm-transcript reads results of SLS processing and produces transcripts for\n\
23
+ the SpokenMedia browser. For each file in the source folder whose extension \n\
24
+ matches the source type, a file of destination type is created in the \n\
25
+ destination folder. All of these parameters have default values. \n\n\
26
+ Requirements:\n\
27
+ \tsm-transcript is written in Ruby and packaged as a RubyGem. Since Ruby is\n\
28
+ \tnot a compiled language, you will need to have Ruby installed on your \n\
29
+ \tmachine to run sm-transcript. You can determine if Ruby is installed by \n\
30
+ \ttyping \"ruby -v\" at a terminal prompt. It should return the version of \n\
31
+ \tRuby that is installed. If Ruby is not installed on your machine, contact\n\
32
+ \tme (or your local Ruby wizard) for assistance.\n\
33
+ \t\n\
34
+ Installation:\n\
35
+ \tYou can get sm-transcript as either a RubyGem or as source from svn.\n\
36
+ \t\n\
37
+ \tThe preferred way to install this package is as a Rubygem. You can \n\
38
+ \tdownload the gem from this page:\n\
39
+ \t\n\
40
+ \thttp://TBD\n\
41
+ \t\n\
42
+ \tand install it with this command: \n\
43
+ \t\n\
44
+ \tsudo gem install [--verbose] <path to gem file>sm-transcript-n.n.n.gem\n\
45
+ \t\n\
46
+ \tYou must use \"sudo\" to properly install the gem. If you execute \"gem \n\
47
+ \tinstall\" (omitting the \"sudo\") the gem is installed in your home gem \n\
48
+ \trepository and it isn't in your path without additional configuration.\n\
49
+ \t\n\
50
+ \tNote: You need sudo privileges to run the command as written. If you \n\
51
+ \tcan't sudo, then you can install it locally and will need some additional\n\
52
+ \tconfiguration. Contact me (or your local Ruby wizard) for assistance. \n\
53
+ \t \n\
54
+ \tThe executable is now in your path.\n\
55
+ \t\n\
56
+ \tYou can cleanly uninstall the gem with this command:\n\
57
+ \t\n\
58
+ \tsudo gem uninstall sm-transcript\t\n\
59
+ \t\n\
60
+ \tIf you have access to our svn repository, you are welcome to check out the \n\
61
+ \tcode. Be warned that the trunk tip is not necessarily stable. It changes \n\
62
+ \tfrequently as enhancements (and bug fixes) are added. (note that the\n\
63
+ \t'smb_transcript' in the command line below is not a typo. )\n\n\
64
+ \tsvn co svn+ssh://svn.mit.edu/oeit-tsa/SMB/smb_transcript/trunk sm_transcript\n\
65
+ \t\n\
66
+ \tbuild the gem by running this command from the directory you installed the \n\
67
+ \tsource.\n\
68
+ \t\n\
69
+ \trake gem\n\
70
+ \t\n\
71
+ \tThe gem will be built and put in ./pkg You can now use the gem \n\
72
+ \tinstallation instructions above.\n\
73
+ \t\n\n\
74
+ Using the App:\n\
75
+ \tRun with no command line parameters, the app reads *.wrd files out of \n\
76
+ \t./results and writes *t1.html files to ./transcripts. These directories\n\
77
+ \tare relative to where sm_transcript is called.\n\
78
+ \t\n\
79
+ \tNote: destination files are overwritten without a warning prompt. If you \n\
80
+ \twant to preserve an existing output file, rename it before running the app\n\
81
+ \tagain.\n\
82
+ \t\n\
83
+ \tFor example, run the app by navigating to the bin folder and running \n\n\
84
+ \t\tprojects/sm_transcript/bin felix$ sm_transcript\n\
85
+ \t\n\
86
+ \tThis command run from this folder will read *.wrd files from bin/results\n\
87
+ \tand write *-t1.html to bin/transcripts.\n\
88
+ \t\n\
89
+ \tUsage: sm_transcript [options] \n --srcdir PATH Read files from this folder (Default: ./results)\n --destdir PATH Write files to this folder (Default: ./transcripts)\n --srctype wrd | seg Kind of file to process (Default: wrd)\n --desttype html | ttml Kind of file to output (Default: html)\n -h, --help Show this message\t\n\n\n\
90
+ Troubleshooting:\n\
91
+ \tsm-transcript requires additional gems to operate. The RubyGem \n\
92
+ \tinstallation instructions should install dependencies automatically, but\n\
93
+ \tthey may not. If you get an error that includes \n\
94
+ \t\n\
95
+ \t... no such file to load -- builder (LoadError)\n\
96
+ \t\n\
97
+ \tin the first few lines when you run sm-transcript, the problem is a \n\
98
+ \tmissing dependent gem. (the error above indicates that the Builder \n\
99
+ \tgem is missing.) Try installing the missing gem. For the error above,\n\
100
+ \tcommand looks like this:\n\
101
+ \t\n\
102
+ \tsudo gem install builder\n\
103
+ \t\n\
104
+ \tSee \"Required Gems\" below for more information.\n\
105
+ \t\n\
106
+ \t\t\n\
107
+ Upgrading:\n\
108
+ \tYou can easily upgrade by simply executing the same command you used to \n\
109
+ \tinstall the gem. Running install again will add the newer version and make\n\
110
+ \tit active. By default the most recent version is used, but older versions\n\
111
+ \tare still available, simply inactive.\n\
112
+ \t\n\
113
+ \tIf are using svn, you should already know what to do.\n\
114
+ \t\n\
115
+ \t\n\
116
+ Required Gems:\n\
117
+ \tbuilder - create structured data, such as XML\n\
118
+ \textensions - added for the 'require_relative' command. (To get this\n\
119
+ \t command in Ruby 1.8 you need to install this gem, for Ruby 1.9\n\
120
+ \t the command is already part of the core.)\n\
121
+ \thtmlentities - html parsing\n\
122
+ \tjson - create JSON structured data\n\
123
+ \toptparse - option parsing\n\
124
+ \tostruct - open data structures\n\
125
+ \tppcommand - pp is a pretty printer. It is used only for debugging\n\
126
+ \trake - make for Ruby\n\
127
+ \trubygems - support for gems\n\
128
+ \tshoulda - enhancement for Test::Unit\n\
129
+ \t\t\n\
130
+ \tThis command installs gems on OSX and Linux:\n\
131
+ \tfelix$ sudo gem install <gem name>\n\
132
+ \t\n\
133
+ Unit Tests:\n\
134
+ \tYou may run all unit tests by navigating to the test folder and running \n\
135
+ \trake with no parameters (the default rake task runs all tests):\n\n\
136
+ \tprojects/sm_transcript/test felix$ rake \n\n\n\
137
+ Release Notes:\n\
138
+ \tInitial Version - runs under Ruby 1.8. \n\n\
139
+ To Do:\n\
140
+ \tupdate code to run under Ruby 1.9\n\n\
141
+ \tMake this a rubygem, making it available from an OEIT server, rather than\n\
142
+ \tfrom a public gem repository like RubyForge.\n\
143
+ \t"
144
+ email: pwilkins@mit.edu
145
+ executables:
146
+ - sm-transcript
147
+ extensions: []
148
+
149
+ extra_rdoc_files: []
150
+
151
+ files:
152
+ - lib/sm_transcript/LICENSE.txt
153
+ - lib/sm_transcript/metadata.rb
154
+ - lib/sm_transcript/metadata_reader.rb
155
+ - lib/sm_transcript/options.rb
156
+ - lib/sm_transcript/optparseExample.rb
157
+ - lib/sm_transcript/process_csv_files_to_html.rb
158
+ - lib/sm_transcript/process_seg_files.rb
159
+ - lib/sm_transcript/process_seg_files_to_csv.rb
160
+ - lib/sm_transcript/process_seg_files_to_html.rb
161
+ - lib/sm_transcript/require_relative.rb
162
+ - lib/sm_transcript/runner.rb
163
+ - lib/sm_transcript/seg_reader.rb
164
+ - lib/sm_transcript/transcript.rb
165
+ - lib/sm_transcript/word.rb
166
+ - lib/sm_transcript/wrd_reader.rb
167
+ - bin/sm-transcript
168
+ - bin/results/PLACEHOLDER.txt
169
+ - bin/transcripts/PLACEHOLDER.txt
170
+ - test/Rakefile
171
+ - test/results/IIHS_Diane_Davis_Nov2009.seg
172
+ - test/results/NERCOMP-SpokenMedia4.wrd
173
+ - test/results/PLACEHOLDER.txt
174
+ - test/results/PLACEHOLDER.txt.ignore
175
+ - test/results/vijay_kumar.wrd
176
+ - test/results/wirehair-beetle.txt
177
+ - test/test_metadata.rb
178
+ - test/test_metadatareader.rb
179
+ - test/test_options.rb
180
+ - test/test_runner.rb
181
+ - test/test_segreader.rb
182
+ - test/test_transcript.rb
183
+ - test/test_wrdreader.rb
184
+ - test/transcripts/data.js
185
+ - test/transcripts/IIHS_Diane_Davis_Nov2009-t1.html
186
+ - test/transcripts/PLACEHOLDER.txt
187
+ - test/transcripts/vijay_kumar-1.-t1.html
188
+ - test/transcripts/vijay_kumar-1.t1.html
189
+ - test/transcripts/vijay_kumar-t1.html
190
+ - test/transcripts/vijay_kumar-t1.ttml
191
+ - test/transcripts/vijay_kumar.data.js
192
+ - test/transcripts/wirehair-beetle.data.js
193
+ - README.txt
194
+ - LICENSE.txt
195
+ - Rakefile
196
+ has_rdoc: true
197
+ homepage: http://spokenmedia.mit.edu
198
+ licenses: []
199
+
200
+ post_install_message:
201
+ rdoc_options: []
202
+
203
+ require_paths:
204
+ - lib
205
+ required_ruby_version: !ruby/object:Gem::Requirement
206
+ requirements:
207
+ - - ">="
208
+ - !ruby/object:Gem::Version
209
+ segments:
210
+ - 1
211
+ - 8
212
+ version: "1.8"
213
+ required_rubygems_version: !ruby/object:Gem::Requirement
214
+ requirements:
215
+ - - ">="
216
+ - !ruby/object:Gem::Version
217
+ segments:
218
+ - 0
219
+ version: "0"
220
+ requirements:
221
+ - TBD
222
+ rubyforge_project:
223
+ rubygems_version: 1.3.6
224
+ signing_key:
225
+ specification_version: 3
226
+ summary: Convert word lists to transcripts
227
+ test_files:
228
+ - test/test_metadata.rb
229
+ - test/test_metadatareader.rb
230
+ - test/test_options.rb
231
+ - test/test_runner.rb
232
+ - test/test_segreader.rb
233
+ - test/test_transcript.rb
234
+ - test/test_wrdreader.rb