Working with MPTS format
Introduction
To allow MetaPoll authors greater flexibility with how they create MetaPolls, weβve created a format for the option tree of a MetaPoll that can be easily copy and pasted into and out of text editors. Itβs called "MPTS" which stands for βMetaPoll TreeSpecβ, itβs a minimalistic format used to create or modify a portable MetaPoll option tree within any basic text editor.
The format works like a bridge between flexible text editing and the structured data MetaPoll needs. You write your option tree using MPTS syntax in your preferred editor, and when ready, paste the MPTS formatted text into the app for a quick import.
Why use MPTS?
Creating polls in the MetaPoll app interface isn't always ideal. In some cases it makes more sense to draft them in collaborative documents where you can:
Receive feedback and comments from others
Get assistance from AI tools
Enable portability between environments (local to production)
Share and fork MetaPolls within communities
TLDR, using MPTS allows collaboration, use of AI tools, and saves you time. If you're going to author medium to large size MetaPolls then using MPTS is highly recommended. Best part is that MPTS is extremely simple to learn.
MPTS definition and structure
The MPTS format begins with the title of the MetaPoll:
MetaPoll title is a string written after βtitleβ inside a set of [ ]
brackets.
Example: title [name of metapoll]
Options appear after the title between to [ ]
brackets with an implied hierarchical nested structure:
Each option exists on itβs own line
The option name comes after the
=
symbol followed by one space, example:= option_name
Root options are preceded by a single
=
symbolEach nested layer adds an additional
=
symbolThe line order of each option indicates parent/child relationships. Example: the first β
= Option A
β with a single=
symbol above β== Option A1
β implies that Option A1 is a child of Option A.
Option tree example:
True statements about the option tree code example just above ^^
Option A1 and A2 are both children of Option A.
Options A B C are siblings which are Layer 1 options (also known as root layer).
Option A1A, A1B, and A1C are Layer 3 options that are children of option A1 which is a Layer 2 option.
Option C1, C2, C3 are Layer 2 options and children of Option C which is a Layer 1 option.
Using MPTS:
Now that we know the structure, let's make it more concrete with an example of what a short MPTS MetaPoll might actually look like:
As you can see, there are two "root level" options: = Dog
and = Cat
. Next, nested inside Dog in the 2nd "Layer" are two more options: == Golden Retriever
and == Beagle
, and within
== Golden Retriever
in the 3rd "Layer" are two more options:
=== Long hair
and === Short hair
variants.
MPTS allows you to author MetaPolls in any basic or advanced text editor, and copy and paste them directly into the MetaPoll app in seconds.
Looking forward, we will continue to develop MPTS with feedback from the community. One thing we'd like to do in the future is to create "Templates" that Authors can distribute to the community, potentially with financial rewards.
Using MPTS with AI:
AI can be a powerful tool to author new MetaPolls with. For your convenience, we've put together a generic prompt that you can copy/paste into an LLM to help you output valid MPTS formatted text.
Last updated