Git Product home page Git Product logo

command-processor's Introduction

It is a system developed in python 3 that handles terminal entries. It differentiates text from commands and also executes them.

How to Install

# Get this repository
$ git clone [email protected]:Rodrigo-Weich/command-processor.git

# Go into the repository
$ cd command-processor/

# Run
$ python3 init.py

How to Use

You can define commands according to your need, for that, just follow the steps below

In commands.py file:

# First, create the role you want to add to the system. Example:
def name(name):
  return print(f"Name: {name}")

# Then, add the command line to the command list
commands = {
  "@name": "@name <name>|1|name(arguments[0])"
}
# Or else
commands["@name"] = "@name <name>|1|name(arguments[0])"

Important

The commands are formed by a string of parameters, where:

Arguments Information
"@name" Is the key that identifies the command in the list
"@name Is the command syntax
1 Is the number of parameters that the function will have
name(arguments[0])" Is the function itself

Warning

To add parameters to the function, you must use arguments[array_index]

For a function without parameters, use only name()

For a function with a parameter, use name(arguments[0])

For a function with two parameters, use name(arguments[0], arguments[1])

And so on...

License

The Command Processor is open-sourced software licensed under the MIT license.

command-processor's People

Contributors

rodrigoweich avatar

Watchers

 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.