Initial content as generated from scaffold
This commit is contained in:
commit
9b0bbb74c2
27 changed files with 748 additions and 0 deletions
42
rattail_tutorial/commands.py
Normal file
42
rattail_tutorial/commands.py
Normal file
|
@ -0,0 +1,42 @@
|
|||
# -*- coding: utf-8; mode: python -*-
|
||||
"""
|
||||
Rattail Tutorial commands
|
||||
"""
|
||||
|
||||
from __future__ import unicode_literals, absolute_import
|
||||
|
||||
import sys
|
||||
|
||||
from rattail import commands
|
||||
|
||||
from rattail_tutorial import __version__
|
||||
|
||||
|
||||
def main(*args):
|
||||
"""
|
||||
Main entry point for Rattail Tutorial command system
|
||||
"""
|
||||
args = list(args or sys.argv[1:])
|
||||
cmd = Command()
|
||||
cmd.run(*args)
|
||||
|
||||
|
||||
class Command(commands.Command):
|
||||
"""
|
||||
Main command for Rattail Tutorial
|
||||
"""
|
||||
name = 'rattail_tutorial'
|
||||
version = __version__
|
||||
description = "Rattail Tutorial (custom Rattail system)"
|
||||
long_description = ''
|
||||
|
||||
|
||||
class HelloWorld(commands.Subcommand):
|
||||
"""
|
||||
The requisite 'hello world' example
|
||||
"""
|
||||
name = 'hello'
|
||||
description = __doc__.strip()
|
||||
|
||||
def run(self, args):
|
||||
self.stdout.write("hello world!\n")
|
Loading…
Add table
Add a link
Reference in a new issue