diff --git a/server/doc/generate b/server/doc/generate index 917ea39a4..675475bf3 100755 --- a/server/doc/generate +++ b/server/doc/generate @@ -144,7 +144,7 @@ for descriptor in descriptors: man['name'] = "eit-" + man['name'] see_also_txt.append("%s(1)" % (man['name'],)) man['title'] = "="*(len(man['name']) + 3) - if "seealso" not in man: + if not man.get("seealso"): man['seealso'] = "" else: man['seealso'] = ", " + man['seealso'] diff --git a/server/doc/mansrc/eit-branch.1.txt b/server/doc/mansrc/eit-branch.1.txt index cf5d9acf2..24fa8b432 100644 --- a/server/doc/mansrc/eit-branch.1.txt +++ b/server/doc/mansrc/eit-branch.1.txt @@ -72,4 +72,4 @@ lxnay@sabayon.org. SEE ALSO -------- - eit(1), + eit(1) diff --git a/server/doc/mansrc/eit-notice.1.txt b/server/doc/mansrc/eit-notice.1.txt new file mode 100644 index 000000000..d8508907a --- /dev/null +++ b/server/doc/mansrc/eit-notice.1.txt @@ -0,0 +1,64 @@ +eit-notice(1) +============= +:man source: eit {eitversion} +:man manual: eit {eitversion} + + +NAME +---- +eit-notice - manage repository notice-board + + +SYNOPSIS +-------- +eit notice [-h] {add,remove,show} ... + + +INTRODUCTION +------------ +Notice-board is the way to communicate news or other misc info to your users +through repositories. The repository notice-board is downloaded (if available) +whenever the user updates the local repositories. The Entropy Client is going to +list notice-board titles for user consumption. + + + +OPTIONS +------- +"eit notice" supports the following options which alters its behaviour. + + +OPTIONAL ARGUMENTS +~~~~~~~~~~~~~~~~~~ +*--help*:: + show this help message and exit + +ACTION +~~~~~~ +*add*:: + add notice-board entry + +*remove*:: + remove notice-board entry + +*show*:: + show notice-board + + + +AUTHORS +------- +Eit has been accidentally prototyped during a rainy Sunday by Fabio +Erculiani who was looking for innovative ways of handling package +bumps in Sabayon Entropy repositories. +A few months later, Eit saw the light. + + +REPORTING BUGS +-------------- +Report bugs to https://bugs.sabayon.org or directly to the author at +lxnay@sabayon.org. + +SEE ALSO +-------- + eit(1) diff --git a/server/doc/mansrc/eit.1.txt b/server/doc/mansrc/eit.1.txt index 9b0b8c066..aa0b134af 100644 --- a/server/doc/mansrc/eit.1.txt +++ b/server/doc/mansrc/eit.1.txt @@ -161,5 +161,5 @@ lxnay@sabayon.org. SEE ALSO -------- - eit-add(1), eit-branch(1), eit-commit(1), eit-repack(1) + eit-add(1), eit-branch(1), eit-commit(1), eit-notice(1), eit-repack(1) diff --git a/server/eit/commands/command.py b/server/eit/commands/command.py index 1ea45cc38..1a716d6ac 100644 --- a/server/eit/commands/command.py +++ b/server/eit/commands/command.py @@ -106,16 +106,26 @@ class EitCommand(object): options_txt.append(options_header) for group in action_groups: - options_txt.append(group.title.upper()) - options_txt.append("~" * len(group.title)) + if group._group_actions: + options_txt.append(group.title.upper()) + options_txt.append("~" * len(group.title)) for action in group._group_actions: action_name = action.metavar option_strings = action.option_strings if not option_strings: # positional args - action_str = "*" + action_name + "*::\n" - action_str += " " + action.help + "\n" + if action_name is None: + # SubParsers + action_lst = [] + for sub_action in action._get_subactions(): + sub_action_str = "*" + sub_action.dest + "*::\n" + sub_action_str += " " + sub_action.help + "\n" + action_lst.append(sub_action_str) + action_str = "\n".join(action_lst) + else: + action_str = "*" + action_name + "*::\n" + action_str += " " + action.help + "\n" else: action_str = "" for option_str in option_strings: diff --git a/server/eit/commands/notice.py b/server/eit/commands/notice.py index 4ac4d6470..b01516e1e 100644 --- a/server/eit/commands/notice.py +++ b/server/eit/commands/notice.py @@ -68,6 +68,19 @@ class EitNotice(EitCommand): return parser + INTRODUCTION = """\ +Notice-board is the way to communicate news or other misc info to your users +through repositories. The repository notice-board is downloaded (if available) +whenever the user updates the local repositories. The Entropy Client is going to +list notice-board titles for user consumption. +""" + + def man(self): + """ + Overridden from EitCommand. + """ + return self._man() + def parse(self): parser = self._get_parser() try: