Skip to main content

Use British spelling

ID
208dd26
date
2021-02-21 00:13:50+00:00
author
Alex Chan <alex@alexwlchan.net>
parent
4cf8676
message
Use British spelling
changed files
1 file, 10 additions, 1 deletion

Changed files

happybackgrounds.py (7595 → 7849)

diff --git a/happybackgrounds.py b/happybackgrounds.py
index 24bd229..5d7543d 100755
--- a/happybackgrounds.py
+++ b/happybackgrounds.py
@@ -176,6 +176,9 @@ def parse_args():
     parser.add_argument("--max_scale", type=float, default=1, help="(default: 1)")
     parser.add_argument("--avoid_center", action="store_true")
 
+    # Make a consideration for British people ;-)
+    parser.add_argument("--avoid_centre", action="store_true")
+
     parser.add_argument("--out_path", help="Where to save the SVG")
 
     result = parser.parse_args()
@@ -186,12 +189,18 @@ def parse_args():
     if result.min_scale > result.max_scale:
         sys.exit(f"error: --min_scale={result.min_scale} should be less than or equal to --max_scale={result.max_scale}")
 
-    return {
+    result = {
         name: getattr(result, name)
         for name in dir(result)
         if not name.startswith("_")
     }
 
+    if result["avoid_centre"]:
+        result["avoid_center"] = result["avoid_centre"]
+    del result["avoid_centre"]
+
+    return result
+
 
 if __name__ == "__main__":
     kwargs = parse_args()