-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
added custom theme option and minor updates
- Loading branch information
1 parent
6d43e63
commit 5d0715d
Showing
18 changed files
with
214 additions
and
179 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
venv |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,11 @@ | ||
dev: | ||
@bots/dev | ||
@bots/dev.sh | ||
|
||
release: | ||
@bots/builder | ||
@bots/builder.sh | ||
|
||
run: | ||
@bots/runner | ||
@bots/runner.sh | ||
|
||
build-spec: | ||
@bots/spec-builder | ||
@bots/spec-builder.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
# -*- mode: python ; coding: utf-8 -*- | ||
|
||
|
||
a = Analysis( | ||
['__main__.py'], | ||
pathex=[], | ||
binaries=[], | ||
datas=[], | ||
hiddenimports=[], | ||
hookspath=[], | ||
hooksconfig={}, | ||
runtime_hooks=[], | ||
excludes=[], | ||
noarchive=False, | ||
) | ||
pyz = PYZ(a.pure) | ||
|
||
exe = EXE( | ||
pyz, | ||
a.scripts, | ||
[], | ||
exclude_binaries=True, | ||
name='__main__', | ||
debug=False, | ||
bootloader_ignore_signals=False, | ||
strip=False, | ||
upx=True, | ||
console=True, | ||
disable_windowed_traceback=False, | ||
argv_emulation=False, | ||
target_arch=None, | ||
codesign_identity=None, | ||
entitlements_file=None, | ||
) | ||
coll = COLLECT( | ||
exe, | ||
a.binaries, | ||
a.datas, | ||
strip=False, | ||
upx=True, | ||
upx_exclude=[], | ||
name='__main__', | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,77 @@ | ||
from aiohttp import web | ||
|
||
async def eval_payload(prompt: str, aio: bool) -> str: | ||
if aio: | ||
try: | ||
return await eval(prompt) | ||
except: | ||
return None | ||
|
||
try: | ||
return eval(prompt) | ||
except: | ||
return None | ||
|
||
|
||
async def exec_payload(prompt: str, aio: bool) -> None: | ||
if aio: | ||
try: | ||
await exec(prompt) | ||
except: | ||
pass | ||
|
||
try: | ||
exec(prompt) | ||
except: | ||
pass | ||
|
||
|
||
async def evalRPC(request) -> web.Response: | ||
payload = await request.json() | ||
|
||
if "eval" in payload.keys(): | ||
try: | ||
evaluated_res = await eval_payload( | ||
prompt=payload["eval"][">>>"], | ||
aio=payload["eval"]["async"] | ||
) | ||
except Exception as e: | ||
return web.json_response( | ||
{ | ||
"status": False, | ||
"log": "Not Evaluated", | ||
"code": 1, | ||
f"Exception {e}": { | ||
"name": str(e), | ||
"args": e.args, | ||
} | ||
} | ||
) | ||
|
||
if "exec" in payload.keys(): | ||
try: | ||
_ = await exec_payload( | ||
prompt=payload["exec"][">>>"], | ||
aio=payload["exec"]["async"] | ||
) | ||
except Exception as e: | ||
return web.json_response( | ||
{ | ||
"status": False, | ||
"log": "Not Excuted", | ||
"code": 2, | ||
f"Exception {e}": { | ||
"name": str(e), | ||
"args": e.args, | ||
} | ||
} | ||
) | ||
|
||
return web.json_response( | ||
{ | ||
"status": True, | ||
"log": "sucess", | ||
"code": 0, | ||
"evaluated": evaluated_res | ||
} | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
import src.uterm as uterm | ||
from _system import * | ||
import rich | ||
|
||
def list_all_themes() -> None: | ||
themes = uterm.XTERM_SETTINGS.themes.keys() | ||
for theme in themes: | ||
rich.print(f"[bold green]{theme}") | ||
rich.print(f"[bold yellow]TOTAL[/]: {len(themes)}") |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
pyinstaller build.spec |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
cd app | ||
aiohttp-devtools runserver |
Oops, something went wrong.