Skip to content

Commit

Permalink
Ignore CMAN.zip & add list mods feature
Browse files Browse the repository at this point in the history
We are now ready for release! Whoo! v1.0 Autonomous Aardvark coming
soon!
  • Loading branch information
williambl committed Nov 5, 2015
1 parent 265e739 commit d29ed14
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
Data/*
LocalData/*
LocalData/*
CMAN.zip
10 changes: 8 additions & 2 deletions CMAN.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,11 @@ def switch_path_dir(path, dir): #switches root of path to dir given
pathsplit[0] = dir.split(os.sep)[-1] #just in case it ends with os.sep
return(os.sep.join(pathsplit))

def listmods():
modsinstalled = get_installed_jsons()
print("Installed mods:")
print(str(modsinstalled))

def mergedirs(dir1, dir2):
files1 = []
files2 = []
Expand Down Expand Up @@ -404,6 +409,7 @@ def print_help():
print(" update: update the CMAN archive")
print(" help: display this help message")
print(" version: display the CMAN version number")
print(" list: list installed mods")
print(" exit: exit CMAN")

def get_upgrades(): #returns a list of 2-element lists of jsons (in which index 0 is the version you have and index 1 is the newest version)
Expand Down Expand Up @@ -496,8 +502,8 @@ def check_upgrades(full): #full is a flag for whether to print full list of upda
elif(len(command.split(" ")) == 1):
mod = None
get_info(mod)
else:
print("Invalid command syntax.")
elif(command.split(" ")[0] == "list"):
listmods()
elif(command.split(" ")[0] == "version"):
print("CMAN v"+version)
elif(command.split(" ")[0] == "help" or command.split(" ")[0] == "?"):
Expand Down

0 comments on commit d29ed14

Please sign in to comment.