timeline_setter 0.1.2 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/Rakefile +2 -11
- data/doc/doc.markdown +22 -1
- data/doc/timeline-setter.html +88 -67
- data/doc/twitter-demo.html +5 -6
- data/documentation/TimelineSetter/CLI.html +1 -1
- data/documentation/TimelineSetter/Parser.html +1 -1
- data/documentation/TimelineSetter/Timeline.html +1 -1
- data/documentation/TimelineSetter.html +2 -2
- data/documentation/_index.html +1 -1
- data/documentation/file.README.html +1 -1
- data/documentation/index.html +1 -1
- data/documentation/top-level-namespace.html +1 -1
- data/index.html +12 -2
- data/lib/timeline_setter/cli.rb +10 -4
- data/lib/timeline_setter/timeline.rb +7 -2
- data/lib/timeline_setter/version.rb +1 -1
- data/public/javascripts/timeline-setter.js +74 -39
- data/spec/timeline_setter_spec.rb +23 -5
- data/templates/timeline-markup.erb +1 -1
- data/timeline_setter.gemspec +2 -6
- metadata +6 -7
data/Rakefile
CHANGED
@@ -25,10 +25,10 @@ task :gh_pages do
|
|
25
25
|
`rake yard`
|
26
26
|
`rake docco`
|
27
27
|
`rake sample`
|
28
|
-
|
28
|
+
|
29
29
|
`git branch` =~ /^\* (.+)?\n/
|
30
30
|
current_branch = $1
|
31
|
-
|
31
|
+
|
32
32
|
`git commit -am "docs"`
|
33
33
|
`git push github #{current_branch}`
|
34
34
|
`git checkout gh-pages`
|
@@ -86,13 +86,4 @@ task :yard do
|
|
86
86
|
`yard -o ./documentation`
|
87
87
|
end
|
88
88
|
|
89
|
-
desc "generate sample timeline"
|
90
|
-
task :sample do
|
91
|
-
# noop this for now.
|
92
|
-
|
93
|
-
# `./bin/timeline-setter -c ./tbi.csv -m -o ./public/`
|
94
|
-
# `cp ./public/timeline.html ./doc/timeline-sample.html`
|
95
|
-
end
|
96
|
-
|
97
|
-
|
98
89
|
|
data/doc/doc.markdown
CHANGED
@@ -72,9 +72,10 @@ Full list of options:
|
|
72
72
|
|
73
73
|
* `-c CSV` Path to your CSV file.
|
74
74
|
* `-o OUTPUT_PATH` Path to output timeline and assets. If absent, timeline will be created in current directory.
|
75
|
-
* `-a`
|
75
|
+
* `-a` Do not output supporting assets such as CSS and JavaScript. This is useful if you're customizing those and don't want your versions clobbered.
|
76
76
|
* `-m` Create a minified one-page version of your timeline with all supporting assets inline.
|
77
77
|
* `-O` Open a browser to your new timeline after it is generated (currently Mac OS only).
|
78
|
+
* `-i` Add a custom interval for background "interval notches." These take the format of JavaScript date [getter methods](https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Date#Methods). For example, year would be `FullYear.` All the options are available [below](#interval_notch_options). If absent, TimelineSetter will attempt to automatically create interval notches based on the first and last dates in your timeline.
|
78
79
|
* `-h` Print help to standard output.
|
79
80
|
|
80
81
|
<a id="csv"></a>
|
@@ -199,6 +200,19 @@ interval notches:
|
|
199
200
|
hour/minute => 11:59
|
200
201
|
second => 11:59:22
|
201
202
|
|
203
|
+
<a id="interval_notch_options"></a>
|
204
|
+
The interval notches date spans themselves can be customized by using the `-i` flag when generating a timeline. The available parameters are
|
205
|
+
|
206
|
+
Decade
|
207
|
+
Lustrum
|
208
|
+
FullYear
|
209
|
+
Month
|
210
|
+
Week
|
211
|
+
Date
|
212
|
+
Hours
|
213
|
+
Minutes
|
214
|
+
Seconds
|
215
|
+
|
202
216
|
Event notches are templated through `#TS-card-tmpl` and contain individual
|
203
217
|
classes corresponding to spreadsheet columns. `.TS-item-label` corresponds to
|
204
218
|
`description`, `.TS-item_html` corresponds to `html`,
|
@@ -227,6 +241,7 @@ On the client side, there are a number of features we plan to add, including:
|
|
227
241
|
|
228
242
|
* In the Wild: [ProPublica: How One Blast Affected Five Soldiers](http://www.propublica.org/special/tbi-psycho-platoon-timeline)
|
229
243
|
* In the Wild: [TPM: The Wisconsin Union Struggle Timeline](http://www.talkingpointsmemo.com/interactive/2011/04/the-wisconsin-union-struggle-timeline.php)
|
244
|
+
* In the Wild: [Los Angeles Times: Bell: 'Corruption on Steroids'](http://timelines.latimes.com/bell/)
|
230
245
|
|
231
246
|
<a id="credits"></a>
|
232
247
|
## Credits
|
@@ -243,6 +258,12 @@ questions should go to <a href="mailto:opensource@propublica.org">opensource@pro
|
|
243
258
|
<a id="changelog"></a>
|
244
259
|
## Change Log
|
245
260
|
|
261
|
+
<a id="release-020"></a>
|
262
|
+
### 0.2.0
|
263
|
+
|
264
|
+
* New feature adds support for custom interval notch ranges.
|
265
|
+
* Change command line to output supporting assets by default unless `-a` is specified
|
266
|
+
|
246
267
|
<a id="release-012"></a>
|
247
268
|
### 0.1.2
|
248
269
|
|