'''
Created on Nov 3, 2010

@author: rcd, alandavidson
'''

def start(file):
    """
    Given a file open for writing:
      write out the HTML tags to set up the page.
    """
    file.write('<html><head><title>CompSci 6 Lab: Word Clouds!</title></head><body>\n')
    file.write('<p style="text-align:justify;max-width:350pt">\n')

def finish(file):
    """
    Given a file open for writing, 
      write out the final HTML tags to finish the page.
    """
    file.write('</p></body></html>\n')


def format_sized_word(file, word, fontSize):
    """
    Given a file open for writing, 
      write out the given word at the given font size (an int) within the appropriate HTML tags.
    """
    file.write('  <font style="font-size:' + str(fontSize) + 'pt">' + word + '</font>\n');
