timeline_setter 0.3.0 → 0.3.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -5,6 +5,8 @@
5
5
  <script src="../public/javascripts/vendor/jquery-min.js"></script>
6
6
  <script src="../public/javascripts/vendor/underscore-min.js"></script>
7
7
  <script src="../public/javascripts/timeline-setter.js"></script>
8
+ <script src="../public/javascripts/templates.js"></script>
9
+
8
10
  <script src="https://github.com/bcherry/twitter-text-js/raw/master/twitter-text.js"></script>
9
11
  <style>
10
12
  #timeline_setter .TS-item_label a {
@@ -17,26 +19,7 @@
17
19
  </head>
18
20
  <body style="height: 100%">
19
21
 
20
- <div id="timeline_setter">
21
- <div id="TS-top_matter_container">
22
- <div class="TS-controls">
23
- <a href="#" class="TS-zoom TS-zoom_in"><span class="TS-controls_inner_text TS-zoom_inner_text">+</span></a>
24
- <a href="#" class="TS-zoom TS-zoom_out"><span class="TS-controls_inner_text TS-zoom_inner_text">-</span></a>
25
- &nbsp;&nbsp;&nbsp;&nbsp;
26
- <a href="#" class="TS-choose TS-choose_prev">&laquo; <span class="TS-controls_inner_text">Previous</span></a>
27
- <a href="#" class="TS-choose TS-choose_next"><span class="TS-controls_inner_text">Next</span> &raquo;</a>
28
- </div>
29
- <div class="TS-series_nav_container"></div>
30
- </div>
31
-
32
- <div class="TS-notchbar_container">
33
- <div class="TS-notchbar"></div>
34
- </div>
35
- <div id="TS-card_scroller">
36
- <div id="TS-card_scroller_inner">
37
- </div>
38
- </div>
39
- </div>
22
+ <div id="timeline"></div>
40
23
 
41
24
  <script type="text/javascript">
42
25
  $(function() {
@@ -50,7 +33,7 @@
50
33
  reqsDone += 1;
51
34
 
52
35
  if (reqsDone === usernames.length)
53
- TimelineSetter.Timeline.boot(tsTimeline);
36
+ TimelineSetter.Timeline.boot(tsTimeline, {'container' : "#timeline"});
54
37
  });
55
38
  };
56
39
 
@@ -84,41 +67,5 @@
84
67
  _(usernames).each(getTwitter);
85
68
  });
86
69
  </script>
87
- <script id="TS-year_notch_tmpl" type="text/jst">
88
- <div class="TS-year_notch TS-year_notch_<%= timestamp %>">
89
- <span class="TS-year_notch_year_text"><%= human %></span>
90
- </div>
91
- </script>
92
- <script id="TS-notch_tmpl" type="text/jst">
93
- <div class="TS-notch TS-notch_<%= timestamp %> TS-notch_<%= series.replace(/\W/, "") %> TS-notch_color_<%= topcolor %>"></div>
94
- </script>
95
- <script id="TS-series_legend_tmpl" type="text/jst">
96
- <div class="TS-series_legend_item TS-series_legend_item<%= name.replace(/\W/, "") %>">
97
- <span class="TS-series_legend_swatch TS-series_legend_swatch_<%= color %>">&nbsp;</span> <span class="TS-series_legend_text"><%= name %></span>
98
- </div>
99
- </script>
100
- <script id="TS-card_tmpl" type="text/jst">
101
- <div class="TS-card_container TS-card_container_<%= (card.get("series") || "").replace(/\W/, "") %>">
102
- <div class="TS-css_arrow TS-css_arrow_up TS-css_arrow_color_<%= card.get("topcolor") %>"></div>
103
- <div class="TS-item TS-item_color_<%= card.get("topcolor") %>" data-timestamp="<%= card.get("timestamp") %>">
104
- <div class="TS-item_label">
105
- <% if (!_.isEmpty(card.get("html"))){ %>
106
- <div class="TS-item_user_html">
107
- <%= card.get("html") %>
108
- </div>
109
- <% } %>
110
- <%= card.get("description") %>
111
- </div>
112
- <% if (!_.isEmpty(card.get("link"))){ %>
113
- <div class="TS-read_btn"><a target="_blank" href="<%= card.get("link") %>">Read More</a></div>
114
- <% } %>
115
-
116
- <div class="TS-item_year">
117
- <span class="TS-item_year_text"><%= (card.get("display_date") || "").length > 0 ? card.get("display_date") : card.get("date") %></span>
118
- <div class="TS-permalink">&#8734;</div>
119
- </div>
120
- </div>
121
- </div>
122
- </script>
123
70
  </body>
124
71
  </html>
@@ -6,7 +6,7 @@
6
6
  <title>
7
7
  Class: TimelineSetter::CLI
8
8
 
9
- &mdash; Documentation by YARD 0.7.2
9
+ &mdash; Documentation by YARD 0.7.5
10
10
 
11
11
  </title>
12
12
 
@@ -97,6 +97,8 @@
97
97
 
98
98
 
99
99
 
100
+
101
+
100
102
 
101
103
  <h2>
102
104
  Instance Method Summary
@@ -186,7 +188,9 @@
186
188
 
187
189
 
188
190
 
189
- <span class="summary_desc"><div class='inline'>A new instance of CLI.</div></span>
191
+ <span class="summary_desc"><div class='inline'>
192
+ <p>A new instance of CLI.</p>
193
+ </div></span>
190
194
 
191
195
  </li>
192
196
 
@@ -290,12 +294,15 @@
290
294
 
291
295
  </p><div class="docstring">
292
296
  <div class="discussion">
293
- A new instance of CLI
297
+
298
+ <p>A new instance of CLI</p>
299
+
294
300
 
295
301
  </div>
296
302
  </div>
297
303
  <div class="tags">
298
304
 
305
+
299
306
  </div><table class="source_code">
300
307
  <tr>
301
308
  <td>
@@ -309,9 +316,9 @@
309
316
  <td>
310
317
  <pre class="code"><span class="info file"># File 'lib/timeline_setter/cli.rb', line 6</span>
311
318
 
