-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
30 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,35 +1,40 @@ | ||
"""{{ project_name }} tools and scripts. | ||
|
||
Tools that also can be called as standalone scripts by adding prefix | ||
'{{ project_name }}-' to name in list below. | ||
'{{ project_name.replace("_", "-") }}-' to name in list below. | ||
|
||
""" | ||
|
||
import logging | ||
import os | ||
|
||
import click | ||
from {{ project_us }}.cli import CONTEXT_SETTINGS | ||
from {{ project_us }}.cli import {{ project_cc }}Cli | ||
|
||
from {{ project_name }}.cli import CONTEXT_SETTINGS | ||
{% set ProjectName = project_name.replace("_", " ").title().replace(" ", "") -%} | ||
from {{ project_name }}.cli import {{ ProjectName }}Cli | ||
|
||
__shortname__ = __name__.rsplit(".", maxsplit=1)[-1] | ||
|
||
|
||
logger = logging.getLogger(__name__) | ||
|
||
|
||
class {{ project_cc }}ToolsCli({{ project_cc }}Cli): | ||
"""{{ project_cc }} tools command line interface""" | ||
class {{ ProjectName }}ToolsCli({{ ProjectName }}Cli): | ||
"""{{ project_name }} tools command line interface""" | ||
|
||
cmd_folder = os.path.abspath( | ||
os.path.join(os.path.dirname(__file__), os.pardir, "tools") | ||
) | ||
module = "{{ project_us }}.tools" | ||
module = "{{ project_name }}.tools" | ||
|
||
|
||
@click.command( | ||
cls={{ project_cc }}ToolsCli, context_settings=CONTEXT_SETTINGS, help=__doc__, name="tools" | ||
cls={{ ProjectName }}ToolsCli, | ||
context_settings=CONTEXT_SETTINGS, | ||
help=__doc__, | ||
name="tools", | ||
) | ||
def cli(): | ||
"""{{ project_cc }} tools and scripts""" | ||
def main(): | ||
"""{{ project_name }} tools and scripts""" | ||
logger.info(__shortname__) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters