Giter Site home page Giter Site logo

interfacer's Introduction

Interfacer

Interfacer is a multi-level command line support library, heavily inspired by Cobbler's command line structure, only a lot cleaner.

To use it, just write an example script like the one in 'example_bin' and some modules like the ones in 'example_modules'.

Interfacer is also a thin abstraction around optparse at the lowest level, which simplifies how easy it is to write new command line tools.

Explore the source in 'lib' to understand how it works.

Examples

# example_cli

usage: ./example_bin/example_cli <category> [subcommand] [--options]

  choose a category for information about available commands:
            tribbles - does things with tribbles

# example_cli tribbles

usage: ./example_bin/example_cli tribbles <subcommand> [--options]

  choose a subcommand:

                list - list the tribbles

# example_cli tribbles list --help

Usage: example_cli tribbles list [options]

Options:
      -h, --help            show this help message and exit
      -n NAME, --name=NAME  list tribles only with this name

# example_cli tribbles list 

xyork
slorg
rooster
blinky
poorboy
willy

# example_cli tribbles list --name=willy

willy

License

Interfacer is MIT licensed (c) rPath 2012 and is very open to contributions, but not so much feature requests or bug reports (due to time constraints). Since it's so simple, just send me a pull request if you'd like to add or fix something.

Author

Michael DeHaan -- michael DOT dehaan AT gmail.com

interfacer's People

Contributors

mpdehaan avatar

Watchers

Philip Schwartz avatar James Cloos avatar

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.