mirror of
https://github.com/StevenBlack/hosts.git
synced 2024-07-04 19:46:02 +02:00
Issue #208: fix - save the source data to populate the reame files.
This commit is contained in:
parent
8fbd424850
commit
962010ddcc
|
@ -88,6 +88,7 @@ defaults = {
|
|||
"targetip" : "0.0.0.0",
|
||||
"ziphosts" : False,
|
||||
"sourcedatafilename" : "update.json",
|
||||
"sourcedata" : [],
|
||||
"readmefilename" : "readme.md",
|
||||
"readmetemplate" : os.path.join(BASEDIR_PATH, "readme_template.md"),
|
||||
"readmedata" : {},
|
||||
|
@ -265,6 +266,7 @@ def getUpdateURLsFromFile(source):
|
|||
if os.path.exists(pathToUpdateFile):
|
||||
updateFile = open(pathToUpdateFile, "r")
|
||||
updateData = json.load(updateFile)
|
||||
settings["sourcedata"].append(updateData)
|
||||
retURLs = [updateData["url"]]
|
||||
updateFile.close()
|
||||
else:
|
||||
|
@ -428,7 +430,8 @@ def updateReadmeData():
|
|||
extensionsKey = "-".join(settings["extensions"])
|
||||
|
||||
generationData = {"location": os.path.join(settings["outputsubfolder"], ""),
|
||||
"entries": settings["numberofrules"]}
|
||||
"entries": settings["numberofrules"],
|
||||
"sourcedata": settings["sourcedata"]}
|
||||
settings["readmedata"][extensionsKey] = generationData
|
||||
with open(settings["readmedatafilename"], "w") as f:
|
||||
json.dump(settings["readmedata"], f)
|
||||
|
|
Loading…
Reference in New Issue
Block a user