every libs/*.py and hooks/*.py now starts with a one-line module docstring; every bin/* script starts with a `# purpose:` header. discovery-by-`ls`-and-read instead of by index. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
5 lines
319 B
Python
5 lines
319 B
Python
"""nextcloud: build `sudo -u www-data php occ ...` shell strings for use in actions."""
|
|
|
|
|
|
def occ(command, *args, **kwargs):
|
|
return f"""sudo -u www-data php /opt/nextcloud/occ {command} {' '.join(args)} {' '.join(f'--{name.replace("_", "-")}' + (f'={value}' if value else '') for name, value in kwargs.items())}"""
|