summaryrefslogtreecommitdiff
path: root/makeapp
diff options
context:
space:
mode:
authorlittleblack111 <jerrylam110209@gmail.com>2023-03-15 23:48:19 +0800
committerlittleblack111 <jerrylam110209@gmail.com>2023-03-15 23:48:19 +0800
commit67b3d29810ab7d1b3b2ac34d5d20ffb5683ff108 (patch)
treebd9c5d34258106fd2594bbbab4cbf9e636b04a71 /makeapp
parent475c4f23556189609041c52a8eb32ff05dae7abc (diff)
update
Diffstat (limited to 'makeapp')
-rwxr-xr-xmakeapp36
1 files changed, 36 insertions, 0 deletions
diff --git a/makeapp b/makeapp
new file mode 100755
index 0000000..6588329
--- /dev/null
+++ b/makeapp
@@ -0,0 +1,36 @@
+#!/usr/bin/env python
+
+from os import system as cmd
+from sys import stderr
+
+
+def main():
+ # if furture going to C, put those into header file
+ # ==================================================================================== #
+ appname = input(":: Enter App name(Name):\n")
+ appgename = input(":: Enter App Generic Name(Can be leaved as blank):\n")
+ appicon = input(":: Package Icon(Can be leaved as blank):\n")
+ appexec = input(":: Where is the App script(exec):\n")
+ appcomm = input(":: Comment about the App(Can be leaved as blank):\n")
+ otherextras = input(":: Extras Argument for the .desktop?(going to be echoed into the file)(Can be leaved blank):\n")
+ # ==================================================================================== #
+ # checking
+ # can leave blank
+ if len(appgename) <= 0:
+ noappgename = True
+ if len(appicon) <= 0:
+ noappicon = True
+ if len(otherextras) <= 0:
+ notherextras = True
+ if len(appcomm) <= 0:
+ noappcomm = True
+ # reuired
+ if len(appname) <= 0 or len(appexec) <= 0:
+ stderr.write("Please fill out the reuired options\n")
+ exit(1)
+ # main functions
+ def mainprocess():
+ cmd(f"sudo touch /usr/share/applications/{appname}.desktop")
+ cmd(f"sudo echo")
+
+#### dont want to do this anymore kinda useless.