summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorSanto Cariotti <dcariotti24@gmail.com>2020-04-06 21:54:59 +0200
committerSanto Cariotti <dcariotti24@gmail.com>2020-04-06 21:54:59 +0200
commit2808925e272dd0ff23e50587aef6d64292407ae0 (patch)
tree50383df4cdbebd4c6d4178fc954a6b5139761afd /bin
parent3a2246e26e9febe3c15e2ddc1e7e6f320f86fe15 (diff)
feat: bin file to manage frest
Diffstat (limited to 'bin')
-rwxr-xr-xbin/frest25
1 files changed, 25 insertions, 0 deletions
diff --git a/bin/frest b/bin/frest
new file mode 100755
index 0000000..f41df68
--- /dev/null
+++ b/bin/frest
@@ -0,0 +1,25 @@
+#!/usr/bin/env python
+
+import argparse
+from frest.manage.utils import logo, create_app
+from frest.manage.utils import logging, logging_arg
+import os
+
+
+def main():
+ parser = argparse.ArgumentParser()
+ parser.add_argument("--startapp", "-s", type=str, help="create new app")
+ args = parser.parse_args()
+
+ if args.startapp:
+ if not os.path.exists("scheme"):
+ logging_arg("Create {}... ", "scheme/")
+ logging("OK", 3, "\n")
+ os.mkdir("scheme")
+
+ create_app(args.startapp)
+
+
+if __name__ == "__main__":
+ logo()
+ main()