mirror of
https://github.com/corpnewt/gibMacOS.git
synced 2024-09-20 09:30:34 +00:00
Add option to show catalog url
This commit is contained in:
parent
db19a30094
commit
5484f9920c
1 changed files with 21 additions and 6 deletions
|
@ -107,11 +107,11 @@ class gibMacOS:
|
||||||
for prod in prods:
|
for prod in prods:
|
||||||
# Grab the ServerMetadataURL for the passed product key if it exists
|
# Grab the ServerMetadataURL for the passed product key if it exists
|
||||||
prodd = {"product":prod}
|
prodd = {"product":prod}
|
||||||
#try:
|
try:
|
||||||
b = self.d.get_bytes(plist_dict.get("Products",{}).get(prod,{}).get("ServerMetadataURL",""), False)
|
b = self.d.get_bytes(plist_dict.get("Products",{}).get(prod,{}).get("ServerMetadataURL",""), False)
|
||||||
smd = plist.loads(b)
|
smd = plist.loads(b)
|
||||||
#except:
|
except:
|
||||||
# smd = {}
|
smd = {}
|
||||||
# Populate some info!
|
# Populate some info!
|
||||||
prodd["date"] = plist_dict.get("Products",{}).get(prod,{}).get("PostDate","")
|
prodd["date"] = plist_dict.get("Products",{}).get(prod,{}).get("PostDate","")
|
||||||
prodd["time"] = time.mktime(prodd["date"].timetuple()) + prodd["date"].microsecond / 1E6
|
prodd["time"] = time.mktime(prodd["date"].timetuple()) + prodd["date"].microsecond / 1E6
|
||||||
|
@ -211,6 +211,17 @@ class gibMacOS:
|
||||||
print("")
|
print("")
|
||||||
self.u.grab("Press [enter] to return...")
|
self.u.grab("Press [enter] to return...")
|
||||||
|
|
||||||
|
def show_catalog_url(self):
|
||||||
|
self.u.head()
|
||||||
|
print("")
|
||||||
|
print("Current Catalog: {}".format(self.current_catalog))
|
||||||
|
print("Max macOS Version: 10.{}".format(self.current_macos))
|
||||||
|
print("")
|
||||||
|
print("{}".format(self.build_url()))
|
||||||
|
print("")
|
||||||
|
menu = self.u.grab("Press [enter] to return...")
|
||||||
|
return
|
||||||
|
|
||||||
def main(self, dmg = False):
|
def main(self, dmg = False):
|
||||||
self.u.head()
|
self.u.head()
|
||||||
print("")
|
print("")
|
||||||
|
@ -225,6 +236,7 @@ class gibMacOS:
|
||||||
num += 1
|
num += 1
|
||||||
print("{}. {} {}\n - Added {}".format(num, p["version"], p["title"], p["date"]))
|
print("{}. {} {}\n - Added {}".format(num, p["version"], p["title"], p["date"]))
|
||||||
print("")
|
print("")
|
||||||
|
print("U. Show Catalog URL")
|
||||||
print("Q. Quit")
|
print("Q. Quit")
|
||||||
print("")
|
print("")
|
||||||
menu = self.u.grab("Please select an option: ")
|
menu = self.u.grab("Please select an option: ")
|
||||||
|
@ -232,6 +244,9 @@ class gibMacOS:
|
||||||
return
|
return
|
||||||
if menu[0].lower() == "q":
|
if menu[0].lower() == "q":
|
||||||
self.u.custom_quit()
|
self.u.custom_quit()
|
||||||
|
elif menu[0].lower() == "u":
|
||||||
|
self.show_catalog_url()
|
||||||
|
return
|
||||||
|
|
||||||
# Assume we picked something
|
# Assume we picked something
|
||||||
try:
|
try:
|
||||||
|
|
Loading…
Reference in a new issue