Giter VIP home page Giter VIP logo

easyshell's Introduction

EasyShell

  • Cool Shell Written In Python3 Allows You To Write Your Own Commands And Execute It. That Includes It's Own Scripting Language.
  • See The Wiki On The Github Repo For More Information About The Usage.

Usage:

  • If You Run EasyShell Without Arguments. It Will Just Open You The Shell That Will Take Your Inputs. Otherwise If You Want To Translate Or Execute Your Easy Code You Will Have To Use One Of These Examples Below

  • Modes: show, exec, execute, compile

python3 shell.py --file /path/to/your/easy/code.easy --mode show # That Will Show You The Code
python3 shell.py --file /path/to/your/easy/code.easy --mode exec # That Will Execute Your Easy Code
python3 shell.py --file /path/to/your/easy/code.easy --mode compile --output code.py # That Will Translate Your Easy Code To Python Code And Put The File On compiled Folder.

What The Hell Is EasyShell?

  • EasyShell Is a Simple Project I Created That Allows You To Make Your Own Shell Where You Control The Commands And Code You're Executing. And It's Not Just That. EasyShell Comes With It's Own Scripting Language. That Allows You To Write Easy Code Then Translate It To Python Code. Then Do Whatever You Want With It. Most Of The Scripting Languages

How To Add a New Command Into The Shell?

  • It's Kinda Easy, You Have Two Folders. scripts And data. Adding Command Isn't That Hard. You Just Need To Write Your Own Code On scripts Folder That's Using Run() as a Main Function With Input as The Only Input It Takes. In Case You Want To Pass a User Controlled Input Into The Shell The User Should Pass It Next To The Command With - Sepacting Them. See The Examples Below For More Information:

  • Before Using The Command You Have To Update The Commands Data On data Folder, Open The File Commands.easy Then You Should Add This Content On a Separated Line

command="script-without-dot-py"

Examples:

Script Example:
# filenme = "sample.py"

def Run(Input):
    print("Cool, Your Input is: {0}".format(Input))
Data Example:
testcommand="sample"
Shell Example:
testcommand - someinputhere
Output:
Cool, Your Input is: someinputhere

To-Do:

  • Adding Local Variable Assignment
  • Allowing Using ; For Multi Code In One Line
  • Using Pure Strings On The Code With ADD Option
  • Adding If Conditions Support
  • Adding Else Support
  • Adding While Loops Support
  • Adding For Loops Support
  • Making Easy Less Sensitive To Spaces
  • Appending INIT Support
  • Creating Some Useful Scripts For The Shell.
  • Adding Folder Option Compile
  • Creating an Errors Handler For The Parser.
  • Creating Some Cool And Easy ShortCuts. To Make Easy Really Easy.
  • Creating a PIP Package For It.
  • Creating a VSCode Language Support For It.
  • Perform Some Tests On a Linux Machine. Or Ask Someone To-Do So.

Changelog [Year/Month/Day] :

  • [2021/2/2] EasyShell beta version released 0.0.1
  • [2021/2/8] EasyShell beta version updated with more features 0.0.2
  • [2021/2/16] EasyShell is still on beta but updated. but for now it's ready for production 0.0.3
  • [2021/2/18] New EasyShell Version With Play Music Support Via Shell Using playmusic Command 0.0.4

Notes:

  • Easy is Ready For Real Usage Now, You Can Use Multi Spaces And Even Use Spaces Before The Syntax. And You Don't Need To Use ^ Instead Of Space. The Space Split Funcions Has Been Replacted With Characters Loop That Removes Spaces at The First And The End Of The File.

Something Isn't Working Or You Have Suggestions?

  • Oh, I Would Love To Hear People Suggestions Specially For This Case. If You See That Something Isn't Working Or You Want To Improve Something. Then Please Open a Github Issue Or Fork The Repo Then Create a Pull Request. Also, You Can DM Me On Twitter: DemoniaSlash.

easyshell's People

Contributors

demon1a avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar

easyshell's Issues

Some Syntaxes Doesn't Support Dot New Line On The Parser.

  • During Coding I Noticed That Some Syntaxes Like ADD And STORE Don't Support Dot New Line at The End Of The Code. Dot New Line Should Be a Thing On Every Function So I'm Planning To Move The Dot New Line Into a Function On The Parser Class To Use It With Every Syntax Within The Internal Class. After Getting Every Thing Ready Users Will Be Able To Edit Easy To Add Their Own Code Syntaxes. I'm Just Trying To Figure Out How To Make It Easy And User Controllable. Until The New Update, You Can Use ;NEWLINE That Will Add a New Line And Without Using More Than One Line Of Code.

Finding a Way To Create a Free Space Code. Instead Of Splitting Spaces.

  • It's Really Not Cool For One Invalid Space To Kill Your Code. So I'm Trying To Figure Out a Way To Do That With No Need To Use Spaces For The Splitting Process. I'm Thinking About Collecting Every Character Then Collect Them In Groups And Create a Huge Validation Process Based On The Tokens Like Defined In Parser. Or I Should Use ReGex But It Will Take Some Work. If You Have Any Suggestions Please Comment On This Issue. I Will Add Help Wanted Label For It. Otherwise, Just Wait For The Next Updates Here.

Adding Extra Layer Of Translation Before Converting The Code Into Python.

  • I Think Translating Easy Code Into a Program Readable Code Before Changing It To Python Would Be Great. In Easy It Converts Your Code Into Pure Python Code When It Got Your Valid Syntax. But We Need To Create Something More Easier To Handle Since I'm Working On External Scripts That Will Help Parsing The Code. We Can Translate The Easy Code In The Example Below:
CALL print,"Hello^World!"
  • Into Something Like This:
{
"call":"print",
"argument":"Hello World!"
}
  • Then The External Script Should Parse It Into a Python Code. Then Compile It.
  • If You Have Any Other Suggestions Please Comment Below. I Will Mark This as Help Wanted. And Until This Feature Is Done. This Issue Will Be Open.

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.