import time
import datetime
import quip

class NewDoc(object):

    def __init__(self):
        NextWednesday = datetime.datetime.today() + datetime.timedelta(days = 5)
        self.NextWednesdayN = NextWednesday.strftime("%m%d")
        self.NextWednesdayS = NextWednesday.strftime("%B %d")
        if self.NextWednesdayS[-2] == "0":
            self.NextWednesdayS = self.NextWednesdayS[:-2] + self.NextWednesdayS[-1];
        self.ctx = """<p class='line'>Good Morning AHA!<br/>
        It is Wednesday, %s. The weather for today is __. There is __%% chance of rain. The high temperature today will be __ degrees Celsius, which is __ degrees Fahrenheit.</p>
        <p class='line'>&#8203;</p>
        <p class='line'><b>Now for this week in history:</b></p>
        <p class='line'>&#8203;</p>
        <p class='line'>&#8203;</p>
        <p class='line'><b>In World News:</b></p>
        <p class='line'>&#8203;</p>
        <p class='line'>&#8203;</p>
        <p class='line'><b>Now for the fun facts:</b></p>
        <p class='line'>&#8203;</p>
        <p class='line'>&#8203;</p>
        <p class='line'><b>In AHA News:</b></p>
        <p class='line'>&#8203;</p>
        <p class='line'>&#8203;</p>
        <p class='line'>We will close with this/these verse(s) from</p>
        <p class='line'>&#8203;</p>
        <p class='line'>This is all for today AHA broadcasting thank you for listening, and as always stay classy AHA!</p>
        """ % (self.NextWednesdayS) # &#8203; (or &#x200b;) stands for a place-holder for a blank <p>
        self.client = quip.QuipClient(access_token="Wk9EQU1BcDZFS04=|1483091850|CF037JVoITJPnAET8aHWnZwEZACvrIm7jtkRIQCaX3g=")

    def do(self)
        self.client.new_document(content=self.ctx, format="html", title=self.NextWednesdayN, member_ids=["PCeAOAQx6sO"])

@@ -1532,16 +1532,115 @@
 ank %3Cp%3E%0A
+        self.FolderID = %22LHEAOAhm7YS%22 # my desktop%0A        #self.FolderID = %22PCeAOAQx6sO%22 # AHA BC%0A
         
@@ -1775,16 +1775,17 @@
 do(self)
+:
 %0A       
@@ -1886,20 +1886,43 @@
 ds=%5B
-%22PCeAOAQx6sO%22%5D)
+self.FolderID%5D)%0A        return %22Done!%22
 %0A

Test mode