Skip to content

Playground

Markwhen parser on github

Input
Output
{
  "events": {
    "properties": {},
    "tags": [],
    "title": "",
    "children": [
      {
        "properties": {},
        "tags": [
          "Travel"
        ],
        "title": "Travel",
        "children": [
          {
            "firstLine": {
              "full": "Jan 2019: The Bahamas [Bahamas](location) #Travel",
              "datePart": "Jan 2019",
              "rest": " The Bahamas [Bahamas](location) #Travel",
              "restTrimmed": "The Bahamas "
            },
            "properties": {},
            "textRanges": {
              "whole": {
                "from": 108,
                "to": 158,
                "type": "event"
              },
              "datePart": {
                "type": "dateRange",
                "from": 108,
                "to": 116
              }
            },
            "dateRangeIso": {
              "fromDateTimeIso": "2019-01-01T00:00:00.000Z",
              "toDateTimeIso": "2019-02-01T00:00:00.000Z"
            },
            "tags": [
              "Travel"
            ],
            "supplemental": [],
            "matchedListItems": []
          }
        ],
        "style": "group",
        "textRanges": {
          "whole": {
            "from": 87,
            "to": 93,
            "type": "section"
          }
        },
        "startExpanded": true
      },
      {
        "properties": {},
        "tags": [],
        "title": "Other stuff",
        "children": [
          {
            "firstLine": {
              "full": "August 2020 - now: Getting my degree #Education",
              "datePart": "August 2020 - now",
              "rest": " Getting my degree #Education",
              "restTrimmed": "Getting my degree"
            },
            "properties": {},
            "textRanges": {
              "whole": {
                "from": 188,
                "to": 236,
                "type": "event"
              },
              "datePart": {
                "type": "dateRange",
                "from": 188,
                "to": 205
              }
            },
            "dateRangeIso": {
              "fromDateTimeIso": "2020-08-01T00:00:00.000Z",
              "toDateTimeIso": "2024-09-29T22:07:11.315+00:00"
            },
            "tags": [
              "Education"
            ],
            "supplemental": [],
            "matchedListItems": []
          }
        ],
        "style": "section",
        "textRanges": {
          "whole": {
            "from": 168,
            "to": 176,
            "type": "section"
          }
        },
        "startExpanded": true
      }
    ]
  },
  "ids": {},
  "ranges": [
    {
      "type": "tag",
      "from": 55,
      "to": 62,
      "content": {
        "tag": "Travel"
      }
    },
    {
      "type": "tag",
      "from": 69,
      "to": 79,
      "content": {
        "tag": "Education"
      }
    },
    {
      "type": "headerKey",
      "from": 0,
      "to": 5
    },
    {
      "type": "headerKeyColon",
      "from": 5,
      "to": 6
    },
    {
      "type": "headerValue",
      "from": 7,
      "to": 26
    },
    {
      "type": "headerKey",
      "from": 27,
      "to": 38
    },
    {
      "type": "headerKeyColon",
      "from": 38,
      "to": 39
    },
    {
      "type": "headerValue",
      "from": 40,
      "to": 53
    },
    {
      "type": "headerValue",
      "from": 54,
      "to": 54
    },
    {
      "type": "headerKey",
      "from": 55,
      "to": 62
    },
    {
      "type": "headerKeyColon",
      "from": 62,
      "to": 63
    },
    {
      "type": "headerValue",
      "from": 64,
      "to": 68
    },
    {
      "type": "headerKey",
      "from": 69,
      "to": 79
    },
    {
      "type": "headerKeyColon",
      "from": 79,
      "to": 80
    },
    {
      "type": "headerValue",
      "from": 81,
      "to": 85
    },
    {
      "type": "headerValue",
      "from": 86,
      "to": 86
    },
    {
      "type": "tag",
      "from": 100,
      "to": 107,
      "content": {
        "tag": "Travel"
      }
    },
    {
      "from": 87,
      "to": 93,
      "type": "section"
    },
    {
      "type": "tag",
      "from": 150,
      "to": 157,
      "content": {
        "tag": "Travel"
      }
    },
    {
      "type": "dateRange",
      "from": 108,
      "to": 116
    },
    {
      "type": "dateRangeColon",
      "from": 116,
      "to": 117
    },
    {
      "from": 158,
      "to": 166,
      "type": "section"
    },
    {
      "from": 168,
      "to": 176,
      "type": "section"
    },
    {
      "type": "tag",
      "from": 225,
      "to": 235,
      "content": {
        "tag": "Education"
      }
    },
    {
      "type": "dateRange",
      "from": 188,
      "to": 205
    },
    {
      "type": "dateRangeColon",
      "from": 205,
      "to": 206
    },
    {
      "from": 236,
      "to": 246,
      "type": "section"
    }
  ],
  "foldables": {
    "0": {
      "startLine": 0,
      "startIndex": 0,
      "endIndex": 85,
      "type": "header",
      "foldStartIndex": 0
    },
    "87": {
      "type": "section",
      "startLine": 6,
      "startIndex": 87,
      "endIndex": 166,
      "foldStartIndex": 107
    },
    "168": {
      "type": "section",
      "startLine": 10,
      "startIndex": 168,
      "endIndex": 246,
      "foldStartIndex": 187
    }
  },
  "header": {
    "title": "My timeline example",
    "description": "Hello, world!",
    ")Travel": "blue",
    ")Education": ")ab5",
    "dateFormat": "M/d/y"
  },
  "metadata": {
    "earliestTime": "2019-01-01T00:00:00.000Z",
    "latestTime": "2024-09-29T22:07:11.315+00:00",
    "maxDurationDays": 1520.921658738426,
    "startLineIndex": 0,
    "startStringIndex": 0,
    "endLineIndex": 14,
    "endStringIndex": 248
  },
  "parser": {
    "version": "0.12.0-beta.4"
  }
}

You can also play with the parser and the output of the playground in the javascript console, with window.parse and window.markwhen, respectively.