# Path: formatters/log.py
# class Paint:
# 
#     @staticmethod
#     def bold(s):
#         return "%s[01m%s%s[0m" % (chr(27), s.rstrip(), chr(27))
# 
#     @staticmethod
#     def red(s):
#         return "%s[33;31m%s%s[0m" % (chr(27), s.rstrip(), chr(27))
# 
#     @staticmethod
#     def green(s):
#         return "%s[31;32m%s%s[0m" % (chr(27), s.rstrip(), chr(27))
# 
#     @staticmethod
#     def blue(s):
#         return "%s[34;01m%s%s[0m" % (chr(27), s.rstrip(), chr(27))
# 
#     @staticmethod
#     def yellow(s):
#         return "%s[31;33m%s%s[0m" % (chr(27), s.rstrip(), chr(27))


import os, sys
import types
    import xml.etree.cElementTree as ET
    import xml.etree.ElementTree as ET
from formatters.log import Paint
            name = key
            code = self.NAME_TO_CODE.get(name)

        tag = self.ITEM_TAGS.get(code)
        if tag == None:
            return None

        item = Item(code, name)
        for child in tag.getchildren():
            if   child.tag == "solution":
                item.solution = child.text
            elif child.tag == "detail":
                item.detail = child.text

        return item


    @staticmethod
    def show(item, attrib=None):
        """ Show the help item.
        """

        if item == None:
            return

        if attrib == "solution":
            if item.solution != None: print item.solution.replace("\t", "")
        elif attrib == "detail":
            if item.detail != None: print item.detail.replace("\t", "")
        else:

# Path: formatters/log.py
# class Paint:
# 
#     @staticmethod
#     def bold(s):
#         return "%s[01m%s%s[0m" % (chr(27), s.rstrip(), chr(27))
# 
#     @staticmethod
#     def red(s):
#         return "%s[33;31m%s%s[0m" % (chr(27), s.rstrip(), chr(27))
# 
#     @staticmethod
#     def green(s):
#         return "%s[31;32m%s%s[0m" % (chr(27), s.rstrip(), chr(27))
# 
#     @staticmethod
#     def blue(s):
#         return "%s[34;01m%s%s[0m" % (chr(27), s.rstrip(), chr(27))
# 
#     @staticmethod
#     def yellow(s):
#         return "%s[31;33m%s%s[0m" % (chr(27), s.rstrip(), chr(27))


# Path: workflow/help.py
import os, sys
import types
    import xml.etree.cElementTree as ET
    import xml.etree.ElementTree as ET
from formatters.log import Paint

            name = key
            code = self.NAME_TO_CODE.get(name)

        tag = self.ITEM_TAGS.get(code)
        if tag == None:
            return None

        item = Item(code, name)
        for child in tag.getchildren():
            if   child.tag == "solution":
                item.solution = child.text
            elif child.tag == "detail":
                item.detail = child.text

        return item


    @staticmethod
    def show(item, attrib=None):
        """ Show the help item.
        """

        if item == None:
            return

        if attrib == "solution":
            if item.solution != None: print item.solution.replace("\t", "")
        elif attrib == "detail":
            if item.detail != None: print item.detail.replace("\t", "")
        else:

            print Paint.bold("%s\t%s\n" % (item.code, item.name))