diff options
author | Håkon Solbjørg <hlsolbjorg@gmail.com> | 2019-04-02 00:58:09 +0200 |
---|---|---|
committer | Håkon Solbjørg <hlsolbjorg@gmail.com> | 2019-04-02 19:56:20 +0200 |
commit | 1ceefd7d700caf18f2390b94aa81d9f0207a4d85 (patch) | |
tree | 8af07d61e62e27ad0ee73efa3adc84e7bd874e3c /switches.py | |
parent | aacc12dc9ab445e020444a5bd32b51f1fb62ddb8 (diff) |
chore: Refactor to get switches from gondul before executing labler ♻️
Diffstat (limited to 'switches.py')
-rw-r--r-- | switches.py | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/switches.py b/switches.py index d6c80a7..ab444c6 100644 --- a/switches.py +++ b/switches.py @@ -1,5 +1,3 @@ -from gondul import fetch_gondul_switches - switch_label_format = "%(switch_name)s-%(switch_num)s" switch_label_layout = """<!DOCTYPE html> <html><head> @@ -39,8 +37,7 @@ def write_html_to_file(html, outfile="switch_labels.html"): print("Wrote labels to '{}'.\nOpen the file in your browser and print it.".format(outfile)) -def make_switch_labels(): +def make_switch_labels(switches): print("Generating labels for switches") - switches = fetch_gondul_switches() labels = generate_labels(switches) write_html_to_file(labels) |