Prints examples of using the script to the console using colored output.

def examples():
    """Prints examples of using the script to the console using colored output.
    """
    script = "Continuous Integration Automation Server"
    explain = ("For complex codes with many collaborators, it is often difficult to maintian "
               "a pristine code that everyone can rely on. If every developer has power to "
               "commit to master, unintentional mistakes happen that can cripple those who "
               "rely on the code for day-to-day business. One way to overcome this is to isolate "
               "the master branch and require collaborators to work on separate forks/branches. "
               "When they are ready to commit their changes to master, they create a pull request "
               "that summarizes the changes and why they want to merge them into the master branch.\n\n"
               "A continuous integration server monitors repositories for new pull requests. When a new "
               "request is made, the proposed changes are downloaded to a local sandbox and tested "
               "against all the existing code. If the master branch has a rich suite of unit tests "
               "this will detect any bugs in the proposed merger. If all the tests pass, then the "
               "owner of the master branch can have confidence that the merger will be okay.")
    contents = [(("Configure this machine to be a CI server. Unfortunately, this step requires "
                  "sudo authority because the API accesses the crontab for arbitrary users."), 
                 "sudo ci.py -setup", 
                 ("Before this setup can proceed, you need to make sure the global configuration "
                  "XML file has been created and the environment variable to its path has been set:\n"
                  "\texport PYCI_XML='~/path/to/global.xml'.\nSee also: -rollback")),
                (("Remove the cron tab from the server, delete the list of installed repositories "
                  "and undo anything else that the script did when -setup was used."),
                 "sudo ci.py -rollback",
                 ("This action deletes the files specified in 'ARCHFILE' and 'DATAFILE' in 'global.xml'. "
                  "Also, the crontab is removed, which is why sudo privileges are needed. See also -setup.")),
                (("Install the repository described by myrepo.xml onto the CI server so that "
                  "it's pull requests are monitored and unit ,tested."),
                 "ci.py -install myrepo.xml",
                 ("After installation, you can query the repository immediately by running the "
                  "script with -cron. You can install a list of repositories with a single command."
                  "See also -uninstall.")),
                (("Run the routines that check for new pull requests, run the unit tests, and post "
                  "the results to the media wiki."),
                 "ci.py -cron", "")]
    required = ("REQUIRED:\n\t-'repo.xml' file for *each* repository that gets installed on the server.\n"
                "\t-'global.xml' file with configuration settings for *all* repositories.\n"
                "\t- git user and API key with push access for *each* repository installed.")
    output = ("RETURNS: prints status information to stdout.")
    details = ("This script installs a continous integration server on the local machine by "
               "configuring a cron to call this script every couple of minutes. The script interacts "
               "with github using an API to monitor the pull requests. When new ones are found, the "
               "list of tests specified in the 'repo.xml' file is executed and the results are posted "
               "to a media wiki page associated with the specific pull request. For more details, see "
               "the online repo at https://github.com/rosenbrockc/ci.")
    outputfmt = ("")

    from pyci.msg import example
    example(script, explain, contents, required, output, outputfmt, details)