Skip to content

Commit

Permalink
last update
Browse files Browse the repository at this point in the history
  • Loading branch information
BhJaipal committed Oct 29, 2024
1 parent d9e457a commit 82ce1a2
Show file tree
Hide file tree
Showing 8 changed files with 196 additions and 120 deletions.
5 changes: 3 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ on:

env:
BUILD_TYPE: Release
tag: "0.1.2"
tag: "0.1.3"

name: libaloo releases

Expand Down Expand Up @@ -40,7 +40,8 @@ jobs:
tag_name: v${{ env.tag }}
release_name: Release v${{ env.tag }}
body: |
Added Create App to python TUI
As Vala already exists, I don't actually need to create a new framework
But maybe I will continue it someday, for now it is paused
draft: false
prerelease: false
- name: Lib aloo deb file
Expand Down
39 changes: 0 additions & 39 deletions index.html

This file was deleted.

43 changes: 31 additions & 12 deletions scripts/src/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -704,11 +704,14 @@ def createApp() -> None:
currFilePath + "styles/colors.css",
"r",
).read()
materialCSS = open(
currFilePath + "styles/material.css",
lightCSS = open(
currFilePath + "styles/light.css",
"r",
).read()
darkCSS = open(
currFilePath + "styles/dark.css",
"r",
).read()

try:
while colorsCSS.index("\t") != -1:
colorsCSS = colorsCSS.replace("\t", "")
Expand All @@ -719,23 +722,39 @@ def createApp() -> None:
colorsCSS = colorsCSS.replace("\n", "")
except:
pass

try:
while materialCSS.index("\t") != -1:
materialCSS = materialCSS.replace("\t", "")
while lightCSS.index("\t") != -1:
lightCSS = lightCSS.replace("\t", "")
except:
pass
try:
while lightCSS.index("\n") != -1:
lightCSS = lightCSS.replace("\n", "")
except:
pass
try:
while materialCSS.index("\n") != -1:
materialCSS = materialCSS.replace("\n", "")
while darkCSS.index("\t") != -1:
darkCSS = darkCSS.replace("\t", "")
except:
pass
try:
while darkCSS.index("\n") != -1:
darkCSS = darkCSS.replace("\n", "")
except:
pass
os.mkdir(appInfo["project-name"] + "styles")
cssBundle = open(
appInfo["project-name"] + "styles/material.bundle.min.css",
open(
appInfo["project-name"] + "styles/colors.bundle.min.css",
"w+",
)
cssBundle.write(materialCSS + colorsCSS)
).write(colorsCSS)
open(
appInfo["project-name"] + "styles/light.bundle.min.css",
"w+",
).write(lightCSS)
open(
appInfo["project-name"] + "styles/dark.bundle.min.css",
"w+",
).write(darkCSS)

print("\t\033[1;32m󰄭 Aloo project created successfully\033[0m")
os.system("tput smcup")
Expand Down
144 changes: 108 additions & 36 deletions scripts/src/aloocli.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,27 +104,60 @@ def createApp(projectOption: str) -> None:
currFilePath + "styles/colors.css",
"r",
).read()
materialCSS = open(
currFilePath + "styles/material.css",

lightCSS = open(
currFilePath + "styles/light.css",
"r",
).read()
darkCSS = open(
currFilePath + "styles/dark.css",
"r",
).read()

while colorsCSS.index("\t") != -1:
colorsCSS = colorsCSS.replace("\t", "")
while colorsCSS.index("\n") != -1:
colorsCSS = colorsCSS.replace("\n", "")

while materialCSS.index("\t") != -1:
materialCSS = materialCSS.replace("\t", "")
while materialCSS.index("\n") != -1:
materialCSS = materialCSS.replace("\n", "")
try:
while colorsCSS.index("\t") != -1:
colorsCSS = colorsCSS.replace("\t", "")
except:
pass
try:
while colorsCSS.index("\n") != -1:
colorsCSS = colorsCSS.replace("\n", "")
except:
pass
try:
while lightCSS.index("\t") != -1:
lightCSS = lightCSS.replace("\t", "")
except:
pass
try:
while lightCSS.index("\n") != -1:
lightCSS = lightCSS.replace("\n", "")
except:
pass
try:
while darkCSS.index("\t") != -1:
darkCSS = darkCSS.replace("\t", "")
except:
pass
try:
while darkCSS.index("\n") != -1:
darkCSS = darkCSS.replace("\n", "")
except:
pass

os.mkdir(projectPath + "styles")
cssBundle = open(
projectPath + "styles/material.bundle.min.css",
open(
projectPath + "styles/colors.bundle.min.css",
"w+",
)
cssBundle.write(materialCSS + colorsCSS)
).write(colorsCSS)
open(
projectPath + "styles/light.bundle.min.css",
"w+",
).write(lightCSS)
open(
projectPath + "styles/dark.bundle.min.css",
"w+",
).write(darkCSS)

print("\t\033[1;32m󰄭 Aloo project created successfully\033[0m")

Expand Down Expand Up @@ -193,9 +226,12 @@ def run(runWhat_App_Test: str) -> None:

def cssMainLatest():
h1 = http.client.HTTPSConnection("raw.githubusercontent.com")
h1.request("GET", "/BhJaipal/libaloo/main/scripts/src/styles/material.css")
h1.request("GET", "/BhJaipal/libaloo/main/scripts/src/styles/light.css")
response = h1.getresponse()
lightCSSBytes: bytes = response.read()
h1.request("GET", "/BhJaipal/libaloo/main/scripts/src/styles/dark.css")
response = h1.getresponse()
materialCSSBytes: bytes = response.read()
darkCSSBytes: bytes = response.read()
h1.request("GET", "/BhJaipal/libaloo/main/scripts/src/styles/colors.css")
response = h1.getresponse()
colorsCSSBytes: bytes = response.read()
Expand All @@ -212,27 +248,47 @@ def cssMainLatest():
pass

try:
while materialCSSBytes.index(b"\t") != -1:
materialCSSBytes = materialCSSBytes.replace(b"\t", b"")
while lightCSSBytes.index(b"\t") != -1:
lightCSSBytes = lightCSSBytes.replace(b"\t", b"")
except:
pass
try:
while lightCSSBytes.index(b"\n") != -1:
lightCSSBytes = lightCSSBytes.replace(b"\n", b"")
except:
pass
try:
while materialCSSBytes.index(b"\n") != -1:
materialCSSBytes = materialCSSBytes.replace(b"\n", b"")
while darkCSSBytes.index(b"\t") != -1:
darkCSSBytes = darkCSSBytes.replace(b"\t", b"")
except:
pass
cssBundle = open(
"styles/material.bundle.min.css",
try:
while darkCSSBytes.index(b"\n") != -1:
darkCSSBytes = darkCSSBytes.replace(b"\n", b"")
except:
pass
open(
"styles/colors.bundle.min.css",
"w+",
)
cssBundle.write(materialCSSBytes.decode() + colorsCSSBytes.decode())
).write(colorsCSSBytes.decode())
open(
"styles/light.bundle.min.css",
"w+",
).write(lightCSSBytes.decode())
open(
"styles/dark.bundle.min.css",
"w+",
).write(darkCSSBytes.decode())


def cssStableLatest():
h1 = http.client.HTTPSConnection("raw.githubusercontent.com")
h1.request("GET", "/BhJaipal/libaloo/release/scripts/src/styles/material.css")
h1.request("GET", "/BhJaipal/libaloo/release/scripts/src/styles/light.css")
response = h1.getresponse()
lightCSSBytes: bytes = response.read()
h1.request("GET", "/BhJaipal/libaloo/release/scripts/src/styles/dark.css")
response = h1.getresponse()
materialCSSBytes: bytes = response.read()
darkCSSBytes: bytes = response.read()
h1.request("GET", "/BhJaipal/libaloo/release/scripts/src/styles/colors.css")
response = h1.getresponse()
colorsCSSBytes: bytes = response.read()
Expand All @@ -249,21 +305,37 @@ def cssStableLatest():
pass

try:
while materialCSSBytes.index(b"\t") != -1:
materialCSSBytes = materialCSSBytes.replace(b"\t", b"")
while lightCSSBytes.index(b"\t") != -1:
lightCSSBytes = lightCSSBytes.replace(b"\t", b"")
except:
pass
try:
while lightCSSBytes.index(b"\n") != -1:
lightCSSBytes = lightCSSBytes.replace(b"\n", b"")
except:
pass
try:
while materialCSSBytes.index(b"\n") != -1:
materialCSSBytes = materialCSSBytes.replace(b"\n", b"")
while darkCSSBytes.index(b"\t") != -1:
darkCSSBytes = darkCSSBytes.replace(b"\t", b"")
except:
pass
cssBundle = open(
"styles/material.bundle.min.css",
try:
while darkCSSBytes.index(b"\n") != -1:
darkCSSBytes = darkCSSBytes.replace(b"\n", b"")
except:
pass
open(
"styles/colors.bundle.min.css",
"w+",
)
cssBundle.write(materialCSSBytes.decode() + colorsCSSBytes.decode())
pass
).write(colorsCSSBytes.decode())
open(
"styles/light.bundle.min.css",
"w+",
).write(lightCSSBytes.decode())
open(
"styles/dark.bundle.min.css",
"w+",
).write(darkCSSBytes.decode())


term = blessed.Terminal()
Expand Down
1 change: 1 addition & 0 deletions scripts/src/styles/color.css
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
:root {
--skyblue-100: #c6e1fa;
--skyblue-200: #a5d1fa;
--skyblue-300: #84c2fc;
--skyblue-400: #4ba6fc;
Expand Down
4 changes: 0 additions & 4 deletions scripts/src/styles/dark.css
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,3 @@
display: flex;
flex-direction: row-reverse;
}

body {
background-color: black;
}
Loading

0 comments on commit 82ce1a2

Please sign in to comment.