GithubHelp home page GithubHelp logo

winkidney / cmdtree Goto Github PK

View Code? Open in Web Editor NEW
55.0 55.0 3.0 108 KB

Yet another cli library , click-like but sub-command friendly and designed for cli auto-generating.

License: MIT License

Python 99.23% Shell 0.14% Makefile 0.63%

cmdtree's Introduction

Hi there ๐Ÿ‘‹

Who is Winkidney
  • ๐Ÿ”ญ I'm a problem solver who is just writing codes
  • ๐Ÿ’ฌ Talk with me about ideas for makers, like artists/writers/muscians
  • ๐Ÿ‘ฏ Collect nice ideas with me: https://pin.37soloist.com
  • ๐Ÿ“ซ Here is my countryard: https://wiki.slassgear.com
  • โšก Interested in: Metaloid, ARPG and CRPG games

Python Rust Javascript C

cmdtree's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

cmdtree's Issues

[bug] entry may not call command object correctly

@command("run")
@argument("script_path", help="file path of python script")
@option("feed", type=Choices(("kline", "fake")), default="fake")
@option("config", help="config file path for kline database")
def hello(xxxxx):
    pass

This order may cause following error:

Traceback (most recent call last):
  File "engine_fc/shortcuts.py", line 42, in <module>
    entry()
  File "build/bdist.linux-x86_64/egg/cmdtree/registry.py", line 16, in entry
  File "build/bdist.linux-x86_64/egg/cmdtree/parser.py", line 62, in run
TypeError: 'CmdProxy' object is not callable

[Bug]argument and option order cause the argument missing

@command("run")
@option("kline", type=Choices(("kline", "fake")))
@argument("script_path", help="file path of python _script")
def run_test(script_path):
    pass

This order cause the positional argument "script_path" missing.

This order works well:

@command("run")
@argument("script_path", help="file path of python _script")
@option("kline", type=Choices(("kline", "fake")))
def run_test(script_path):
    pass

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.