You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Cool Shell Written In Python3 Allows You To Write Your Own Commands And Execute It. That Includes It's Own Scripting Language.
2
+
-Cool Shell Written In Python3 Allows You To Write Your Own Commands And Execute It. That Includes It's Own Scripting Language.
3
3
4
4
## Usage:
5
5
- 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
@@ -48,62 +48,6 @@ testcommand - someinputhere
48
48
Cool, Your Input is: someinputhere
49
49
```
50
50
51
-
# How To Write Your Own Easy Code?
52
-
- I'm Not Really Sure If Easy Code Is Easy. But You Can Decide. Easy Code Is Based On Python So Every Easy Code You're Writing Is Getting Genrated Into a Python Code. You Can See `examples` Folder Or Follow The Documentation Below.
53
-
54
-
### Variable Assignment And Usage:
55
-
- Let's Start With The Most Basic Thing Here. In Easy You Can Store Local Variables Using `DEFINE` Key, When The Parser Adds That Variable Into The Dicc. You Will Be Able To Call It From Anywhere Outside Of This Of Code Using `ADD` Key. See The Example Below For More Information
56
-
57
-
```
58
-
DEFINE githubHandler=<'"DEMON1A"'>
59
-
60
-
STORE handler
61
-
ADD githubHandler;NEWLINE
62
-
CALL print,handler
63
-
```
64
-
65
-
- After Translating The Code With EasyShell, The Output Code Will Be Something Like This:
66
-
67
-
```python
68
-
handler ="DEMON1A"
69
-
print(handler)
70
-
```
71
-
72
-
- I Usally Use This Method To Add a Pure Python Code Into My Easy Code To Work With It Until I Implement a Key For The Thing I Need In Python
73
-
- You Can Define Multi Variables On a Line Using `,` Between Everyone. For Example: `STORE test,something,hi`. You Can Use This For Functions That Returns More Than One Variable
74
-
75
-
### Defining a Function:
76
-
- You Can Define Your Own Function With `FUNCTION` Key On The Code. That Will Create a Python Function For You But You Will Need To Use `.` at The End Of Every Syntax You Code. The Dot at The End Of The Code Adds a TAB Into **The Next Line Of Code**. So When You Define a Function You Should Use `.` At The End Of It. See The Example Below
77
-
78
-
```
79
-
80
-
FUNCTION Main.
81
-
CALL print,"Hello^World!"
82
-
83
-
NEWLINE
84
-
CALL Main
85
-
```
86
-
87
-
- After Translating The Code It Will Be Something Like This:
88
-
89
-
```python
90
-
defMain():
91
-
print("Hello World!")
92
-
93
-
Main()
94
-
```
95
-
96
-
### Import Python Modules.
97
-
- No Python Code Can Work Without Imports. To Import a Python Library You Need To Use `IMPORT` Key. For Example If You Used `IMPORT os,time` After Tranlating The Code It Will Be `import os,time` LOL.
98
-
99
-
### Call a Function And Store Python Variables
100
-
- To Call a Function In Easy, You Should Use `CALL` Key. That Allows You To Call a Python Function With Arguments By Sperating The Values With `,`. For Example: `CALL print,"Hello^World!"`
101
-
102
-
- To Store Python Variables You Can Use `STORE` Key. That Will Set The Variable Name. And The Next Line Of Code Will Be It's Value.
103
-
104
-
### TAB and NEWLINE:
105
-
- It's Just a Basic Keys On Easy To Add NewLines And Tabs On The Code. So When You Want To Add a NewLine On Your Code You Just Need To Add `NEWLINE` And When You're Coding On a Function And You Hate Using Dots. Then Use `TAB` Key. I Know It's Not Pretty To Have `NEWLINE` and `TAB` On a Single Line. So I Allowed Using `;` On The Code. So You Can Just Do Whatever Code You Want Then Add `;TAB` Or `;NEWLINE` To Add a NewLine/Tab at The End
106
-
107
51
## To-Do:
108
52
-[X] Adding Local Variable Assignment
109
53
-[X] Allowing Using `;` For Multi Code In One Line
@@ -121,14 +65,17 @@ Main()
121
65
-[X] Perform Some Tests On a Linux Machine. Or Ask Someone To-Do So.
122
66
123
67
### Changelog:
124
-
- EasyShell Beta Version Released
68
+
-[2021/2/2] EasyShell Beta Version Released 0.0.1
69
+
-[2021/2/8] EasyShell Beta Version Updated With More Features 0.0.2
125
70
126
71
## Notes:
127
-
- Easy Is Sensitive To Spaces More Than Python. I Did Build The Parser From Zero Using Split Methods And Other Things On The Code. One Wrong Space Can Make an Error On The Code And Your LineOfCode Won't Be Applied. It's Only One Space Between The Key And It's Value. So `CALL something` Is Right. But `CALL [SPACE]something` Will Kill The Code. And That's The Same For `;` You Can't Include Spaces On It. `NEWLINE;CALL something` Is Right, But `NEWLINE; CALL something` Is Really Wrong.
72
+
-~~Easy Is Sensitive To Spaces More Than Python. I Did Build The Parser From Zero Using Split Methods And Other Things On The Code. One Wrong Space Can Make an Error On The Code And Your LineOfCode Won't Be Applied. It's Only One Space Between The Key And It's Value. So `CALL something` Is Right. But `CALL [SPACE]something` Will Kill The Code. And That's The Same For `;` You Can't Include Spaces On It. `NEWLINE;CALL something` Is Right, But `NEWLINE; CALL something` Is Really Wrong.~~
73
+
74
+
-~~I Didn't Implement The Error Handler Yet *( it's on the to-do list )* So Invalid Code Won't Be Applied On The Translated Code. You Won't Get an Error. If You Can't See Your Code On The Translation Then Check Your Code Again Specially For Spaces.~~
128
75
129
-
-I Didn't Implement The Error Handler Yet *( it's on the to-do list )*So Invalid Code Won't Be Applied On The Translated Code. You Won't Get an Error. If You Can't See Your Code On The Translation Then Check Your Code Again Specially For Spaces.
76
+
-~~As I Said Before. Easy Is Sensitive To Spaces. So You Can't Really Use Spaces On The Code. But You Can Use `^` On Variables On These Stuff And The Parser Will Make Them Spaces. For Example: `CALL print,"Hello^World!"` After Translating It Will Be: `print("Hello World!")`~~.
130
77
131
-
-As I Said Before. Easy Is Sensitive To Spaces. So You Can't Really Use Spaces On The Code. But You Can Use `^`On Variables On These Stuff And The Parser Will Make Them Spaces. For Example: `CALL print,"Hello^World!"` After Translating It Will Be: `print("Hello World!")`
78
+
-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.
132
79
133
80
## Somethng Isn't Working Or You Have Suggestions?
134
81
- 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](https://twitter.com/DemoniaSlash).
0 commit comments