312
- <span class='def def kw'>def</span> <span class='initialize identifier id'>initialize</span>
313
- <span class='parse_options! fid id'>parse_options!</span>
314
- <span class='end end kw'>end</span>
319
+ <span class='rubyid_def def kw'>def</span> <span class='rubyid_initialize identifier id'>initialize</span>
320
+ <span class='rubyid_parse_options! fid id'>parse_options!</span>
321
+ <span class='rubyid_end end kw'>end</span>
315
322
  </pre>
316
323
  </td>
317
324
  </tr>
@@ -355,29 +362,31 @@
355
362
  92
356
363
  93
357
364
  94
358
- 95</pre>
365
+ 95
366
+ 96</pre>
359
367
  </td>
360
368
  <td>
361
369
  <pre class="code"><span class="info file"># File 'lib/timeline_setter/cli.rb', line 78</span>
362
370
 
363
- <span class='def def kw'>def</span> <span class='compile! fid id'>compile!</span>
364
- <span class='if if kw'>if</span> <span class='notop op'>!</span><span class='@options ivar id'>@options</span><span class='lbrack token'>[</span><span class='symbol val'>:no_assets</span><span class='rbrack token'>]</span> <span class='orop op'>||</span> <span class='notop op'>!</span><span class='@options ivar id'>@options</span><span class='lbrack token'>[</span><span class='symbol val'>:min</span><span class='rbrack token'>]</span>
365
- <span class='FileUtils constant id'>FileUtils</span><span class='dot token'>.</span><span class='cp_r identifier id'>cp_r</span><span class='lparen token'>(</span><span class='Dir constant id'>Dir</span><span class='dot token'>.</span><span class='glob identifier id'>glob</span><span class='lparen token'>(</span><span class='dstring node'>&quot;#{TimelineSetter::ROOT}/public/*&quot;</span><span class='rparen token'>)</span><span class='comma token'>,</span> <span class='outdir identifier id'>outdir</span><span class='rparen token'>)</span>
371
+ <span class='rubyid_def def kw'>def</span> <span class='rubyid_compile! fid id'>compile!</span>
372
+ <span class='rubyid_FileUtils constant id'>FileUtils</span><span class='dot token'>.</span><span class='rubyid_mkdir_p identifier id'>mkdir_p</span> <span class='rubyid_outdir identifier id'>outdir</span> <span class='rubyid_unless unless_mod kw'>unless</span> <span class='rubyid_File constant id'>File</span><span class='dot token'>.</span><span class='rubyid_exists? fid id'>exists?</span> <span class='rubyid_outdir identifier id'>outdir</span>
373
+ <span class='rubyid_if if kw'>if</span> <span class='notop op'>!</span><span class='rubyid_@options ivar id'>@options</span><span class='lbrack token'>[</span><span class='symbol val'>:no_assets</span><span class='rbrack token'>]</span> <span class='orop op'>||</span> <span class='notop op'>!</span><span class='rubyid_@options ivar id'>@options</span><span class='lbrack token'>[</span><span class='symbol val'>:min</span><span class='rbrack token'>]</span>
374
+ <span class='rubyid_FileUtils constant id'>FileUtils</span><span class='dot token'>.</span><span class='rubyid_cp_r identifier id'>cp_r</span><span class='lparen token'>(</span><span class='rubyid_Dir constant id'>Dir</span><span class='dot token'>.</span><span class='rubyid_glob identifier id'>glob</span><span class='lparen token'>(</span><span class='dstring node'>&quot;#{TimelineSetter::ROOT}/public/*&quot;</span><span class='rparen token'>)</span><span class='comma token'>,</span> <span class='rubyid_outdir identifier id'>outdir</span><span class='rparen token'>)</span>
366
375
  <span class='comment val'># Concatenate JSTs to timeline-setter.js and remove templates.js</span>
367
376
  <span class='dxstring node'>`cat #{outdir}/javascripts/templates.js &gt;&gt; #{outdir}/javascripts/timeline-setter.js &amp;&amp; rm -rf #{outdir}/javascripts/templates*`</span>
368
- <span class='end end kw'>end</span>
377
+ <span class='rubyid_end end kw'>end</span>
369
378
 
370
- <span class='File constant id'>File</span><span class='dot token'>.</span><span class='open identifier id'>open</span><span class='lparen token'>(</span><span class='timeline_page_path identifier id'>timeline_page_path</span><span class='comma token'>,</span> <span class='string val'>'w+'</span><span class='rparen token'>)</span> <span class='do do kw'>do</span> <span class='bitor op'>|</span><span class='doc identifier id'>doc</span><span class='bitor op'>|</span>
371
- <span class='doc identifier id'>doc</span><span class='dot token'>.</span><span class='write identifier id'>write</span> <span class='html identifier id'>html</span>
372
- <span class='end end kw'>end</span>
379
+ <span class='rubyid_File constant id'>File</span><span class='dot token'>.</span><span class='rubyid_open identifier id'>open</span><span class='lparen token'>(</span><span class='rubyid_timeline_page_path identifier id'>timeline_page_path</span><span class='comma token'>,</span> <span class='string val'>'w+'</span><span class='rparen token'>)</span> <span class='rubyid_do do kw'>do</span> <span class='bitor op'>|</span><span class='rubyid_doc identifier id'>doc</span><span class='bitor op'>|</span>
380
+ <span class='rubyid_doc identifier id'>doc</span><span class='dot token'>.</span><span class='rubyid_write identifier id'>write</span> <span class='rubyid_html identifier id'>html</span>
381
+ <span class='rubyid_end end kw'>end</span>
373
382
 
374
- <span class='puts identifier id'>puts</span> <span class='dstring node'>&quot;== Files copied to #{outdir}&quot;</span>
383
+ <span class='rubyid_puts identifier id'>puts</span> <span class='dstring node'>&quot;== Files copied to #{outdir}&quot;</span>
375
384
 
376
- <span class='if if kw'>if</span> <span class='@options ivar id'>@options</span><span class='lbrack token'>[</span><span class='symbol val'>:open</span><span class='rbrack token'>]</span>
377
- <span class='puts identifier id'>puts</span> <span class='string val'>&quot;== Opening ...&quot;</span>
385
+ <span class='rubyid_if if kw'>if</span> <span class='rubyid_@options ivar id'>@options</span><span class='lbrack token'>[</span><span class='symbol val'>:open</span><span class='rbrack token'>]</span>
386
+ <span class='rubyid_puts identifier id'>puts</span> <span class='string val'>&quot;== Opening ...&quot;</span>
378
387
  <span class='dxstring node'>%x[ open #{timeline_page_path} ]</span>
379
- <span class='end end kw'>end</span>
380
- <span class='end end kw'>end</span>
388
+ <span class='rubyid_end end kw'>end</span>
389
+ <span class='rubyid_end end kw'>end</span>
381
390
  </pre>
382
391
  </td>
383
392
  </tr>
@@ -404,9 +413,9 @@
404
413
  <td>
405
414
  <pre class="code"><span class="info file"># File 'lib/timeline_setter/cli.rb', line 59</span>
406
415
 
407
- <span class='def def kw'>def</span> <span class='events identifier id'>events</span>
408
- <span class='TimelineSetter constant id'>TimelineSetter</span><span class='colon2 op'>::</span><span class='Parser constant id'>Parser</span><span class='dot token'>.</span><span class='new identifier id'>new</span> <span class='sheet identifier id'>sheet</span>
409
- <span class='end end kw'>end</span>
416
+ <span class='rubyid_def def kw'>def</span> <span class='rubyid_events identifier id'>events</span>
417
+ <span class='rubyid_TimelineSetter constant id'>TimelineSetter</span><span class='colon2 op'>::</span><span class='rubyid_Parser constant id'>Parser</span><span class='dot token'>.</span><span class='rubyid_new identifier id'>new</span> <span class='rubyid_sheet identifier id'>sheet</span>
418
+ <span class='rubyid_end end kw'>end</span>
410
419
  </pre>
411
420
  </td>
412
421
  </tr>
@@ -436,12 +445,12 @@
436
445
  <td>
437
446
  <pre class="code"><span class="info file"># File 'lib/timeline_setter/cli.rb', line 63</span>
438
447
 
439
- <span class='def def kw'>def</span> <span class='html identifier id'>html</span>
440
- <span class='TimelineSetter constant id'>TimelineSetter</span><span class='colon2 op'>::</span><span class='Timeline constant id'>Timeline</span><span class='dot token'>.</span><span class='new identifier id'>new</span><span class='lparen token'>(</span><span class='lbrace token'>{</span>
441
- <span class='symbol val'>:events</span> <span class='assign token'>=</span><span class='gt op'>&gt;</span> <span class='events identifier id'>events</span><span class='dot token'>.</span><span class='events identifier id'>events</span><span class='comma token'>,</span>
442
- <span class='symbol val'>:interval</span> <span class='assign token'>=</span><span class='gt op'>&gt;</span> <span class='@options ivar id'>@options</span><span class='lbrack token'>[</span><span class='symbol val'>:interval</span><span class='rbrack token'>]</span> <span class='orop op'>||</span> <span class='string val'>''</span>
443
- <span class='rbrace token'>}</span><span class='rparen token'>)</span><span class='dot token'>.</span><span class='send identifier id'>send</span><span class='lparen token'>(</span><span class='@options ivar id'>@options</span><span class='lbrack token'>[</span><span class='symbol val'>:min</span><span class='rbrack token'>]</span> <span class='question op'>?</span> <span class='symbol val'>:timeline_min</span> <span class='colon op'>:</span> <span class='symbol val'>:timeline</span><span class='rparen token'>)</span>
444
- <span class='end end kw'>end</span>
448
+ <span class='rubyid_def def kw'>def</span> <span class='rubyid_html identifier id'>html</span>
449
+ <span class='rubyid_TimelineSetter constant id'>TimelineSetter</span><span class='colon2 op'>::</span><span class='rubyid_Timeline constant id'>Timeline</span><span class='dot token'>.</span><span class='rubyid_new identifier id'>new</span><span class='lparen token'>(</span><span class='lbrace token'>{</span>
450
+ <span class='symbol val'>:events</span> <span class='assign token'>=</span><span class='gt op'>&gt;</span> <span class='rubyid_events identifier id'>events</span><span class='dot token'>.</span><span class='rubyid_events identifier id'>events</span><span class='comma token'>,</span>
451
+ <span class='symbol val'>:interval</span> <span class='assign token'>=</span><span class='gt op'>&gt;</span> <span class='rubyid_@options ivar id'>@options</span><span class='lbrack token'>[</span><span class='symbol val'>:interval</span><span class='rbrack token'>]</span> <span class='orop op'>||</span> <span class='string val'>''</span>
452
+ <span class='rbrace token'>}</span><span class='rparen token'>)</span><span class='dot token'>.</span><span class='rubyid_send identifier id'>send</span><span class='lparen token'>(</span><span class='rubyid_@options ivar id'>@options</span><span class='lbrack token'>[</span><span class='symbol val'>:min</span><span class='rbrack token'>]</span> <span class='question op'>?</span> <span class='symbol val'>:timeline_min</span> <span class='colon op'>:</span> <span class='symbol val'>:timeline</span><span class='rparen token'>)</span>
453
+ <span class='rubyid_end end kw'>end</span>
445
454
  </pre>
446
455
  </td>
447
456
  </tr>
@@ -468,9 +477,9 @@
468
477
  <td>
469
478
  <pre class="code"><span class="info file"># File 'lib/timeline_setter/cli.rb', line 70</span>
470
479
 
471
- <span class='def def kw'>def</span> <span class='outdir identifier id'>outdir</span>
472
- <span class='@options ivar id'>@options</span><span class='lbrack token'>[</span><span class='symbol val'>:output</span><span class='rbrack token'>]</span> <span class='question op'>?</span> <span class='@options ivar id'>@options</span><span class='lbrack token'>[</span><span class='symbol val'>:output</span><span class='rbrack token'>]</span> <span class='colon op'>:</span> <span class='dstring node'>&quot;#{`pwd`.strip}/&quot;</span>
473
- <span class='end end kw'>end</span>
480
+ <span class='rubyid_def def kw'>def</span> <span class='rubyid_outdir identifier id'>outdir</span>
481
+ <span class='rubyid_@options ivar id'>@options</span><span class='lbrack token'>[</span><span class='symbol val'>:output</span><span class='rbrack token'>]</span> <span class='question op'>?</span> <span class='rubyid_@options ivar id'>@options</span><span class='lbrack token'>[</span><span class='symbol val'>:output</span><span class='rbrack token'>]</span> <span class='colon op'>:</span> <span class='dstring node'>&quot;#{`pwd`.strip}/&quot;</span>
482
+ <span class='rubyid_end end kw'>end</span>
474
483
  </pre>
475
484
  </td>
476
485
  </tr>
@@ -533,45 +542,45 @@
533
542
  <td>
534
543
  <pre class="code"><span class="info file"># File 'lib/timeline_setter/cli.rb', line 10</span>
535
544
 
536
- <span class='def def kw'>def</span> <span class='parse_options! fid id'>parse_options!</span>
537
- <span class='@options ivar id'>@options</span> <span class='assign token'>=</span> <span class='lbrace token'>{</span><span class='rbrace token'>}</span>
538
- <span class='option_parser identifier id'>option_parser</span> <span class='assign token'>=</span> <span class='OptionParser constant id'>OptionParser</span><span class='dot token'>.</span><span class='new identifier id'>new</span> <span class='do do kw'>do</span> <span class='bitor op'>|</span><span class='opts identifier id'>opts</span><span class='bitor op'>|</span>
539
- <span class='opts identifier id'>opts</span><span class='dot token'>.</span><span class='banner identifier id'>banner</span> <span class='assign token'>=</span> <span class='string val'>&quot;TimelineSetter: A tool to generate HTML timelines from CSVs.\n\nUsage:\n&quot;</span>
540
-
541
- <span class='opts identifier id'>opts</span><span class='dot token'>.</span><span class='on identifier id'>on</span><span class='lparen token'>(</span><span class='string val'>'-c'</span><span class='comma token'>,</span> <span class='string val'>'--csv CSV'</span><span class='comma token'>,</span> <span class='string val'>'CSV input file'</span><span class='rparen token'>)</span> <span class='do do kw'>do</span> <span class='bitor op'>|</span><span class='c identifier id'>c</span><span class='bitor op'>|</span>
542
- <span class='@options ivar id'>@options</span><span class='lbrack token'>[</span><span class='symbol val'>:csv</span><span class='rbrack token'>]</span> <span class='assign token'>=</span> <span class='c identifier id'>c</span>
543
- <span class='end end kw'>end</span>
544
- <span class='opts identifier id'>opts</span><span class='dot token'>.</span><span class='on identifier id'>on</span><span class='lparen token'>(</span><span class='string val'>'-o'</span><span class='comma token'>,</span> <span class='string val'>'--output OUTPUT'</span><span class='comma token'>,</span> <span class='string val'>'Output directory to install timeline into.'</span><span class='rparen token'>)</span> <span class='do do kw'>do</span> <span class='bitor op'>|</span><span class='o identifier id'>o</span><span class='bitor op'>|</span>
545
- <span class='@options ivar id'>@options</span><span class='lbrack token'>[</span><span class='symbol val'>:output</span><span class='rbrack token'>]</span> <span class='assign token'>=</span> <span class='o identifier id'>o</span>
546
- <span class='end end kw'>end</span>
547
- <span class='opts identifier id'>opts</span><span class='dot token'>.</span><span class='on identifier id'>on</span><span class='lparen token'>(</span><span class='string val'>'-a'</span><span class='comma token'>,</span> <span class='string val'>'--without-assets'</span><span class='comma token'>,</span> <span class='string val'>'Output timeline without supporting assets'</span><span class='rparen token'>)</span> <span class='do do kw'>do</span> <span class='bitor op'>|</span><span class='a identifier id'>a</span><span class='bitor op'>|</span>
548
- <span class='@options ivar id'>@options</span><span class='lbrack token'>[</span><span class='symbol val'>:no_assets</span><span class='rbrack token'>]</span> <span class='assign token'>=</span> <span class='a identifier id'>a</span>
549
- <span class='end end kw'>end</span>
550
- <span class='opts identifier id'>opts</span><span class='dot token'>.</span><span class='on identifier id'>on</span><span class='lparen token'>(</span><span class='string val'>'-O'</span><span class='comma token'>,</span> <span class='string val'>'--open'</span><span class='comma token'>,</span> <span class='string val'>'Open generated timeline in a browser'</span><span class='rparen token'>)</span> <span class='do do kw'>do</span> <span class='bitor op'>|</span><span class='o identifier id'>o</span><span class='bitor op'>|</span>
551
- <span class='@options ivar id'>@options</span><span class='lbrack token'>[</span><span class='symbol val'>:open</span><span class='rbrack token'>]</span> <span class='assign token'>=</span> <span class='o identifier id'>o</span>
552
- <span class='end end kw'>end</span>
553
- <span class='opts identifier id'>opts</span><span class='dot token'>.</span><span class='on identifier id'>on</span><span class='lparen token'>(</span><span class='string val'>'-m'</span><span class='comma token'>,</span> <span class='string val'>'--min'</span><span class='comma token'>,</span> <span class='string val'>'Create a minified one-page version of the timeline'</span><span class='rparen token'>)</span> <span class='do do kw'>do</span> <span class='bitor op'>|</span><span class='m identifier id'>m</span><span class='bitor op'>|</span>
554
- <span class='@options ivar id'>@options</span><span class='lbrack token'>[</span><span class='symbol val'>:min</span><span class='rbrack token'>]</span> <span class='assign token'>=</span> <span class='m identifier id'>m</span>
555
- <span class='end end kw'>end</span>
556
- <span class='opts identifier id'>opts</span><span class='dot token'>.</span><span class='on identifier id'>on</span><span class='lparen token'>(</span><span class='string val'>'-i'</span><span class='comma token'>,</span> <span class='string val'>'--interval INTERVAL'</span><span class='comma token'>,</span> <span class='string val'>'Override automatic interval notches with a custom interval.'</span><span class='rparen token'>)</span> <span class='do do kw'>do</span> <span class='bitor op'>|</span><span class='i identifier id'>i</span><span class='bitor op'>|</span>
557
- <span class='@options ivar id'>@options</span><span class='lbrack token'>[</span><span class='symbol val'>:interval</span><span class='rbrack token'>]</span> <span class='assign token'>=</span> <span class='i identifier id'>i</span>
558
- <span class='end end kw'>end</span>
559
-
560
-
561
- <span class='opts identifier id'>opts</span><span class='dot token'>.</span><span class='on_tail identifier id'>on_tail</span><span class='lparen token'>(</span><span class='string val'>&quot;-h&quot;</span><span class='comma token'>,</span> <span class='string val'>&quot;--help&quot;</span><span class='comma token'>,</span> <span class='string val'>&quot;Show this message&quot;</span><span class='rparen token'>)</span> <span class='do do kw'>do</span>
562
- <span class='puts identifier id'>puts</span> <span class='opts identifier id'>opts</span>
563
- <span class='exit identifier id'>exit</span>
564
- <span class='end end kw'>end</span>
565
- <span class='end end kw'>end</span>
566
- <span class='option_parser identifier id'>option_parser</span><span class='dot token'>.</span><span class='parse! fid id'>parse!</span>
567
-
568
- <span class='if if kw'>if</span> <span class='@options ivar id'>@options</span><span class='dot token'>.</span><span class='empty? fid id'>empty?</span>
569
- <span class='puts identifier id'>puts</span> <span class='option_parser identifier id'>option_parser</span><span class='dot token'>.</span><span class='on_tail identifier id'>on_tail</span>
570
- <span class='exit identifier id'>exit</span>
571
- <span class='else else kw'>else</span>
572
- <span class='compile! fid id'>compile!</span>
573
- <span class='end end kw'>end</span>
574
- <span class='end end kw'>end</span>
545
+ <span class='rubyid_def def kw'>def</span> <span class='rubyid_parse_options! fid id'>parse_options!</span>
546
+ <span class='rubyid_@options ivar id'>@options</span> <span class='assign token'>=</span> <span class='lbrace token'>{</span><span class='rbrace token'>}</span>
547
+ <span class='rubyid_option_parser identifier id'>option_parser</span> <span class='assign token'>=</span> <span class='rubyid_OptionParser constant id'>OptionParser</span><span class='dot token'>.</span><span class='rubyid_new identifier id'>new</span> <span class='rubyid_do do kw'>do</span> <span class='bitor op'>|</span><span class='rubyid_opts identifier id'>opts</span><span class='bitor op'>|</span>
548
+ <span class='rubyid_opts identifier id'>opts</span><span class='dot token'>.</span><span class='rubyid_banner identifier id'>banner</span> <span class='assign token'>=</span> <span class='string val'>&quot;TimelineSetter: A tool to generate HTML timelines from CSVs.\n\nUsage:\n&quot;</span>
549
+
550
+ <span class='rubyid_opts identifier id'>opts</span><span class='dot token'>.</span><span class='rubyid_on identifier id'>on</span><span class='lparen token'>(</span><span class='string val'>'-c'</span><span class='comma token'>,</span> <span class='string val'>'--csv CSV'</span><span class='comma token'>,</span> <span class='string val'>'CSV input file'</span><span class='rparen token'>)</span> <span class='rubyid_do do kw'>do</span> <span class='bitor op'>|</span><span class='rubyid_c identifier id'>c</span><span class='bitor op'>|</span>
551
+ <span class='rubyid_@options ivar id'>@options</span><span class='lbrack token'>[</span><span class='symbol val'>:csv</span><span class='rbrack token'>]</span> <span class='assign token'>=</span> <span class='rubyid_c identifier id'>c</span>
552
+ <span class='rubyid_end end kw'>end</span>
553
+ <span class='rubyid_opts identifier id'>opts</span><span class='dot token'>.</span><span class='rubyid_on identifier id'>on</span><span class='lparen token'>(</span><span class='string val'>'-o'</span><span class='comma token'>,</span> <span class='string val'>'--output OUTPUT'</span><span class='comma token'>,</span> <span class='string val'>'Output directory to install timeline into.'</span><span class='rparen token'>)</span> <span class='rubyid_do do kw'>do</span> <span class='bitor op'>|</span><span class='rubyid_o identifier id'>o</span><span class='bitor op'>|</span>
554
+ <span class='rubyid_@options ivar id'>@options</span><span class='lbrack token'>[</span><span class='symbol val'>:output</span><span class='rbrack token'>]</span> <span class='assign token'>=</span> <span class='rubyid_o identifier id'>o</span>
555
+ <span class='rubyid_end end kw'>end</span>
556
+ <span class='rubyid_opts identifier id'>opts</span><span class='dot token'>.</span><span class='rubyid_on identifier id'>on</span><span class='lparen token'>(</span><span class='string val'>'-a'</span><span class='comma token'>,</span> <span class='string val'>'--without-assets'</span><span class='comma token'>,</span> <span class='string val'>'Output timeline without supporting assets'</span><span class='rparen token'>)</span> <span class='rubyid_do do kw'>do</span> <span class='bitor op'>|</span><span class='rubyid_a identifier id'>a</span><span class='bitor op'>|</span>
557
+ <span class='rubyid_@options ivar id'>@options</span><span class='lbrack token'>[</span><span class='symbol val'>:no_assets</span><span class='rbrack token'>]</span> <span class='assign token'>=</span> <span class='rubyid_a identifier id'>a</span>
558
+ <span class='rubyid_end end kw'>end</span>
559
+ <span class='rubyid_opts identifier id'>opts</span><span class='dot token'>.</span><span class='rubyid_on identifier id'>on</span><span class='lparen token'>(</span><span class='string val'>'-O'</span><span class='comma token'>,</span> <span class='string val'>'--open'</span><span class='comma token'>,</span> <span class='string val'>'Open generated timeline in a browser'</span><span class='rparen token'>)</span> <span class='rubyid_do do kw'>do</span> <span class='bitor op'>|</span><span class='rubyid_o identifier id'>o</span><span class='bitor op'>|</span>
560
+ <span class='rubyid_@options ivar id'>@options</span><span class='lbrack token'>[</span><span class='symbol val'>:open</span><span class='rbrack token'>]</span> <span class='assign token'>=</span> <span class='rubyid_o identifier id'>o</span>
561
+ <span class='rubyid_end end kw'>end</span>
562
+ <span class='rubyid_opts identifier id'>opts</span><span class='dot token'>.</span><span class='rubyid_on identifier id'>on</span><span class='lparen token'>(</span><span class='string val'>'-m'</span><span class='comma token'>,</span> <span class='string val'>'--min'</span><span class='comma token'>,</span> <span class='string val'>'Create a minified one-page version of the timeline'</span><span class='rparen token'>)</span> <span class='rubyid_do do kw'>do</span> <span class='bitor op'>|</span><span class='rubyid_m identifier id'>m</span><span class='bitor op'>|</span>
563
+ <span class='rubyid_@options ivar id'>@options</span><span class='lbrack token'>[</span><span class='symbol val'>:min</span><span class='rbrack token'>]</span> <span class='assign token'>=</span> <span class='rubyid_m identifier id'>m</span>
564
+ <span class='rubyid_end end kw'>end</span>
565
+ <span class='rubyid_opts identifier id'>opts</span><span class='dot token'>.</span><span class='rubyid_on identifier id'>on</span><span class='lparen token'>(</span><span class='string val'>'-i'</span><span class='comma token'>,</span> <span class='string val'>'--interval INTERVAL'</span><span class='comma token'>,</span> <span class='string val'>'Override automatic interval notches with a custom interval.'</span><span class='rparen token'>)</span> <span class='rubyid_do do kw'>do</span> <span class='bitor op'>|</span><span class='rubyid_i identifier id'>i</span><span class='bitor op'>|</span>
566
+ <span class='rubyid_@options ivar id'>@options</span><span class='lbrack token'>[</span><span class='symbol val'>:interval</span><span class='rbrack token'>]</span> <span class='assign token'>=</span> <span class='rubyid_i identifier id'>i</span>
567
+ <span class='rubyid_end end kw'>end</span>
568
+
569
+
570
+ <span class='rubyid_opts identifier id'>opts</span><span class='dot token'>.</span><span class='rubyid_on_tail identifier id'>on_tail</span><span class='lparen token'>(</span><span class='string val'>&quot;-h&quot;</span><span class='comma token'>,</span> <span class='string val'>&quot;--help&quot;</span><span class='comma token'>,</span> <span class='string val'>&quot;Show this message&quot;</span><span class='rparen token'>)</span> <span class='rubyid_do do kw'>do</span>
571
+ <span class='rubyid_puts identifier id'>puts</span> <span class='rubyid_opts identifier id'>opts</span>
572
+ <span class='rubyid_exit identifier id'>exit</span>
573
+ <span class='rubyid_end end kw'>end</span>
574
+ <span class='rubyid_end end kw'>end</span>
575
+ <span class='rubyid_option_parser identifier id'>option_parser</span><span class='dot token'>.</span><span class='rubyid_parse! fid id'>parse!</span>
576
+
577
+ <span class='rubyid_if if kw'>if</span> <span class='rubyid_@options ivar id'>@options</span><span class='dot token'>.</span><span class='rubyid_empty? fid id'>empty?</span>
578
+ <span class='rubyid_puts identifier id'>puts</span> <span class='rubyid_option_parser identifier id'>option_parser</span><span class='dot token'>.</span><span class='rubyid_on_tail identifier id'>on_tail</span>
579
+ <span class='rubyid_exit identifier id'>exit</span>
580
+ <span class='rubyid_else else kw'>else</span>
581
+ <span class='rubyid_compile! fid id'>compile!</span>
582
+ <span class='rubyid_end end kw'>end</span>
583
+ <span class='rubyid_end end kw'>end</span>
575
584
  </pre>
576
585
  </td>
577
586
  </tr>
@@ -598,9 +607,9 @@
598
607
  <td>
599
608
  <pre class="code"><span class="info file"># File 'lib/timeline_setter/cli.rb', line 55</span>
600
609
 
601
- <span class='def def kw'>def</span> <span class='sheet identifier id'>sheet</span>
602
- <span class='File constant id'>File</span><span class='dot token'>.</span><span class='open identifier id'>open</span><span class='lparen token'>(</span><span class='@options ivar id'>@options</span><span class='lbrack token'>[</span><span class='symbol val'>:csv</span><span class='rbrack token'>]</span><span class='rparen token'>)</span><span class='dot token'>.</span><span class='read identifier id'>read</span>
603
- <span class='end end kw'>end</span>
610
+ <span class='rubyid_def def kw'>def</span> <span class='rubyid_sheet identifier id'>sheet</span>
611
+ <span class='rubyid_File constant id'>File</span><span class='dot token'>.</span><span class='rubyid_open identifier id'>open</span><span class='lparen token'>(</span><span class='rubyid_@options ivar id'>@options</span><span class='lbrack token'>[</span><span class='symbol val'>:csv</span><span class='rbrack token'>]</span><span class='rparen token'>)</span><span class='dot token'>.</span><span class='rubyid_read identifier id'>read</span>
612
+ <span class='rubyid_end end kw'>end</span>
604
613
  </pre>
605
614
  </td>
606
615
  </tr>
@@ -627,9 +636,9 @@
627
636
  <td>
628
637
  <pre class="code"><span class="info file"># File 'lib/timeline_setter/cli.rb', line 74</span>
629
638
 
630
- <span class='def def kw'>def</span> <span class='timeline_page_path identifier id'>timeline_page_path</span>
631
- <span class='File constant id'>File</span><span class='dot token'>.</span><span class='join identifier id'>join</span><span class='lparen token'>(</span><span class='outdir identifier id'>outdir</span><span class='comma token'>,</span> <span class='string val'>'timeline.html'</span><span class='rparen token'>)</span>
632
- <span class='end end kw'>end</span>
639
+ <span class='rubyid_def def kw'>def</span> <span class='rubyid_timeline_page_path identifier id'>timeline_page_path</span>
640
+ <span class='rubyid_File constant id'>File</span><span class='dot token'>.</span><span class='rubyid_join identifier id'>join</span><span class='lparen token'>(</span><span class='rubyid_outdir identifier id'>outdir</span><span class='comma token'>,</span> <span class='string val'>'timeline.html'</span><span class='rparen token'>)</span>
641
+ <span class='rubyid_end end kw'>end</span>
633
642
  </pre>
634
643
  </td>
635
644
  </tr>
@@ -641,9 +650,9 @@
641
650
  </div>
642
651
 
643
652
  <div id="footer">
644
- Generated on Wed Nov 2 15:20:08 2011 by
653
+ Generated on Mon Mar 12 11:02:58 2012 by
645
654
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
646
- 0.7.2 (ruby-1.8.7).
655
+ 0.7.5 (ruby-1.8.7).
647
656
  </div>
648
657
 
649
658
  </body>
@@ -6,7 +6,7 @@
6
6
  <title>
7
7
  Class: TimelineSetter::Parser
8
8
 
9
- &mdash; Documentation by YARD 0.7.2
9
+ &mdash; Documentation by YARD 0.7.5
10
10
 
11
11
  </title>
12
12
 
@@ -94,6 +94,8 @@
94
94
 
95
95
 
96
96
 
97
+
98
+
97
99
  <h2>Instance Attribute Summary <small>(<a href="#" class="summary_toggle">collapse</a>)</small></h2>
98
100
  <ul class="summary">
99
101
 
@@ -116,7 +118,9 @@
116
118
 
117
119
 
118
120
 
119
- <span class="summary_desc"><div class='inline'>Returns the value of attribute events.</div></span>
121
+ <span class="summary_desc"><div class='inline'>
122
+ <p>Returns the value of attribute events.</p>
123
+ </div></span>
120
124
 
121
125
  </li>
122
126
 
@@ -152,8 +156,10 @@
152
156
 
153
157
 
154
158
 
155
- <span class="summary_desc"><div class='inline'>Initialize a new timeline from a CSV file via TableFu,
156
- add a hash for each row (event) in the sheet to an events array.</div></span>
159
+ <span class="summary_desc"><div class='inline'>
160
+ <p>Initialize a new timeline from a CSV file via TableFu, add a hash for each
161
+ row (event) in the sheet to an events array.</p>
162
+ </div></span>
157
163
 
158
164
  </li>
159
165
 
@@ -173,21 +179,26 @@ add a hash for each row (event) in the sheet to an events array.</div></span>
173
179
 
174
180
  </p><div class="docstring">
175
181
  <div class="discussion">
176
- Initialize a new timeline from a CSV file via TableFu,
177
- add a hash for each row (event) in the sheet to an events array.
178
- Sheet should contain columns for
179
- * date
180
- * display_date
181
- * description
182
- * link
183
- * thumbnail
184
- * series
185
- * html
182
+
183
+ <p>Initialize a new timeline from a CSV file via TableFu, add a hash for each
184
+ row (event) in the sheet to an events array. Sheet should contain columns
185
+ for</p>
186
+
187
+ <pre class="code ruby"><code><span class='mult op'>*</span> <span class='rubyid_date identifier id'>date</span>
188
+ <span class='mult op'>*</span> <span class='rubyid_display_date identifier id'>display_date</span>
189
+ <span class='mult op'>*</span> <span class='rubyid_description identifier id'>description</span>
190
+ <span class='mult op'>*</span> <span class='rubyid_link identifier id'>link</span>
191
+ <span class='mult op'>*</span> <span class='rubyid_thumbnail identifier id'>thumbnail</span>
192
+ <span class='mult op'>*</span> <span class='rubyid_series identifier id'>series</span>
193
+ <span class='mult op'>*</span> <span class='rubyid_html identifier id'>html</span>
194
+ </code></pre>
195
+
186
196
 
187
197
  </div>
188
198
  </div>
189
199
  <div class="tags">
190
200
 
201
+
191
202
  </div><table class="source_code">
192
203
  <tr>
193
204
  <td>
@@ -209,17 +220,17 @@ Sheet should contain columns for
209
220
  <td>
210
221
  <pre class="code"><span class="info file"># File 'lib/timeline_setter/parser.rb', line 16</span>
211
222
 
212
- <span class='def def kw'>def</span> <span class='initialize identifier id'>initialize</span><span class='lparen token'>(</span><span class='sheet identifier id'>sheet</span><span class='rparen token'>)</span>
213
- <span class='@events ivar id'>@events</span> <span class='assign token'>=</span> <span class='lbrack token'>[</span><span class='rbrack token'>]</span>
214
- <span class='spreadsheet identifier id'>spreadsheet</span> <span class='assign token'>=</span> <span class='TableFu constant id'>TableFu</span><span class='dot token'>.</span><span class='new identifier id'>new</span><span class='lparen token'>(</span><span class='sheet identifier id'>sheet</span><span class='rparen token'>)</span> <span class='do do kw'>do</span> <span class='bitor op'>|</span><span class='s identifier id'>s</span><span class='bitor op'>|</span>
215
- <span class='s identifier id'>s</span><span class='dot token'>.</span><span class='columns identifier id'>columns</span> <span class='assign token'>=</span> <span class='dstring node'>%w[date display_date description link series html]</span>
216
- <span class='end end kw'>end</span>
217
-
218
- <span class='spreadsheet identifier id'>spreadsheet</span><span class='dot token'>.</span><span class='rows identifier id'>rows</span><span class='dot token'>.</span><span class='each identifier id'>each</span> <span class='do do kw'>do</span> <span class='bitor op'>|</span><span class='row identifier id'>row</span><span class='bitor op'>|</span>
219
- <span class='hash identifier id'>hash</span> <span class='assign token'>=</span> <span class='spreadsheet identifier id'>spreadsheet</span><span class='dot token'>.</span><span class='columns identifier id'>columns</span><span class='dot token'>.</span><span class='inject identifier id'>inject</span><span class='lparen token'>(</span><span class='lbrace token'>{</span><span class='rbrace token'>}</span><span class='rparen token'>)</span> <span class='lbrace token'>{</span><span class='bitor op'>|</span><span class='memo identifier id'>memo</span><span class='comma token'>,</span> <span class='column identifier id'>column</span><span class='bitor op'>|</span> <span class='memo identifier id'>memo</span><span class='lbrack token'>[</span><span class='column identifier id'>column</span><span class='dot token'>.</span><span class='to_sym identifier id'>to_sym</span><span class='rbrack token'>]</span> <span class='assign token'>=</span> <span class='row identifier id'>row</span><span class='lbrack token'>[</span><span class='column identifier id'>column</span><span class='rbrack token'>]</span><span class='dot token'>.</span><span class='to_s identifier id'>to_s</span> <span class='semicolon token'>;</span> <span class='memo identifier id'>memo</span><span class='rbrace token'>}</span>
220
- <span class='@events ivar id'>@events</span> <span class='lshft op'>&lt;&lt;</span> <span class='hash identifier id'>hash</span>
221
- <span class='end end kw'>end</span>
222
- <span class='end end kw'>end</span>
223
+ <span class='rubyid_def def kw'>def</span> <span class='rubyid_initialize identifier id'>initialize</span><span class='lparen token'>(</span><span class='rubyid_sheet identifier id'>sheet</span><span class='rparen token'>)</span>
224
+ <span class='rubyid_@events ivar id'>@events</span> <span class='assign token'>=</span> <span class='lbrack token'>[</span><span class='rbrack token'>]</span>
225
+ <span class='rubyid_spreadsheet identifier id'>spreadsheet</span> <span class='assign token'>=</span> <span class='rubyid_TableFu constant id'>TableFu</span><span class='dot token'>.</span><span class='rubyid_new identifier id'>new</span><span class='lparen token'>(</span><span class='rubyid_sheet identifier id'>sheet</span><span class='rparen token'>)</span> <span class='rubyid_do do kw'>do</span> <span class='bitor op'>|</span><span class='rubyid_s identifier id'>s</span><span class='bitor op'>|</span>
226
+ <span class='rubyid_s identifier id'>s</span><span class='dot token'>.</span><span class='rubyid_columns identifier id'>columns</span> <span class='assign token'>=</span> <span class='dstring node'>%w[date display_date description link series html]</span>
227
+ <span class='rubyid_end end kw'>end</span>
228
+
229
+ <span class='rubyid_spreadsheet identifier id'>spreadsheet</span><span class='dot token'>.</span><span class='rubyid_rows identifier id'>rows</span><span class='dot token'>.</span><span class='rubyid_each identifier id'>each</span> <span class='rubyid_do do kw'>do</span> <span class='bitor op'>|</span><span class='rubyid_row identifier id'>row</span><span class='bitor op'>|</span>
230
+ <span class='rubyid_hash identifier id'>hash</span> <span class='assign token'>=</span> <span class='rubyid_spreadsheet identifier id'>spreadsheet</span><span class='dot token'>.</span><span class='rubyid_columns identifier id'>columns</span><span class='dot token'>.</span><span class='rubyid_inject identifier id'>inject</span><span class='lparen token'>(</span><span class='lbrace token'>{</span><span class='rbrace token'>}</span><span class='rparen token'>)</span> <span class='lbrace token'>{</span><span class='bitor op'>|</span><span class='rubyid_memo identifier id'>memo</span><span class='comma token'>,</span> <span class='rubyid_column identifier id'>column</span><span class='bitor op'>|</span> <span class='rubyid_memo identifier id'>memo</span><span class='lbrack token'>[</span><span class='rubyid_column identifier id'>column</span><span class='dot token'>.</span><span class='rubyid_to_sym identifier id'>to_sym</span><span class='rbrack token'>]</span> <span class='assign token'>=</span> <span class='rubyid_row identifier id'>row</span><span class='lbrack token'>[</span><span class='rubyid_column identifier id'>column</span><span class='rbrack token'>]</span><span class='dot token'>.</span><span class='rubyid_to_s identifier id'>to_s</span> <span class='semicolon token'>;</span> <span class='rubyid_memo identifier id'>memo</span><span class='rbrace token'>}</span>
231
+ <span class='rubyid_@events ivar id'>@events</span> <span class='lshft op'>&lt;&lt;</span> <span class='rubyid_hash identifier id'>hash</span>
232
+ <span class='rubyid_end end kw'>end</span>
233
+ <span class='rubyid_end end kw'>end</span>
223
234
  </pre>
224
235
  </td>
225
236
  </tr>
@@ -243,12 +254,15 @@ Sheet should contain columns for
243
254
 
244
255
  </p><div class="docstring">
245
256
  <div class="discussion">
246
- Returns the value of attribute events
257
+
258
+ <p>Returns the value of attribute events</p>
259
+
247
260
 
248
261
  </div>
249
262
  </div>
250
263
  <div class="tags">
251
264
 
265
+
252
266
  </div><table class="source_code">
253
267
  <tr>
254
268
  <td>
@@ -262,9 +276,9 @@ Sheet should contain columns for
262
276
  <td>
263
277
  <pre class="code"><span class="info file"># File 'lib/timeline_setter/parser.rb', line 3</span>
264
278
 
265
- <span class='def def kw'>def</span> <span class='events identifier id'>events</span>
266
- <span class='@events ivar id'>@events</span>
267
- <span class='end end kw'>end</span>
279
+ <span class='rubyid_def def kw'>def</span> <span class='rubyid_events identifier id'>events</span>
280
+ <span class='rubyid_@events ivar id'>@events</span>
281
+ <span class='rubyid_end end kw'>end</span>
268
282
  </pre>
269
283
  </td>
270
284
  </tr>
@@ -277,9 +291,9 @@ Sheet should contain columns for
277
291
  </div>
278
292
 
279
293
  <div id="footer">
280
- Generated on Wed Nov 2 15:20:07 2011 by
294
+ Generated on Mon Mar 12 11:02:59 2012 by
281
295
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
282
- 0.7.2 (ruby-1.8.7).
296
+ 0.7.5 (ruby-1.8.7).
283
297
  </div>
284
298
 
285
299
  </body>