'''
Created on Nov 3, 2010

@author: alandavidson
'''

def start(file):
    """
    Given a file, write out the HTML to set up the page.
    """
    file.write("<html><head><title>CPS6 Lab: Word Clouds!</title></head><body>")
    # The backslashes here let us put quote marks inside strings, so we can write
    # them to the file.
    file.write("<p style=\"text-align:justify;max-width:350pt\">")
    
def finish(file):
    """
    Given a file, write out the final HTML to finish the page.
    """
    file.write("</p></body></html>")
    
def write_sized_word(file, size, word):
    """
    file is a file.
    size is an int.
    word is a string.
    We write to the file to get word to appear in size point text.
    """
    file.write("<font style=\"font-size:")  # The backslash lets us put a quote inside a string.
    file.write(str(size))
    file.write("pt\">")
    file.write(word)
    file.write(" </font> ")
    print size
