Commit 5ba1fb8e authored by Antoine Millet's avatar Antoine Millet

Added manpages and updated setup.py to generate them while packaging.

parent 6c93495f
cc-server.1
cc-addaccount.1
===============
cc-addaccount
===============
----------------------------------------------------
A tool to create account on your cc-server directory
----------------------------------------------------
:Author: Antoine Millet <antoine.millet@smartjog.com>
:Manual section: 1
SYNOPSIS
========
cc-addaccount [options] <login>
DESCRIPTION
===========
CloudControl is a tool designed to facilitate administration of a wide set of
virtualised or not machines. This binary allow to create account on cc-server
account directory, even if cc-server is not started.
By default, the cc-server account directory is defined as
``/var/lib/cc-server`` (it's also the default for cc-server), but if you
changed it, you can use the ``--directory`` option.
OPTIONS
=======
-h, --help show this help message and exit
-d DIRECTORY, --directory=DIRECTORY
account directory
-p, --password ask for the password
-g, --god add a rule to allow all actions
-c COPY, --copy=COPY copy this already existing account
-r ROLE, --role=ROLE specify the role (default cli)
SEE ALSO
========
* Manual of cc-server ``man 1 cc-server``
===========
cc-server
===========
------------------------------------------------
Launch the CloudControl server on your computer.
------------------------------------------------
:Author: Antoine Millet <antoine.millet@smartjog.com>
:Manual section: 1
SYNOPSIS
========
cc-server [options]
DESCRIPTION
===========
CloudControl is a tool designed to facilitate administration of a wide set of
virtualised or not machines. This binary allow to launch the central server of
this system.
OPTIONS
=======
--version show program's version number and exit
-h, --help show this help message and exit
-c CONFIG, --config=CONFIG configuration file (default: /etc/cc-server.conf)
-d, --daemonize run as daemon and write pid file
-p PID_FILE, --pid-file=PID_FILE pid file (default: /var/run/cc-server.pid)
SEE ALSO
========
* Manual of cc-addaccount: ``man 1 cc-addaccount``
from setuptools import setup from setuptools import setup
from distutils.command.build import build
import os import os
import sys import sys
...@@ -7,6 +8,29 @@ from ccserver import __version__ ...@@ -7,6 +8,29 @@ from ccserver import __version__
ldesc = open(os.path.join(os.path.dirname(__file__), 'README')).read() ldesc = open(os.path.join(os.path.dirname(__file__), 'README')).read()
class BuildMan(build):
'''
Build command class used by distutil to generate manpages from RST sources
while packaging.
'''
MANPAGES = ('cc-server', 'cc-addaccount')
description = 'Build manual from RSt source'
def run(self):
from docutils.core import publish_file
from docutils.writers import manpage
for man in self.MANPAGES:
publish_file(source_path='doc/%s.rst' % man,
destination_path='%s.1' % man,
writer=manpage.Writer())
build.sub_commands.insert(0, ('build_man', None))
cmdclass = {'build_man': BuildMan}
setup( setup(
name='cc-server', name='cc-server',
version=__version__, version=__version__,
...@@ -24,4 +48,5 @@ setup( ...@@ -24,4 +48,5 @@ setup(
'Operating System :: Unix', 'Operating System :: Unix',
'Programming Language :: Python', 'Programming Language :: Python',
], ],
cmdclass=cmdclass
) )
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment