예제 #1
0
파일: run.py 프로젝트: AlirezaKm/expl
def app():
    cli()
예제 #2
0
if __name__ == '__main__':
    from commands import cli
    cli(obj={})
예제 #3
0
파일: main.py 프로젝트: tkordiak/urlstorage
import commands
from dotenv import load_dotenv

load_dotenv()

commands.cli.add_command(commands.setup_command)
commands.cli.add_command(commands.add_command)
commands.cli.add_command(commands.list_command)
commands.cli.add_command(commands.index_command)

if __name__ == '__main__':
    commands.cli()
예제 #4
0
from commands import cli, setup, add, category_list, category
from sys import argv
from dotenv import load_dotenv
load_dotenv()

cli.add_command(setup)
cli.add_command(add)
cli.add_command(category_list)
cli.add_command(category)

if __name__ == '__main__':
    cli()
"""
if len(argv) == 2 and  argv[1] == 'setup':
    '''
        Initialize DataBase
        Usage: python main.py setup
    '''
    setup()

if len(argv) == 4 and argv[1] == 'add':
    '''
    Adding new variable
    Usage: python main.py add --category-- http://google.com
    '''
    add(category=argv[2], url=argv[3])

if len(argv) == 3 and argv[1] == 'category':
    '''
    Search data by category
    Usage: python main.py catergory --category name--