From a288d35ef79f74f3e86219fe0ff57f5e29096d8b Mon Sep 17 00:00:00 2001 From: Dylan Araps Date: Fri, 7 Jul 2017 10:51:14 +1000 Subject: [PATCH] util: Update docs --- pywal/util.py | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/pywal/util.py b/pywal/util.py index 2b9e3ef..aa2a26e 100644 --- a/pywal/util.py +++ b/pywal/util.py @@ -40,29 +40,29 @@ def set_grey(colors): def read_file(input_file): - """Read colors from a file.""" + """Read data from a file.""" with open(input_file) as file: - colors = file.read().splitlines() - return colors + data = file.read().splitlines() + return data def read_file_json(input_file): - """Read colors from a json file.""" + """Read data from a json file.""" with open(input_file) as json_file: - colors = json.load(json_file) - return colors + data = json.load(json_file) + return data -def save_file(colors, export_file): - """Write the colors to the file.""" +def save_file(data, export_file): + """Write data to a file.""" with open(export_file, "w") as file: - file.write(colors) + file.write(data) -def save_file_json(colors, export_file): - """Write the colors to a json file.""" +def save_file_json(data, export_file): + """Write data to a json file.""" with open(export_file, "w") as file: - json.dump(colors, file, indent=4) + json.dump(data, file, indent=4) def create_dir(directory):