2018-11-13 21:55:59 +01:00
|
|
|
"""WordOps base controller."""
|
|
|
|
|
|
|
|
|
|
from cement.core.controller import CementBaseController, expose
|
2019-09-23 15:43:23 +02:00
|
|
|
|
2019-10-02 13:13:32 +02:00
|
|
|
from wo.core.variables import WOVar
|
2019-09-23 15:43:23 +02:00
|
|
|
|
2019-10-02 13:13:32 +02:00
|
|
|
VERSION = WOVar.wo_version
|
2018-11-13 21:55:59 +01:00
|
|
|
|
|
|
|
|
BANNER = """
|
|
|
|
|
WordOps v%s
|
2020-10-23 12:50:31 +02:00
|
|
|
Copyright (c) 2020 WordOps.
|
2018-11-13 21:55:59 +01:00
|
|
|
""" % VERSION
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class WOBaseController(CementBaseController):
|
|
|
|
|
class Meta:
|
|
|
|
|
label = 'base'
|
2019-04-05 10:02:20 +02:00
|
|
|
description = ("An essential toolset that eases WordPress "
|
|
|
|
|
"site and server administration with Nginx")
|
2018-11-13 21:55:59 +01:00
|
|
|
arguments = [
|
|
|
|
|
(['-v', '--version'], dict(action='version', version=BANNER)),
|
2019-04-05 10:02:20 +02:00
|
|
|
]
|
2018-11-13 21:55:59 +01:00
|
|
|
|
|
|
|
|
@expose(hide=True)
|
|
|
|
|
def default(self):
|
|
|
|
|
self.app.args.print_help()
|