Browse Source

More documentation for constants

Matt Sparks 13 years ago
parent
commit
9658f8c250
3 changed files with 78 additions and 3 deletions
  1. 30 1
      alphasign/charsets.py
  2. 18 1
      alphasign/colors.py
  3. 30 1
      alphasign/extchars.py

+ 30 - 1
alphasign/charsets.py

@@ -1,3 +1,31 @@
+"""
+Character sets can be used to change the font style in TEXT and STRING files.
+
+The following character set constants are defined:
+
+* :const:`FIVE_HIGH_STD`
+* :const:`FIVE_STROKE`
+* :const:`SEVEN_HIGH_STD`
+* :const:`SEVEN_STROKE`
+* :const:`SEVEN_HIGH_FANCY`
+* :const:`TEN_HIGH_STD`
+* :const:`SEVEN_SHADOW`
+* :const:`FULL_HEIGHT_FANCY`
+* :const:`FULL_HEIGHT_STD`
+* :const:`SEVEN_SHADOW_FANCY`
+* :const:`FIVE_WIDE`
+* :const:`SEVEN_WIDE`
+* :const:`SEVEN_FANCY_WIDE`
+* :const:`WIDE_STROKE_FIVE`
+
+The following character sets are available only on Alpha 2.0 and 3.0 protocols:
+
+* :const:`FIVE_HIGH_CUST`
+* :const:`SEVEN_HIGH_CUST`
+* :const:`TEN_HIGH_CUST`
+* :const:`FIFTEEN_HIGH_CUST`
+"""
+
 # Character sets
 FIVE_HIGH_STD      = "\x1A1"
 FIVE_STROKE        = "\x1A2"
@@ -13,8 +41,9 @@ FIVE_WIDE          = "\x1A;"
 SEVEN_WIDE         = "\x1A<"
 SEVEN_FANCY_WIDE   = "\x1A="
 WIDE_STROKE_FIVE   = "\x1A>"
+
 # Alpha 2.0 and 3.0 only
 FIVE_HIGH_CUST     = "\x1AW"
 SEVEN_HIGH_CUST    = "\x1AX"
 TEN_HIGH_CUST      = "\x1AY"
-FIFTEEN_HIGH_CUST  = "\x1AZ"
+FIFTEEN_HIGH_CUST  = "\x1AZ"

+ 18 - 1
alphasign/colors.py

@@ -1,3 +1,20 @@
+"""
+The following constants are defined to change TEXT colors:
+
+* :const:`RED`
+* :const:`GREEN`
+* :const:`AMBER`
+* :const:`DIM_RED`
+* :const:`DIM_GREEN`
+* :const:`BROWN`
+* :const:`ORANGE`
+* :const:`YELLOW`
+* :const:`RAINBOW_1`
+* :const:`RAINBOW_2`
+* :const:`COLOR_MIX`
+* :const:`AUTOCOLOR`
+"""
+
 # Colors
 RED       = "\x1C1"
 GREEN     = "\x1C2"
@@ -11,4 +28,4 @@ RAINBOW_1 = "\x1C9"
 RAINBOW_2 = "\x1CA"
 COLOR_MIX = "\x1CB"
 AUTOCOLOR = "\x1CC"
-# TODO(ms): need support for RGB colors
+# TODO(ms): need support for RGB colors

+ 30 - 1
alphasign/extchars.py

@@ -1,3 +1,32 @@
+"""
+Extended characters can be inserted into STRING or TEXT files.
+
+The following extended character constants are defined:
+
+* :const:`UP_ARROW`
+* :const:`DOWN_ARROW`
+* :const:`LEFT_ARROW`
+* :const:`RIGHT_ARROW`
+* :const:`PACMAN`
+* :const:`SAIL_BOAT`
+* :const:`BALL`
+* :const:`TELEPHONE`
+* :const:`HEART`
+* :const:`CAR`
+* :const:`HANDICAP`
+* :const:`RHINO`
+* :const:`MUG`
+* :const:`SATELLITE_DISH`
+* :const:`COPYRIGHT_SYMBOL`
+* :const:`MALE_SYMBOL`
+* :const:`FEMALE_SYMBOL`
+* :const:`BOTTLE`
+* :const:`DISKETTE`
+* :const:`PRINTER`
+* :const:`MUSICAL_NOTE`
+* :const:`INFINITY_SYMBOL`
+"""
+
 # Extended characters
 UP_ARROW         = "\x08\x64"
 DOWN_ARROW       = "\x08\x65"
@@ -20,4 +49,4 @@ BOTTLE           = "\x08\x75"
 DISKETTE         = "\x08\x76"
 PRINTER          = "\x08\x77"
 MUSICAL_NOTE     = "\x08\x78"
-INFINITY_SYMBOL  = "\x08\x79"
+INFINITY_SYMBOL  = "\x08\x79"