polc.renderers
index
/mud/nakedmud-mod/lib/pymodules/polc/renderers.py

################################################################################
#
# Four Worlds
# Copyright (c) 2009-????
#
# Package: polc
#    File: renderers.py
#
# The automatic Python OLC system, capable of generating an online content editor
# for a given Python class or dict by using dictionaries to discover properties.
#
# Rendering of values for display in the OLC menu.
#
# Author: Stendec
#
################################################################################

 
Modules
       
auxiliary
copy
mudsys
storage

 
Functions
       
fancy_key(key)
Attempt to make a key name fancy. If it's in an array of default names, return the
corresponding fancy name. Otherwise, convert underscores to spaces and make it
title case.
format_string(...)
format_string(text, indent=True, width=80)
 
Format a block of text to be of the specified width, possibly indenting
paragraphs.
highlight_color lambda v
render_bool(sock, data, key, value)
Render a boolean value for the automatic OLC system.
render_choice(sock, data, key, value)
Render a choice for the automatic OLC system.
render_choice_list(sock, data, key, value)
Render a list of choices for the automatic OLC system.
render_choice_select(sock, data, key, value)
Render a list of choices to select from for the prompt after selecting a key.
render_list(sock, data, key, value)
Render a list for the automatic OLC system. Strings are
output without being escaped and surrounded in quotation
marks.
render_number(sock, data, key, value)
Render a number value for the automatic OLC system.
render_string(sock, data, key, value)
Render a string value for the automatic OLC system.
render_subitem(sock, data, key, value)
Render a subitem key for the automatic OLC system.

 
Data
        StringTypes = (<type 'str'>, <type 'unicode'>)
fancy_keys = {'desc': 'Description', 'edesc': 'Extra Descriptions', 'mdesc': 'Room Description for Multiple Occurences', 'mname': 'Name for Multiple Occurences', 'rdesc': 'Room Description'}
menukeys = '1234567890ABCDEFGHIJKLMNOPRSTUVWXYZ'