Skip to content
This repository has been archived by the owner on Dec 29, 2019. It is now read-only.

Commit

Permalink
changed unknown data file format slightly for easier processing
Browse files Browse the repository at this point in the history
  • Loading branch information
shakeyourbunny committed May 4, 2019
1 parent c2bfa96 commit b373b09
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 5 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
RWMS (RimWorldModSorter) changelog:

0.94.2 (2019-05-04):
modified:
- changed unknown data file format slightly for easier processing.

0.94.1 (2019-05-04):
new:
- asks if script may open a new browser window to RWMSDB issues tracker if unknown mods are detected.
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.94.1
0.94.2
10 changes: 6 additions & 4 deletions rwms_sort.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@

# ##################################################################################
# some basic initialization
VERSION = "0.94.1"
VERSION = "0.94.2"

twx, twy = shutil.get_terminal_size()

Expand Down Expand Up @@ -249,8 +249,8 @@ def load_mod_data(cats, db, basedir, modsource):
print("Processing unknown mods.")
time.sleep(3)
DB = dict()
DB["version"] = 2

DB["_version"] = 2
unknown_meta = dict()
unknown_meta["contributor"] = rwms_issue_mgmt.__get_github_user().split("@")[0]
unknown_meta["mods_unknown"] = len(mod_unknown)
Expand All @@ -259,14 +259,16 @@ def load_mod_data(cats, db, basedir, modsource):
unknown_meta["rwms_version"] = VERSION
unknown_meta["os"] = sys.platform
unknown_meta["time"] = str(time.ctime())
DB["_meta"] = unknown_meta
DB["meta"] = unknown_meta

unknown_diff = dict()
for mods in mod_unknown:
if not disablesteam:
workshop_url = "https://steamcommunity.com/sharedfiles/filedetails/?id={}".format(mods[1])
else:
workshop_url = ""
DB[mods[0]] = ["not_categorized", workshop_url]
unknown_diff[mods[0]] = ["not_categorized", workshop_url]
DB["unknown"] = unknown_diff

unknownfile = "rwms_unknown_mods_{}.json.txt".format(now_time)
print("Writing unknown mods.")
Expand Down

0 comments on commit b373b09

Please sign in to comment.