From: Tomas Mlcoch Date: Mon, 3 Mar 2014 08:59:42 +0000 (+0100) Subject: Update man pages X-Git-Tag: upstream/0.10.0~261 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=1cf749431a94a537069c6131ded8d48168a859a3;p=services%2Fcreaterepo_c.git Update man pages --- diff --git a/doc/createrepo_c.8.gz b/doc/createrepo_c.8.gz index d7c1ad1..6b39c6b 100644 Binary files a/doc/createrepo_c.8.gz and b/doc/createrepo_c.8.gz differ diff --git a/doc/mergerepo_c.8.gz b/doc/mergerepo_c.8.gz index f79f3a7..a1da534 100644 Binary files a/doc/mergerepo_c.8.gz and b/doc/mergerepo_c.8.gz differ diff --git a/doc/modifyrepo_c.8.gz b/doc/modifyrepo_c.8.gz index 19d8951..93f375b 100644 Binary files a/doc/modifyrepo_c.8.gz and b/doc/modifyrepo_c.8.gz differ diff --git a/utils/gen_rst.py b/utils/gen_rst.py index cbbc836..7248ba4 100755 --- a/utils/gen_rst.py +++ b/utils/gen_rst.py @@ -7,8 +7,9 @@ from optparse import OptionParser class Info(object): - def __init__(self, name, description=None, synopsis=None, copyright=None, options=None): + def __init__(self, name, summary=None, description=None, synopsis=None, copyright=None, options=None): self.name = name + self.summary = summary self.description = description self.synopsis = synopsis self.copyright = copyright @@ -20,13 +21,12 @@ class Info(object): rst += "%s\n" % self.name rst += "%s\n\n" % ("=" * len(self.name),) - # Add synopsis - #if self.synopsis: - # rst += ":Synopsis: %s\n\n" % self.synopsis - - # Add description - if self.description: - rst += ":Subtitle: %s\n\n" % self.description + # Add summary + if self.summary: + rst += "%s\n" % ("-" * len(self.summary)) + rst += "%s\n" % self.summary + rst += "%s\n" % ("-" * len(self.summary)) + rst += "\n" # Add copyright if self.copyright: @@ -35,10 +35,17 @@ class Info(object): # Add date rst += ":Date: $Date: %s $\n\n" % datetime.datetime.strftime(datetime.datetime.utcnow(), format="%F %X") + # Add synopsis + if self.synopsis: + rst += "SYNOPSIS\n" + rst += "========\n\n" + for line in self.synopsis: + rst += "%s\n\n" % line + rst += "\n" + # Add options - rst += "-------\n" rst += "OPTIONS\n" - rst += "-------\n" + rst += "=======\n" for command in self.options: cmd = "" @@ -147,20 +154,22 @@ if __name__ == "__main__": if options.mergerepo: NAME = "mergerepo_c" info = Info(NAME, - description="C implementation of mergerepo", - synopsis="%s [options] " % (NAME,), + summary="Merge multiple repositories together", + synopsis=["%s --repo repo1 --repo repo2" % (NAME,)], options=args) elif options.modifyrepo: NAME = "modifyrepo_c" info = Info(NAME, - description="C implementation of modifyrepo", - synopsis="%s [options] " % (NAME,), + summary="Modify a repomd (xml-rpm-metadata) repository", + synopsis=["%s [options] " % (NAME,), + "%s --remove " % (NAME,), + "%s [options] --batchfile " % (NAME,) ], options=args) else: NAME = "createrepo_c" info = Info(NAME, - description="C implementation of createrepo", - synopsis="%s [options] " % (NAME,), + summary="Create repomd (xml-rpm-metadata) repository", + synopsis=["%s [options] " % (NAME,)], options=args) ret = info.gen_rst()