source: trunk/lib/html_utility.h @ 235

Last change on this file since 235 was 235, checked in by Peter Johansson, 14 years ago

added Date class
changed date format on first page
fixed plotting only once (fixes #113)
changed interface to anchor class
more anchors to users
removed anchor to '../' in author summary in dirs
anchors are filtered through HtmlStream?
log messages are truncated and newlines are replaced with spaces

File size: 2.3 KB
Line 
1#ifndef _theplu_svndigest_html_utility_
2#define _theplu_svndigest_html_utility_
3
4// $Id$
5
6/*
7  Copyright (C) 2006, 2007 Peter Johansson
8
9  This file is part of svndigest, http://lev.thep.lu.se/trac/svndigest
10
11  svndigest is free software; you can redistribute it and/or modify it
12  under the terms of the GNU General Public License as published by
13  the Free Software Foundation; either version 2 of the License, or
14  (at your option) any later version.
15
16  svndigest is distributed in the hope that it will be useful, but
17  WITHOUT ANY WARRANTY; without even the implied warranty of
18  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
19  General Public License for more details.
20
21  You should have received a copy of the GNU General Public License
22  along with this program; if not, write to the Free Software
23  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
24  02111-1307, USA.
25*/
26
27#include <iostream>
28#include <fstream>
29#include <iosfwd>
30#include <set>
31#include <string>
32#include <vector>
33
34namespace theplu{
35namespace svndigest{
36
37  class Date;
38  class Stats;
39  class SVNlog;
40
41  ///
42  /// @brief create anchor
43  ///
44  /// @param href address to link to
45  /// @param name text visible on page
46  /// @param level '../' is added @a level times before @a href
47  /// @param title title of anchor
48  ///
49  std::string anchor(const std::string& href, 
50                     const std::string& name, u_int level=0, 
51                     const std::string& title="");
52
53  ///
54  /// \brief printing cascading style sheet to file name @a str.
55  ///
56  void print_css(const std::string& str);
57
58  void print_authors(std::ostream& os, 
59                     const std::vector<std::pair<std::string, Date> >&, 
60                     const SVNlog&, const Stats& stats);
61
62  ///
63  /// called by print_main_page
64  ///
65  void print_general_information(std::ostream&, const SVNlog&, size_t);
66
67  ///
68  /// @brief print main page
69  ///
70  void print_main_page(const std::string&, const SVNlog&, const Stats&);
71   
72  void print_recent_logs(std::ostream&, const SVNlog&);
73   
74  ///
75  /// @brief print html footer of page
76  ///
77  void print_footer(std::ostream&);
78   
79  ///
80  /// @brief print html header of page
81  ///
82  /// \param os stream to print to
83  /// \param name
84  /// \param level
85  /// \param
86  void print_header(std::ostream& os, std::string name, u_int level, 
87                    std::string user, std::string item, std::string path);
88
89
90}} // end of namespace svndigest end of namespace theplu
91
92#endif
Note: See TracBrowser for help on using the repository browser.