krz/orgo

Lightning fast org-mode static site generator.

clone: git clone https://gitbay.org/krz/orgo.git

v0.21.0: tests/snapshots/constructs__timestamps_element_tree.snap · raw

  1---
  2source: tests/constructs.rs
  3expression: "parse_fixture(\"timestamps.org\").root"
  4---
  5{
  6  "heading": null,
  7  "content": [
  8    {
  9      "Keyword": {
 10        "key": "TITLE",
 11        "value": "Timestamps"
 12      }
 13    }
 14  ],
 15  "children": [
 16    {
 17      "heading": {
 18        "level": 1,
 19        "todo": null,
 20        "priority": null,
 21        "title": [
 22          {
 23            "Text": "Single"
 24          }
 25        ],
 26        "tags": [],
 27        "properties": {
 28          "entries": []
 29        },
 30        "id": null,
 31        "custom_id": null
 32      },
 33      "content": [
 34        {
 35          "Paragraph": [
 36            {
 37              "Text": "An active date "
 38            },
 39            {
 40              "Timestamp": {
 41                "active": true,
 42                "start": "2024-01-15T00:00:00",
 43                "end": null,
 44                "has_time": false
 45              }
 46            },
 47            {
 48              "Text": " and an inactive one "
 49            },
 50            {
 51              "Timestamp": {
 52                "active": false,
 53                "start": "2024-01-15T00:00:00",
 54                "end": null,
 55                "has_time": false
 56              }
 57            },
 58            {
 59              "Text": "."
 60            }
 61          ]
 62        },
 63        {
 64          "Paragraph": [
 65            {
 66              "Text": "With a time: "
 67            },
 68            {
 69              "Timestamp": {
 70                "active": true,
 71                "start": "2024-01-15T10:30:00",
 72                "end": null,
 73                "has_time": true
 74              }
 75            },
 76            {
 77              "Text": "."
 78            }
 79          ]
 80        }
 81      ],
 82      "children": []
 83    },
 84    {
 85      "heading": {
 86        "level": 1,
 87        "todo": null,
 88        "priority": null,
 89        "title": [
 90          {
 91            "Text": "Ranges"
 92          }
 93        ],
 94        "tags": [],
 95        "properties": {
 96          "entries": []
 97        },
 98        "id": null,
 99        "custom_id": null
100      },
101      "content": [
102        {
103          "Paragraph": [
104            {
105              "Text": "A same-day time range "
106            },
107            {
108              "Timestamp": {
109                "active": true,
110                "start": "2024-01-15T10:00:00",
111                "end": "2024-01-15T11:45:00",
112                "has_time": true
113              }
114            },
115            {
116              "Text": "."
117            }
118          ]
119        },
120        {
121          "Paragraph": [
122            {
123              "Text": "A multi-day range "
124            },
125            {
126              "Timestamp": {
127                "active": true,
128                "start": "2024-01-15T00:00:00",
129                "end": "2024-01-20T00:00:00",
130                "has_time": false
131              }
132            },
133            {
134              "Text": "."
135            }
136          ]
137        }
138      ],
139      "children": []
140    },
141    {
142      "heading": {
143        "level": 1,
144        "todo": null,
145        "priority": null,
146        "title": [
147          {
148            "Text": "Ignored decorations"
149          }
150        ],
151        "tags": [],
152        "properties": {
153          "entries": []
154        },
155        "id": null,
156        "custom_id": null
157      },
158      "content": [
159        {
160          "Paragraph": [
161            {
162              "Text": "A repeater is dropped: "
163            },
164            {
165              "Timestamp": {
166                "active": true,
167                "start": "2024-01-15T00:00:00",
168                "end": null,
169                "has_time": false
170              }
171            },
172            {
173              "Text": "."
174            }
175          ]
176        }
177      ],
178      "children": []
179    },
180    {
181      "heading": {
182        "level": 1,
183        "todo": null,
184        "priority": null,
185        "title": [
186          {
187            "Text": "Not timestamps"
188          }
189        ],
190        "tags": [],
191        "properties": {
192          "entries": []
193        },
194        "id": null,
195        "custom_id": null
196      },
197      "content": [
198        {
199          "Paragraph": [
200            {
201              "Text": "Comparisons like 3 < 4 and [not a stamp] stay literal text."
202            }
203          ]
204        }
205      ],
206      "children": []
207    }
208  ]
209}