]> sourceware.org Git - lvm2.git/blame - report-generators/title_page.rb
spacing
[lvm2.git] / report-generators / title_page.rb
CommitLineData
64f95b40
AK
1# Copyright (C) 2010 Red Hat, Inc. All rights reserved.
2#
3# This copyrighted material is made available to anyone wishing to use,
4# modify, copy, or redistribute it subject to the terms and conditions
5# of the GNU General Public License v.2.
6#
7# You should have received a copy of the GNU General Public License
8# along with this program; if not, write to the Free Software Foundation,
9# Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
10
1033d120
JT
11# This generates the index for the reports, including generation
12# times.
13
14require 'log'
15require 'string-store'
16require 'reports'
17require 'erb'
18require 'report_templates'
19
20include Reports
21
22reports = ReportRegister.new
23
24def safe_mtime(r)
25 r.path.file? ? r.path.mtime.to_s : "not generated"
26end
27
28template_store = TemplateStringStore.new
29
30# FIXME: use generate_report() method
31erb = ERB.new(template_store.lookup("index.rhtml"))
32body = erb.result(binding)
33title = "Generation times"
34
35erb = ERB.new(template_store.lookup("boiler_plate.rhtml"))
36txt = erb.result(binding)
37
38Pathname.new("reports/index.html").open("w") do |f|
39 f.puts txt
40end
41
42
This page took 0.04037 seconds and 5 git commands to generate.