Skip to content

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

Notifications You must be signed in to change notification settings

rodrigoweich/command-processor

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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 git@github.com: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.

About

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

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages