table_setter 0.1.2
Sign up to get free protection for your applications and to get access to all the features.
- data/.document +5 -0
- data/.gitignore +20 -0
- data/LICENSE +20 -0
- data/README +10 -0
- data/Rakefile +66 -0
- data/TODO +3 -0
- data/VERSION.yml +5 -0
- data/bin/table-setter +5 -0
- data/doc/TableFu/Formatting.html +178 -0
- data/doc/TableSetter/App.html +176 -0
- data/doc/TableSetter/Command.html +376 -0
- data/doc/TableSetter/Table.html +1813 -0
- data/doc/TableSetter.html +292 -0
- data/doc/_index.html +146 -0
- data/doc/class_list.html +36 -0
- data/doc/css/common.css +1 -0
- data/doc/css/full_list.css +50 -0
- data/doc/css/style.css +268 -0
- data/doc/file.README.html +68 -0
- data/doc/file_list.html +38 -0
- data/doc/frames.html +13 -0
- data/doc/index.html +68 -0
- data/doc/js/app.js +99 -0
- data/doc/js/full_list.js +106 -0
- data/doc/js/jquery.js +19 -0
- data/doc/method_list.html +291 -0
- data/doc/top-level-namespace.html +85 -0
- data/documentation/css/dawn.css +121 -0
- data/documentation/css/styles.css +63 -0
- data/documentation/images/folder.png +0 -0
- data/documentation/images/key.png +0 -0
- data/documentation/images/proplogo.png +0 -0
- data/documentation/images/publish.png +0 -0
- data/documentation/images/text-x-generic.png +0 -0
- data/documentation/index.html.erb +221 -0
- data/documentation/tables/example/index.html +4074 -0
- data/documentation/tables/example_faceted/index.html +17239 -0
- data/documentation/tables/example_formatted/index.html +861 -0
- data/documentation/tables/example_local/1/index.html +6084 -0
- data/documentation/tables/example_local/10/index.html +6084 -0
- data/documentation/tables/example_local/11/index.html +6084 -0
- data/documentation/tables/example_local/12/index.html +6084 -0
- data/documentation/tables/example_local/13/index.html +6084 -0
- data/documentation/tables/example_local/14/index.html +6084 -0
- data/documentation/tables/example_local/15/index.html +6084 -0
- data/documentation/tables/example_local/16/index.html +6084 -0
- data/documentation/tables/example_local/17/index.html +6084 -0
- data/documentation/tables/example_local/18/index.html +6084 -0
- data/documentation/tables/example_local/19/index.html +6084 -0
- data/documentation/tables/example_local/2/index.html +6084 -0
- data/documentation/tables/example_local/20/index.html +6084 -0
- data/documentation/tables/example_local/21/index.html +6084 -0
- data/documentation/tables/example_local/22/index.html +6084 -0
- data/documentation/tables/example_local/23/index.html +6084 -0
- data/documentation/tables/example_local/24/index.html +1404 -0
- data/documentation/tables/example_local/3/index.html +6084 -0
- data/documentation/tables/example_local/4/index.html +6084 -0
- data/documentation/tables/example_local/5/index.html +6084 -0
- data/documentation/tables/example_local/6/index.html +6084 -0
- data/documentation/tables/example_local/7/index.html +6084 -0
- data/documentation/tables/example_local/8/index.html +6084 -0
- data/documentation/tables/example_local/9/index.html +6084 -0
- data/documentation/tables/example_local/index.html +6084 -0
- data/documentation/tables/favicon.ico +0 -0
- data/documentation/tables/images/th_arrow_asc.gif +0 -0
- data/documentation/tables/images/th_arrow_desc.gif +0 -0
- data/documentation/tables/index.html +48 -0
- data/documentation/tables/javascripts/application.js +32 -0
- data/documentation/tables/javascripts/jquery.tablesorter.js +852 -0
- data/documentation/tables/javascripts/jquery.tablesorter.multipagefilter.js +111 -0
- data/documentation/tables/javascripts/jquery.tablesorter.pager.js +183 -0
- data/documentation/tables/stylesheets/stylesheet.css +67 -0
- data/index.html +238 -0
- data/lib/table_setter/app.rb +54 -0
- data/lib/table_setter/command.rb +139 -0
- data/lib/table_setter/table.rb +226 -0
- data/lib/table_setter.rb +32 -0
- data/spec/spec.opts +1 -0
- data/spec/spec_helper.rb +11 -0
- data/spec/table-setter-app_spec.rb +24 -0
- data/spec/table-setter_spec.rb +179 -0
- data/table_setter.gemspec +171 -0
- data/template/config.ru +33 -0
- data/template/public/favicon.ico +0 -0
- data/template/public/images/th_arrow_asc.gif +0 -0
- data/template/public/images/th_arrow_desc.gif +0 -0
- data/template/public/javascripts/application.js +32 -0
- data/template/public/javascripts/jquery.tablesorter.js +852 -0
- data/template/public/javascripts/jquery.tablesorter.multipagefilter.js +111 -0
- data/template/public/javascripts/jquery.tablesorter.pager.js +183 -0
- data/template/public/stylesheets/stylesheet.css +74 -0
- data/template/tables/example.yml +21 -0
- data/template/tables/example_faceted.yml +27 -0
- data/template/tables/example_formatted.csv +1 -0
- data/template/tables/example_formatted.yml +27 -0
- data/template/tables/example_local.csv +5806 -0
- data/template/tables/example_local.yml +27 -0
- data/template/views/404.erb +4 -0
- data/template/views/500.erb +4 -0
- data/template/views/index.erb +7 -0
- data/template/views/layout.erb +34 -0
- data/template/views/table.erb +78 -0
- metadata +240 -0
@@ -0,0 +1,27 @@
|
|
1
|
+
table:
|
2
|
+
title: Browse All Approved Stimulus Highway Projects
|
3
|
+
file: example_local.csv
|
4
|
+
deck:
|
5
|
+
<p>Road and bridge projects are expected to make up one of the biggest chunks of the jobs created in the stimulus package. Below, you’ll find a chart of more than 5,800 projects that have been approved by the U.S. Department of Transportation. Once given the green light, states can put the projects out to bid, contract them and begin construction work. So far, about 2,300 projects are under way.</p>
|
6
|
+
<p>Help us find out how much progress has been made on these projects by participating in our <a href="http://projects.propublica.org/spotcheck/">Stimulus Spot Check</a>.</p>
|
7
|
+
|
8
|
+
<p>For more on the stimulus, check out our <a href="http://www.propublica.org/ion/stimulus">blog and resource page</a>.</p>
|
9
|
+
footer:
|
10
|
+
<p>Source: <a href="http://www.fdic.gov/bank/individual/failed/banklist.html">FDIC</a></p>
|
11
|
+
column_options:
|
12
|
+
columns:
|
13
|
+
- State
|
14
|
+
- Urban Area
|
15
|
+
- Project Description
|
16
|
+
- Improvement Type
|
17
|
+
- ARRA Funds Obligated
|
18
|
+
style:
|
19
|
+
State: 'text-align:left;'
|
20
|
+
Project Description: 'text-align:right;'
|
21
|
+
sorted_by:
|
22
|
+
State: ascending
|
23
|
+
formatting:
|
24
|
+
ARRA Funds Obligated: currency
|
25
|
+
hard_paginate: true
|
26
|
+
per_page: 250
|
27
|
+
live: true
|
@@ -0,0 +1,34 @@
|
|
1
|
+
<% table ||= nil %>
|
2
|
+
<!DOCTYPE html>
|
3
|
+
<html>
|
4
|
+
<head>
|
5
|
+
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
6
|
+
<title><%= table.nil? ? "All Tables" : table.title %></title>
|
7
|
+
<script type="text/javascript"
|
8
|
+
src="http://www.google.com/jsapi"></script>
|
9
|
+
<script type="text/javascript">
|
10
|
+
google.load("jquery", "1", {uncompressed:true})
|
11
|
+
</script>
|
12
|
+
<%= javascript_script_tag "/javascripts/jquery.tablesorter.js" %>
|
13
|
+
<%= javascript_script_tag "/javascripts/jquery.tablesorter.pager.js" %>
|
14
|
+
<%= javascript_script_tag "/javascripts/jquery.tablesorter.multipagefilter.js" %>
|
15
|
+
<%= javascript_script_tag "/javascripts/application.js" %>
|
16
|
+
<%= stylesheet_link_tag "/stylesheets/stylesheet.css", :media=>"screen" %>
|
17
|
+
|
18
|
+
<script>
|
19
|
+
<% if !table.nil? %>
|
20
|
+
var sortPlease = <%= table.sortable? %>;
|
21
|
+
var sortOrder = <%= table.sort_array.inspect || "null"%>;
|
22
|
+
var perPage = <%= table.per_page %>;
|
23
|
+
<% else %>
|
24
|
+
var sortPlease = false;
|
25
|
+
<% end %>
|
26
|
+
</script>
|
27
|
+
|
28
|
+
</head>
|
29
|
+
<body>
|
30
|
+
<div id="table_fu">
|
31
|
+
<%= yield %>
|
32
|
+
</div>
|
33
|
+
</body>
|
34
|
+
</html>
|
@@ -0,0 +1,78 @@
|
|
1
|
+
<div id="table_title"><%= table.title %></div>
|
2
|
+
<div id="deck"><%= table.deck %></div>
|
3
|
+
<div id="controls">
|
4
|
+
<% if !table.faceted? %>
|
5
|
+
<% if !table.hard_paginate? %>
|
6
|
+
<div id="filter">Filter: <input type="text"></div>
|
7
|
+
<% end %>
|
8
|
+
<div id="pager" class="pager">
|
9
|
+
<form>
|
10
|
+
<a href="<%= url_for "/#{table.slug}/#{table.prev_page}/" if !table.prev_page.nil? %>" class="prev">prev</a>
|
11
|
+
<span class="pagedisplay"/><%= "#{table.page} / #{table.total_pages}" if table.hard_paginate? %></span>
|
12
|
+
<a href="<%= url_for "/#{table.slug}/#{table.next_page}/" if !table.next_page.nil? %>" class="next">next</a>
|
13
|
+
<% if !table.hard_paginate? %>
|
14
|
+
<select class="pagesize">
|
15
|
+
<% (1..4).each do |count|%>
|
16
|
+
<option value="<%= table.per_page * count%>">
|
17
|
+
<%= table.per_page * count%></option>
|
18
|
+
<% end %>
|
19
|
+
</select>
|
20
|
+
<% end %>
|
21
|
+
</form>
|
22
|
+
</div>
|
23
|
+
<% end %>
|
24
|
+
</div>
|
25
|
+
<table id="data" class="tabular">
|
26
|
+
<thead>
|
27
|
+
<tr>
|
28
|
+
<% if table.faceted? %>
|
29
|
+
<th></th>
|
30
|
+
<% end %>
|
31
|
+
<% table.data.headers.each do |header| %>
|
32
|
+
<% unless header.ignored? %>
|
33
|
+
<th<%= " style=\"#{header.style}\"" %>><%= header %></th>
|
34
|
+
<% end %>
|
35
|
+
<% end %>
|
36
|
+
</tr>
|
37
|
+
</thead>
|
38
|
+
<tbody>
|
39
|
+
<% if table.faceted? %>
|
40
|
+
<% table.facets.each do |facet| %>
|
41
|
+
<tr>
|
42
|
+
<th style="text-align:left;"><%= facet.faceted_on %></th>
|
43
|
+
<% facet.headers.each_with_index do |header, i| %>
|
44
|
+
<% unless i == 0 %>
|
45
|
+
<th style="<%= header.style %>">
|
46
|
+
<%= facet.total_for(header.to_s).to_s if header.total? %>
|
47
|
+
</th>
|
48
|
+
<% end %>
|
49
|
+
<% end %>
|
50
|
+
</tr>
|
51
|
+
<% facet.rows.each do |row| %>
|
52
|
+
<tr>
|
53
|
+
<td></td>
|
54
|
+
<% row.columns.each do |column| %>
|
55
|
+
<% unless column.ignored? %>
|
56
|
+
<td <%= "style=\"#{column.style}\"" %>><%= column %></td>
|
57
|
+
<% end %>
|
58
|
+
<% end %>
|
59
|
+
</tr>
|
60
|
+
<% end %>
|
61
|
+
<% end %>
|
62
|
+
<% else %>
|
63
|
+
<% table.data.rows.each do |row| %>
|
64
|
+
<tr>
|
65
|
+
<% row.columns.each do |column| %>
|
66
|
+
<% unless column.ignored? %>
|
67
|
+
<td<%= " style=\"#{column.style}\"" %>><%= column %></td>
|
68
|
+
<% end %>
|
69
|
+
<% end %>
|
70
|
+
</tr>
|
71
|
+
<% end %>
|
72
|
+
<% end %>
|
73
|
+
</tbody>
|
74
|
+
<tfoot>
|
75
|
+
</tfoot>
|
76
|
+
</table>
|
77
|
+
<div><%= table.footer %></div>
|
78
|
+
</div>
|
metadata
ADDED
@@ -0,0 +1,240 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: table_setter
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.1.2
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Jeff Larson
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
|
12
|
+
date: 2010-03-10 00:00:00 -05:00
|
13
|
+
default_executable:
|
14
|
+
dependencies:
|
15
|
+
- !ruby/object:Gem::Dependency
|
16
|
+
name: rspec
|
17
|
+
type: :development
|
18
|
+
version_requirement:
|
19
|
+
version_requirements: !ruby/object:Gem::Requirement
|
20
|
+
requirements:
|
21
|
+
- - ">="
|
22
|
+
- !ruby/object:Gem::Version
|
23
|
+
version: 1.2.9
|
24
|
+
version:
|
25
|
+
- !ruby/object:Gem::Dependency
|
26
|
+
name: rack
|
27
|
+
type: :development
|
28
|
+
version_requirement:
|
29
|
+
version_requirements: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - ">="
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: 1.1.0
|
34
|
+
version:
|
35
|
+
- !ruby/object:Gem::Dependency
|
36
|
+
name: thin
|
37
|
+
type: :development
|
38
|
+
version_requirement:
|
39
|
+
version_requirements: !ruby/object:Gem::Requirement
|
40
|
+
requirements:
|
41
|
+
- - ">="
|
42
|
+
- !ruby/object:Gem::Version
|
43
|
+
version: 1.2.5
|
44
|
+
version:
|
45
|
+
- !ruby/object:Gem::Dependency
|
46
|
+
name: table_fu
|
47
|
+
type: :runtime
|
48
|
+
version_requirement:
|
49
|
+
version_requirements: !ruby/object:Gem::Requirement
|
50
|
+
requirements:
|
51
|
+
- - ">="
|
52
|
+
- !ruby/object:Gem::Version
|
53
|
+
version: 0.1.1
|
54
|
+
version:
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: sinatra
|
57
|
+
type: :runtime
|
58
|
+
version_requirement:
|
59
|
+
version_requirements: !ruby/object:Gem::Requirement
|
60
|
+
requirements:
|
61
|
+
- - ">="
|
62
|
+
- !ruby/object:Gem::Version
|
63
|
+
version: 0.9.4
|
64
|
+
version:
|
65
|
+
- !ruby/object:Gem::Dependency
|
66
|
+
name: sinatra-static-assets
|
67
|
+
type: :runtime
|
68
|
+
version_requirement:
|
69
|
+
version_requirements: !ruby/object:Gem::Requirement
|
70
|
+
requirements:
|
71
|
+
- - ">="
|
72
|
+
- !ruby/object:Gem::Version
|
73
|
+
version: 0.5.0
|
74
|
+
version:
|
75
|
+
- !ruby/object:Gem::Dependency
|
76
|
+
name: emk-sinatra-url-for
|
77
|
+
type: :runtime
|
78
|
+
version_requirement:
|
79
|
+
version_requirements: !ruby/object:Gem::Requirement
|
80
|
+
requirements:
|
81
|
+
- - ">="
|
82
|
+
- !ruby/object:Gem::Version
|
83
|
+
version: 0.2.1
|
84
|
+
version:
|
85
|
+
- !ruby/object:Gem::Dependency
|
86
|
+
name: curb
|
87
|
+
type: :runtime
|
88
|
+
version_requirement:
|
89
|
+
version_requirements: !ruby/object:Gem::Requirement
|
90
|
+
requirements:
|
91
|
+
- - ">="
|
92
|
+
- !ruby/object:Gem::Version
|
93
|
+
version: 0.6.6.0
|
94
|
+
version:
|
95
|
+
description: A sinatra based app for rendering CSVs hosted on google docs or locally in custom HTML
|
96
|
+
email: thejefflarson@gmail.com
|
97
|
+
executables:
|
98
|
+
- table-setter
|
99
|
+
- table-setter
|
100
|
+
extensions: []
|
101
|
+
|
102
|
+
extra_rdoc_files:
|
103
|
+
- LICENSE
|
104
|
+
- README
|
105
|
+
- TODO
|
106
|
+
files:
|
107
|
+
- .document
|
108
|
+
- .gitignore
|
109
|
+
- LICENSE
|
110
|
+
- README
|
111
|
+
- Rakefile
|
112
|
+
- TODO
|
113
|
+
- VERSION.yml
|
114
|
+
- bin/table-setter
|
115
|
+
- doc/TableFu/Formatting.html
|
116
|
+
- doc/TableSetter.html
|
117
|
+
- doc/TableSetter/App.html
|
118
|
+
- doc/TableSetter/Command.html
|
119
|
+
- doc/TableSetter/Table.html
|
120
|
+
- doc/_index.html
|
121
|
+
- doc/class_list.html
|
122
|
+
- doc/css/common.css
|
123
|
+
- doc/css/full_list.css
|
124
|
+
- doc/css/style.css
|
125
|
+
- doc/file.README.html
|
126
|
+
- doc/file_list.html
|
127
|
+
- doc/frames.html
|
128
|
+
- doc/index.html
|
129
|
+
- doc/js/app.js
|
130
|
+
- doc/js/full_list.js
|
131
|
+
- doc/js/jquery.js
|
132
|
+
- doc/method_list.html
|
133
|
+
- doc/top-level-namespace.html
|
134
|
+
- documentation/css/dawn.css
|
135
|
+
- documentation/css/styles.css
|
136
|
+
- documentation/images/folder.png
|
137
|
+
- documentation/images/key.png
|
138
|
+
- documentation/images/proplogo.png
|
139
|
+
- documentation/images/publish.png
|
140
|
+
- documentation/images/text-x-generic.png
|
141
|
+
- documentation/index.html.erb
|
142
|
+
- documentation/tables/example/index.html
|
143
|
+
- documentation/tables/example_faceted/index.html
|
144
|
+
- documentation/tables/example_formatted/index.html
|
145
|
+
- documentation/tables/example_local/1/index.html
|
146
|
+
- documentation/tables/example_local/10/index.html
|
147
|
+
- documentation/tables/example_local/11/index.html
|
148
|
+
- documentation/tables/example_local/12/index.html
|
149
|
+
- documentation/tables/example_local/13/index.html
|
150
|
+
- documentation/tables/example_local/14/index.html
|
151
|
+
- documentation/tables/example_local/15/index.html
|
152
|
+
- documentation/tables/example_local/16/index.html
|
153
|
+
- documentation/tables/example_local/17/index.html
|
154
|
+
- documentation/tables/example_local/18/index.html
|
155
|
+
- documentation/tables/example_local/19/index.html
|
156
|
+
- documentation/tables/example_local/2/index.html
|
157
|
+
- documentation/tables/example_local/20/index.html
|
158
|
+
- documentation/tables/example_local/21/index.html
|
159
|
+
- documentation/tables/example_local/22/index.html
|
160
|
+
- documentation/tables/example_local/23/index.html
|
161
|
+
- documentation/tables/example_local/24/index.html
|
162
|
+
- documentation/tables/example_local/3/index.html
|
163
|
+
- documentation/tables/example_local/4/index.html
|
164
|
+
- documentation/tables/example_local/5/index.html
|
165
|
+
- documentation/tables/example_local/6/index.html
|
166
|
+
- documentation/tables/example_local/7/index.html
|
167
|
+
- documentation/tables/example_local/8/index.html
|
168
|
+
- documentation/tables/example_local/9/index.html
|
169
|
+
- documentation/tables/example_local/index.html
|
170
|
+
- documentation/tables/favicon.ico
|
171
|
+
- documentation/tables/images/th_arrow_asc.gif
|
172
|
+
- documentation/tables/images/th_arrow_desc.gif
|
173
|
+
- documentation/tables/index.html
|
174
|
+
- documentation/tables/javascripts/application.js
|
175
|
+
- documentation/tables/javascripts/jquery.tablesorter.js
|
176
|
+
- documentation/tables/javascripts/jquery.tablesorter.multipagefilter.js
|
177
|
+
- documentation/tables/javascripts/jquery.tablesorter.pager.js
|
178
|
+
- documentation/tables/stylesheets/stylesheet.css
|
179
|
+
- index.html
|
180
|
+
- lib/table_setter.rb
|
181
|
+
- lib/table_setter/app.rb
|
182
|
+
- lib/table_setter/command.rb
|
183
|
+
- lib/table_setter/table.rb
|
184
|
+
- spec/spec.opts
|
185
|
+
- spec/spec_helper.rb
|
186
|
+
- spec/table-setter-app_spec.rb
|
187
|
+
- spec/table-setter_spec.rb
|
188
|
+
- table_setter.gemspec
|
189
|
+
- template/config.ru
|
190
|
+
- template/public/favicon.ico
|
191
|
+
- template/public/images/th_arrow_asc.gif
|
192
|
+
- template/public/images/th_arrow_desc.gif
|
193
|
+
- template/public/javascripts/application.js
|
194
|
+
- template/public/javascripts/jquery.tablesorter.js
|
195
|
+
- template/public/javascripts/jquery.tablesorter.multipagefilter.js
|
196
|
+
- template/public/javascripts/jquery.tablesorter.pager.js
|
197
|
+
- template/public/stylesheets/stylesheet.css
|
198
|
+
- template/tables/example.yml
|
199
|
+
- template/tables/example_faceted.yml
|
200
|
+
- template/tables/example_formatted.csv
|
201
|
+
- template/tables/example_formatted.yml
|
202
|
+
- template/tables/example_local.csv
|
203
|
+
- template/tables/example_local.yml
|
204
|
+
- template/views/404.erb
|
205
|
+
- template/views/500.erb
|
206
|
+
- template/views/index.erb
|
207
|
+
- template/views/layout.erb
|
208
|
+
- template/views/table.erb
|
209
|
+
has_rdoc: true
|
210
|
+
homepage: http://github.com/thejefflarson/table-setter
|
211
|
+
licenses: []
|
212
|
+
|
213
|
+
post_install_message:
|
214
|
+
rdoc_options:
|
215
|
+
- --charset=UTF-8
|
216
|
+
require_paths:
|
217
|
+
- lib
|
218
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
219
|
+
requirements:
|
220
|
+
- - ">="
|
221
|
+
- !ruby/object:Gem::Version
|
222
|
+
version: "0"
|
223
|
+
version:
|
224
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
225
|
+
requirements:
|
226
|
+
- - ">="
|
227
|
+
- !ruby/object:Gem::Version
|
228
|
+
version: "0"
|
229
|
+
version:
|
230
|
+
requirements: []
|
231
|
+
|
232
|
+
rubyforge_project: table-setter
|
233
|
+
rubygems_version: 1.3.5
|
234
|
+
signing_key:
|
235
|
+
specification_version: 3
|
236
|
+
summary: A sinatra based app for rendering CSVs in custom HTML
|
237
|
+
test_files:
|
238
|
+
- spec/spec_helper.rb
|
239
|
+
- spec/table-setter-app_spec.rb
|
240
|
+
- spec/table-setter_spec.rb
|