2025-11-16 11:39:27 +01:00
|
|
|
# -*- coding: utf-8 -*-
|
|
|
|
|
|
|
|
|
|
from argparse import Namespace, ArgumentParser
|
|
|
|
|
|
|
|
|
|
from ..Cmd import Cmd
|
2026-01-27 10:22:16 +01:00
|
|
|
from ..CmdProjects import CmdProjects
|
2025-11-16 11:39:27 +01:00
|
|
|
|
|
|
|
|
class CmdHtdocsDir(Cmd): # export
|
|
|
|
|
|
2026-01-27 10:22:16 +01:00
|
|
|
def __init__(self, parent: CmdProjects) -> None:
|
|
|
|
|
super().__init__(parent, 'htdocs-dir', help='Print source directory containing document root of a given module')
|
2025-11-16 11:39:27 +01:00
|
|
|
|
|
|
|
|
def add_arguments(self, parser: ArgumentParser) -> None:
|
|
|
|
|
super().add_arguments(parser)
|
|
|
|
|
parser.add_argument('module', nargs='*', help='Modules')
|
|
|
|
|
|
|
|
|
|
def _run(self, args: Namespace) -> None:
|
|
|
|
|
r = []
|
|
|
|
|
for m in args.module:
|
|
|
|
|
r.append(self.app.htdocs_dir(m))
|
|
|
|
|
print(' '.join(r))
|