From 67b3d29810ab7d1b3b2ac34d5d20ffb5683ff108 Mon Sep 17 00:00:00 2001 From: littleblack111 Date: Wed, 15 Mar 2023 23:48:19 +0800 Subject: update --- makeapp | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100755 makeapp (limited to 'makeapp') 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. -- cgit v1.2.3