From 03608745813d4bff88d691a08693251cd9881575 Mon Sep 17 00:00:00 2001 From: Lars Wirzenius Date: Sat, 18 Nov 2017 19:19:30 +0100 Subject: Add: rudimentary icktool manpage --- icktool.1.in | 43 +++++++++++++++++++++++++++++++++++++++++++ setup.py | 23 +++++++++++++++++++++++ 2 files changed, 66 insertions(+) create mode 100644 icktool.1.in diff --git a/icktool.1.in b/icktool.1.in new file mode 100644 index 0000000..e8cc1f5 --- /dev/null +++ b/icktool.1.in @@ -0,0 +1,43 @@ +.\" Copyright 2017 Lars Wirzenius +.\" +.\" This program is free software: you can redistribute it and/or modify +.\" it under the terms of the GNU Affero General Public License as published by +.\" the Free Software Foundation, either version 3 of the License, or +.\" (at your option) any later version. +.\" +.\" This program 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 Affero General Public License for more details. +.\" +.\" You should have received a copy of the GNU Affero General Public License +.\" along with this program. If not, see . +.TH ICKTOOL 1 +.SH NAME +icktool \- use the Ick2 controller API +.SH SYNOPSIS +.SH DESCRIPTION +.B icktool +makes calls to the RESTful HTTP JSON API that the Ick2 controller +provides. +Ick2 is a continuous integration system. +The +.B icktool +command line syntax consists of a +.I command +possibly followed by arguments. +.PP +The commands are listed with the +.B help +subcommand. +Many commands read a project or worker description, +which is JSON format, +and will be documented when it stabilises. +Ick2 is currently under heavy developemnt. +.SH OPTIONS +.SH FILES +Run +.B icktool +with the option +.B \-\-list\-configs +for a list of all configuruation files it looks for. diff --git a/setup.py b/setup.py index 7b0b30e..e39e5c7 100644 --- a/setup.py +++ b/setup.py @@ -15,9 +15,29 @@ # along with this program. If not, see . from distutils.core import setup +from distutils.command.build import build + +import cliapp import ick2 +class Build(build): + + def run(self): + super().run() + self.build_manpage('icktool') + + def build_manpage(self, program): + source = '{}.1.in'.format(program) + filename = '{}.1'.format(program) + argv = [ + './{}'.format(program), + '--generate-manpage={}'.format(source), + ] + with open(filename, 'w') as manpage: + cliapp.runcmd(argv, stdout=manpage) + + setup( name='ick2', version=ick2.__version__, @@ -29,4 +49,7 @@ setup( packages=['ick2'], scripts=['create-token', 'start_ick', 'icktool', 'worker_manager'], data_files=[], + cmdclass={ + 'build': Build, + } ) -- cgit v1.2.1