-
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.
- Loading branch information
BuildTools
committed
Nov 12, 2023
1 parent
6ed4039
commit 5ff7d3f
Showing
7 changed files
with
92 additions
and
11 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
Binary file not shown.
Binary file not shown.
Binary file not shown.
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,18 +1,70 @@ | ||
from .menu import * | ||
import time | ||
from .textcolors import textcolors | ||
from tkinter.filedialog import askdirectory | ||
from tkinter.filedialog import * | ||
import os | ||
import sys | ||
from .logging import log | ||
|
||
file = None | ||
premake = False | ||
|
||
def run_lmod_maker(): | ||
def clear(): | ||
os.system("cls" if os.name == "nt" else "clear") | ||
|
||
def run_lmod_maker(args): | ||
print( | ||
textcolors.BOLD | ||
+ textcolors.PURPLE | ||
+ "PYToHub is made by @mas6y6 on github\n" | ||
+ textcolors.END | ||
) | ||
time.sleep(3) | ||
a = args | ||
|
||
if a[2] == '-file': | ||
log.info('Asking where to store file') | ||
d = askdirectory() | ||
if d == '': | ||
log.error('No directory to store file') | ||
else: | ||
log.info("Creating file") | ||
f = open(f"{d}/setup.umd",'w+') | ||
f.write("#Use \"python3 -m pytohub --hmd_maker -h\" to get the help guide to use this file\n") | ||
f.write("#This file is needed to install your module to your hub\n") | ||
elif a[2] == '-guide': | ||
print("""How to use the module_maker | ||
You well be given a file that pytohub will need to use to install the module to your lego hub | ||
Comments will be ignored #<comment> | ||
How to use arguments: | ||
After the command, you need to use a space to implement an argument | ||
Example: upload_file main.py | ||
File commands: | ||
make_module : Builds the module folder on the hub and get the hub ready (You can only run this one) | ||
ARGUMENTS: (<module_name>) | ||
return_home : Returns to the main directory of the module on the computer and hub | ||
ARGUMENTS: (None) | ||
upload_file : Uploads a file thats in a directory | ||
ARGUMENTS: (<file_directory>) | ||
mkdir : Makes a directory in the hub | ||
ARGUMENTS: (<new_directory>) | ||
chdir : Changes the current directory in the hub | ||
ARGUMENTS: (<directory>) | ||
finish : Finishs the module when its done (You can only run this one) | ||
ARGUMENTS: (None) | ||
""") | ||
else: | ||
log.error("UNKNOWN ERROR") | ||
|
||
#w = sys.argv[0].split('/') | ||
#w.pop(len(w) - 1) | ||
#main_mod = '/'.join(w) | ||
#time.sleep(3) |
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