aboutsummaryrefslogtreecommitdiff
path: root/src/clients/instruo/man_instruo.cc
diff options
context:
space:
mode:
authorAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2007-09-02 14:37:50 +0000
committerAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2007-09-02 14:37:50 +0000
commitaacf415f9ebb785f313f66a7dcf09192580adc58 (patch)
treeb84e63521f6b7d66a086783daacc8576f890af03 /src/clients/instruo/man_instruo.cc
parentb36f8a4bc2fd8e8471332700f1b2a0f53606cb04 (diff)
downloadpaludis-aacf415f9ebb785f313f66a7dcf09192580adc58.tar.gz
paludis-aacf415f9ebb785f313f66a7dcf09192580adc58.tar.xz
Add instruo, a metadata generation client
Diffstat (limited to 'src/clients/instruo/man_instruo.cc')
-rw-r--r--src/clients/instruo/man_instruo.cc80
1 files changed, 80 insertions, 0 deletions
diff --git a/src/clients/instruo/man_instruo.cc b/src/clients/instruo/man_instruo.cc
new file mode 100644
index 000000000..453b9914f
--- /dev/null
+++ b/src/clients/instruo/man_instruo.cc
@@ -0,0 +1,80 @@
+/* vim: set sw=4 sts=4 et foldmethod=syntax : */
+
+/*
+ * Copyright (c) 2006, 2007 Ciaran McCreesh <ciaranm@ciaranm.org>
+ *
+ * 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', "")
+ {
+ }
+
+ 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;
+}
+
+