aboutsummaryrefslogtreecommitdiff
path: root/src/clients/appareo/man_appareo.cc
diff options
context:
space:
mode:
authorAvatar Kim Højgaard-Hansen <kimrhh@exherbo.org> 2009-01-29 23:52:10 +0000
committerAvatar David Leverton <levertond@googlemail.com> 2009-02-02 20:01:54 +0000
commit76de0bab2143e1ac4beb3e9d419b3f0c508e86a3 (patch)
treee883dccedb30383f7f16458c6689071d975196f1 /src/clients/appareo/man_appareo.cc
parent6495cff03b28792bd5ef8bdb7d97d77a7666a67e (diff)
downloadpaludis-76de0bab2143e1ac4beb3e9d419b3f0c508e86a3.tar.gz
paludis-76de0bab2143e1ac4beb3e9d419b3f0c508e86a3.tar.xz
add manifest generation client
Diffstat (limited to 'src/clients/appareo/man_appareo.cc')
-rw-r--r--src/clients/appareo/man_appareo.cc79
1 files changed, 79 insertions, 0 deletions
diff --git a/src/clients/appareo/man_appareo.cc b/src/clients/appareo/man_appareo.cc
new file mode 100644
index 000000000..6def4b75e
--- /dev/null
+++ b/src/clients/appareo/man_appareo.cc
@@ -0,0 +1,79 @@
+/* vim: set sw=4 sts=4 et foldmethod=syntax : */
+
+/*
+ * Copyright (c) 2009 Kim Højgaard-Hansen
+ *
+ * This file is part of the Paludis package manager. Paludis is free software;
+ * you can redistribute it and/or modify it under the terms of the GNU General
+ * Public License version 2, as published by the Free Software Foundation.
+ *
+ * Paludis is distributed in the hope that it will be useful, but WITHOUT ANY
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+ * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
+ * details.
+ *
+ * You should have received a copy of the GNU General Public License along with
+ * this program; if not, write to the Free Software Foundation, Inc., 59 Temple
+ * Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+
+#include "command_line.hh"
+#include <paludis/args/man.hh>
+
+#include <iostream>
+#include <cstdlib>
+
+using std::cout;
+using std::endl;
+
+namespace
+{
+ struct ManCommandLine :
+ paludis::args::ArgsHandler
+ {
+ paludis::args::ArgsGroup group;
+ paludis::args::SwitchArg a_html;
+
+ ManCommandLine() :
+ group(this, "", ""),
+ a_html(&group, "html", '\0', "", false)
+ {
+ }
+
+ virtual std::string app_name() const
+ {
+ return "";
+ }
+
+ virtual std::string app_description() const
+ {
+ return "";
+ }
+
+ virtual std::string app_synopsis() const
+ {
+ return "";
+ }
+ };
+}
+
+int
+main(int argc, char * argv[])
+{
+ ManCommandLine cmdline;
+ cmdline.run(argc, argv, "", "", "");
+
+ if (cmdline.a_html.specified())
+ {
+ paludis::args::HtmlWriter hw(cout);
+ paludis::args::generate_doc(hw, CommandLine::get_instance());
+ }
+ else
+ {
+ paludis::args::ManWriter mw(cout);
+ paludis::args::generate_doc(mw, CommandLine::get_instance());
+ }
+
+ return EXIT_SUCCESS;
+}
+