Use the style menu to choose whether the line of text you're working on is a Paragraph, Heading, or List. If you are editing on your phone or tablet, the style menu is attached to the top of the on-screen keyboard: To find the style menu, look for this symbol on your desktop: Just start typing, and use the style menu to make changes to your style or layout. Editing documentsĮditing documents with Quip is easy. You can add as many people as you want to the thread. This conversation and document combination is called a thread. Or, you can create a private document, work on it for awhile, and then share it with others once you're done. You can start a conversation with people, create a document, and edit collaboratively - each participant sees the same text and can make edits in real time. Quip combines an easy-to-use document editor with messaging that's similar to text messaging. It's available on iPhones, iPads, and your desktop. client.Quip is a collaborative word processor and collaboration system. Suppose Jane updates her email to be let’s update the spreadsheet to reflect this change. client.update_spreadsheet_headers(thread_id, "Name", "Email")Ĭheck that the headers have been set correctly: spreadsheet = client.get_first_spreadsheet(thread_id) headers = client.get_spreadsheet_header_items(spreadsheet) print(headers) # prints Retrieving a spreadsheet by title title = "My Spreadsheet" jso = client.get_matching_threads(title, only_match_titles=True) # get the id of the first thread thread_id = jso Inserting records into the spreadsheet client.add_to_spreadsheet(thread_id, ["John Doe", client.add_to_spreadsheet(thread_id, ["Jane Doe", Updating records in the spreadsheet Let’s update the headers (A and B by default) to something more descriptive. We will need this as a reference to our created spreadsheet to insert/update records. ![]() Hold onto the thread_id from the server’s response. ![]() with open("template.html", "rt") as f: template = f.read() jso = client.new_document(template, title="My Spreadsheet", type="spreadsheet") This spreadsheet template consists of only two columns. Create a file called template.html as follows. You can also specify an HTML string to use as the template in the second snippet. jso = client.new_document("", title="My Spreadsheet", type="spreadsheet") Passing in an empty string as the first argument to new_document tells Quip to use its default HTML template. ![]() ( Quip API Doc) Creating a spreadsheet in Quip Threads can simply be a list of messages, i.e., a chat thread, or they may have a document in addition to a list of messages. Most of the operations in the Quip Automation API operate on threads. Quip integrates documents and messages into a single unit that we call a thread. To open a Python client: import quip ACCESS_TOKEN = "" # your access token client = quip.QuipClient(access_token=ACCESS_TOKEN)Īn entity essential to Quip API is a thread. Visit the page to generate a personal access token. You will need an access token to interact with Quip’s API. The official API documentation lives on this site. Download quip.py from my repository to continue with this tutorial. To enhance the functionalities of the API, I made a fork of its official GitHub repository and incorporated some useful pull requests not yet merged into the master branch. In this post, I will show you how to automate the process of creating, inserting into, and updating a Quip spreadsheet using its Python API client. Screenshot of a Quip spreadsheet (by Lynn Zheng)
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |