diff options
| author | Dylan Araps <dylan.araps@gmail.com> | 2017-07-07 10:51:14 +1000 |
|---|---|---|
| committer | Dylan Araps <dylan.araps@gmail.com> | 2017-07-07 10:51:14 +1000 |
| commit | a288d35ef79f74f3e86219fe0ff57f5e29096d8b (patch) | |
| tree | b907b88f9b8c2b8880b5c4185df7f904767d569c /pywal | |
| parent | 7ac8099b9650e9e7125473cbe5666f1c16640dae (diff) | |
util: Update docs
Diffstat (limited to 'pywal')
| -rw-r--r-- | pywal/util.py | 24 |
1 files 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): |
