From 56601f1e0dfccb379c57a76570754bb7acb30ee8 Mon Sep 17 00:00:00 2001 From: ferricles Date: Sat, 25 Jun 2022 00:19:55 -0700 Subject: [PATCH] most of requested changes --- py_script/clean_json.py | 5 +++-- py_script/compress_json.py | 4 ++-- py_script/parse_sets.py | 9 --------- py_script/plot_dps.py | 2 +- py_script/process_ings.py | 1 + 5 files changed, 7 insertions(+), 14 deletions(-) delete mode 100644 py_script/parse_sets.py diff --git a/py_script/clean_json.py b/py_script/clean_json.py index 81276c3..910a985 100644 --- a/py_script/clean_json.py +++ b/py_script/clean_json.py @@ -1,6 +1,7 @@ ''' -A generic file used for turning a json into a compressed version of itself (minimal whitespaces). -Compressed files are useful for lowering the amount of data sent. +A generic file used for turning a json into a "clean" version of itself (human-friendly whitespace). +Clean files are useful for human reading and dev debugging. + Usage: python clean_json.py [infile rel path] [outfile rel path] ''' diff --git a/py_script/compress_json.py b/py_script/compress_json.py index a826c36..b021738 100644 --- a/py_script/compress_json.py +++ b/py_script/compress_json.py @@ -1,6 +1,6 @@ ''' -A generic file used for turning a json into a "clean" version of itself (human-friendly whitespace). -Clean files are useful for human reading and dev debugging. +A generic file used for turning a json into a compressed version of itself (minimal whitespaces). +Compressed files are useful for lowering the amount of data sent. Usage: python compress_json.py [infile rel path] [outfile rel path] ''' diff --git a/py_script/parse_sets.py b/py_script/parse_sets.py deleted file mode 100644 index 289578d..0000000 --- a/py_script/parse_sets.py +++ /dev/null @@ -1,9 +0,0 @@ -""" -An old file. - -""" - -with open("sets.txt", "r") as setsFile: - sets_split = (x.split("'", 2)[1][2:] for x in setsFile.read().split("a href=")[1:]) - with open("sets_list.txt", "w") as outFile: - outFile.write("\n".join(sets_split)) diff --git a/py_script/plot_dps.py b/py_script/plot_dps.py index 89bafe5..4c8b33c 100644 --- a/py_script/plot_dps.py +++ b/py_script/plot_dps.py @@ -1,5 +1,5 @@ """ -Plots the dps of all weapons on a neat graph. Used to generate graphics for dps_vis. +Generates data for dps_vis """ import matplotlib.pyplot as plt diff --git a/py_script/process_ings.py b/py_script/process_ings.py index 666281b..d0e9799 100644 --- a/py_script/process_ings.py +++ b/py_script/process_ings.py @@ -11,6 +11,7 @@ import json import sys import os import base64 +import argparse infile, outfile = sys.argv[1], sys.argv[2] if len(sys.argv) > 2 else sys.argv[1]