Parcourir la source

Added Unicode boxes to show what the ANSI will look like.

Steve Thielemann il y a 5 ans
Parent
commit
491de4530d
1 fichiers modifiés avec 47 ajouts et 1 suppressions
  1. 47 1
      boxes.py

+ 47 - 1
boxes.py

@@ -49,6 +49,24 @@ class Boxes(object):
     """
 
     box_styles = (
+        # ┌──┐
+        # │  │
+        # ├──┤
+        # └──┘
+        {
+            "tl": "\xda",
+            "tr": "\xbf",
+            "top": "\xc4",
+            "side": "\xb3",
+            "bl": "\xc0",
+            "br": "\xd9",
+            "ml": "\xc3",
+            "mr": "\xb4",
+        },
+        # ╔══╗
+        # ║  ║
+        # ╠══╣
+        # ╚══╝
         {
             "tl": "\xc9",
             "tr": "\xbb",
@@ -59,9 +77,37 @@ class Boxes(object):
             "ml": "\xcc",
             "mr": "\xb9",
         },
+        # ╒══╕
+        # │  │
+        # ╞══╡
+        # ╘══╛
+        {
+            "tl": "\xd5",
+            "tr": "\xb8",
+            "top": "\xcd",
+            "side": "\xb3",
+            "bl": "\xd4",
+            "br": "\xbe",
+            "ml": "\xc6",
+            "mr": "\xb5",
+        },
+        # ╓──╖
+        # ║  ║
+        # ╟──╢
+        # ╙──╜
+        {
+            "tl": "\xd6",
+            "tr": "\xb7",
+            "top": "\xc4",
+            "side": "\xba",
+            "bl": "\xd3",
+            "br": "\xbd",
+            "ml": "\xc7",
+            "mr": "\xb6",
+        },
     )
 
-    def __init__(self, size: int, color="", style=0, start_nl=True):
+    def __init__(self, size: int, color="", style=1, start_nl=True):
         """ Construct box
 
         size is width of text inside the box.