Skip to content

Commit

Permalink
introduce customizable plugin arparse epilog
Browse files Browse the repository at this point in the history
  • Loading branch information
Abyss-W4tcher committed Jan 10, 2025
1 parent cedc0b0 commit 5859011
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
3 changes: 3 additions & 0 deletions volatility3/cli/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -368,6 +368,9 @@ def run(self):
help=plugin_list[plugin].__doc__,
description=plugin_list[plugin].__doc__,
)
epilog = getattr(plugin_list[plugin], "_argparse_epilog", None)
if epilog is not None:
plugin_parser.epilog = epilog
self.populate_requirements_argparse(plugin_parser, plugin_list[plugin])

###
Expand Down
2 changes: 2 additions & 0 deletions volatility3/framework/interfaces/plugins.py
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,8 @@ class PluginInterface(
# Be careful with inheritance around this (We default to requiring a version which doesn't exist, so it must be set)
_required_framework_version: Tuple[int, int, int] = (0, 0, 0)
"""The _version variable is a quick way for plugins to define their current interface, it should follow SemVer rules"""
_argparse_epilog: str = None
"""Display additional description of the plugin after the description of the arguments. See: https://docs.python.org/3/library/argparse.html#epilog"""

def __init__(
self,
Expand Down

0 comments on commit 5859011

Please sign in to comment.