source: wkhtmltox/trunk/fuentes/src/image/imagedocparts.cc @ 51

Last change on this file since 51 was 51, checked in by mabarracus, 4 years ago

wip

File size: 3.9 KB
Line 
1// -*- mode: c++; tab-width: 4; indent-tabs-mode: t; eval: (progn (c-set-style "stroustrup") (c-set-offset 'innamespace 0)); -*-
2// vi:set ts=4 sts=4 sw=4 noet :
3//
4// Copyright 2010, 2011 wkhtmltopdf authors
5//
6// This file is part of wkhtmltopdf.
7//
8// wkhtmltopdf is free software: you can redistribute it and/or modify
9// it under the terms of the GNU Lesser General Public License as published by
10// the Free Software Foundation, either version 3 of the License, or
11// (at your option) any later version.
12//
13// wkhtmltopdf is distributed in the hope that it will be useful,
14// but WITHOUT ANY WARRANTY; without even the implied warranty of
15// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16// GNU General Public License for more details.
17//
18// You should have received a copy of the GNU Lesser General Public License
19// along with wkhtmltopdf.  If not, see <http://www.gnu.org/licenses/>.
20
21#include "imagecommandlineparser.hh"
22#include "outputter.hh"
23#include <QWebFrame>
24
25#define STRINGIZE_(x) #x
26#define STRINGIZE(x) STRINGIZE_(x)
27
28/*!
29  Output name and a short description
30  \param o The outputter to output to
31*/
32void ImageCommandLineParser::outputManName(Outputter * o) const {
33        o->beginSection("Name");
34        o->paragraph("wkhtmltoimage - html to image converter");
35        o->endSection();
36}
37
38/*!
39  Output a short synopsis on how to call the command line program
40  \param o The outputter to output to
41*/
42void ImageCommandLineParser::outputSynopsis(Outputter * o) const {
43        o->beginSection("Synopsis");
44        o->verbatim("wkhtmltoimage [OPTIONS]... <input file> <output file>\n");
45        o->endSection();
46}
47
48/*!
49  Explain what the program does
50  \param o The outputter to output to
51*/
52void ImageCommandLineParser::outputDescripton(Outputter * o) const {
53        o->beginSection("Description");
54        o->beginParagraph();
55        o->text("Converts an HTML page into an image, ");
56        o->endParagraph();
57        o->endSection();
58}
59
60
61/*!
62  Output contact information
63  \param o The outputter to output to
64*/
65void ImageCommandLineParser::outputContact(Outputter * o) const {
66        o->beginSection("Contact");
67        o->beginParagraph();
68        o->text("If you experience bugs or want to request new features please visit ");
69        o->link("https://github.com/wkhtmltopdf/wkhtmltopdf/issues");
70        o->endParagraph();
71        o->endSection();
72}
73
74/*!
75  Output beginning of the readme
76  \param o The outputter to output to
77*/
78void ImageCommandLineParser::outputDocStart(Outputter * o) const {
79        o->beginSection("wkhtmltoimage " STRINGIZE(FULL_VERSION) " Manual");
80        o->paragraph("This file documents wkhtmltoimage, a program capable of converting HTML "
81                                 "documents into images.");
82        o->endSection();
83}
84
85/*!
86  Output information on how to compile
87  \param o The outputter to output to
88*/
89void ImageCommandLineParser::outputCompilation(Outputter * o) const {
90        o->beginSection("Compilation");
91        o->paragraph("It can happen that the static binary does not work for your system "
92                     "for one reason or the other, in that case you might need to compile "
93                     "wkhtmltoimage yourself.");
94        o->endParagraph();
95        o->endSection();
96}
97
98/*!
99  Output information on how to install
100  \param o The outputter to output to
101*/
102void ImageCommandLineParser::outputInstallation(Outputter * o) const {
103        o->beginSection("Installation");
104        o->paragraph(
105                "There are several ways to install wkhtmltoimage.  You can download a "
106                "already compiled binary, or you can compile wkhtmltoimage yourself. ");
107        o->endSection();
108}
109
110/*!
111  Output examples on how to use wkhtmltoimage
112  \param o The outputter to output to
113*/
114void ImageCommandLineParser::outputExamples(Outputter * o) const {
115        o->beginSection("Examples");
116        o->paragraph("This section presents a number of examples of how to invoke wkhtmltoimage.");
117        o->paragraph("To convert a remote HTML file to PNG:");
118        o->verbatim("wkhtmltoimage http://www.google.com google.png\n");
119        o->paragraph("To convert a local HTML file to PNG:");
120        o->verbatim("wkhtmltoimage my.html my.png\n");
121        o->endSection();
122}
Note: See TracBrowser for help on using the repository browser.