joshuabenuck / seran-wiki

Experiment to create a Deno based implementation of Federated Wiki
MIT License
11 stars 7 forks source link

No need for individual actions on machine generated pages #38

Closed WardCunningham closed 4 years ago

WardCunningham commented 4 years ago

Our convention is to add one create action to the journal indicating that the complete story was created all at once. It is actually rather tricky to do otherwise because by default, the add action that does not specify what it follows is assumed to go at the beginning. Without this a sequence of adds will create a page inverted from what is expected.

image

For a useful example consider this generated page in Mehaffy's pattern language: http://npl.wiki/urban-patterns.html

With this journal and this page json.

image

{
  "title": "Urban Patterns",
  "story": [
    {
      "type": "paragraph",
      "text": "Establish essential urban characteristics…",
      "id": "38067236463058"
    },
    {
      "type": "html",
      "text": "<table cellpadding=6>\n<tr>\n<td><center><img width=\"200px\" height=\"255px\" src=\"http:/assets/image/2.1._cengiz-sari-606322-unsplash.jpg\"><br>\n[[Walkable Multi-Mobility]]</center>\n<td><center><img width=\"200px\" height=\"255px\" src=\"http:/assets/image/2.2._image026.jpg\"><br>\n[[Level City]]</center>\n<tr>\n<td><center><img width=\"200px\" height=\"255px\" src=\"http:/assets/image/2.3._image030.jpg\"><br>\n[[Public Space System]]</center>\n<td><center><img width=\"200px\" height=\"255px\" src=\"http:/assets/image/2.4.jpg\"><br>\n[[Biophilic Urbanism]]</center>",
      "id": "79590110102639"
    },
    {
      "type": "graphviz",
      "text": "DOT FROM pattern-cluster-diagram",
      "id": "77420626942650"
    },
    {
      "type": "paragraph",
      "text": "See more [[Patterns Of Scale]]",
      "id": "13094805954837"
    }
  ],
  "journal": [
    {
      "type": "create",
      "item": {
        "title": "Urban Patterns",
        "story": [
          {
            "type": "paragraph",
            "text": "Establish essential urban characteristics…",
            "id": "38067236463058"
          },
          {
            "type": "html",
            "text": "<table cellpadding=6>\n<tr>\n<td><center><img width=\"200px\" height=\"255px\" src=\"http:/assets/image/2.1._cengiz-sari-606322-unsplash.jpg\"><br>\n[[Walkable Multi-Mobility]]</center>\n<td><center><img width=\"200px\" height=\"255px\" src=\"http:/assets/image/2.2._image026.jpg\"><br>\n[[Level City]]</center>\n<tr>\n<td><center><img width=\"200px\" height=\"255px\" src=\"http:/assets/image/2.3._image030.jpg\"><br>\n[[Public Space System]]</center>\n<td><center><img width=\"200px\" height=\"255px\" src=\"http:/assets/image/2.4.jpg\"><br>\n[[Biophilic Urbanism]]</center>",
            "id": "79590110102639"
          },
          {
            "type": "graphviz",
            "text": "DOT FROM pattern-cluster-diagram",
            "id": "77420626942650"
          },
          {
            "type": "paragraph",
            "text": "See more [[Patterns Of Scale]]",
            "id": "13094805954837"
          }
        ]
      },
      "date": 1580068006000
    }
  ]
}
WardCunningham commented 4 years ago

More inadvertent reversals.

https://twitter.com/WardCunningham/status/1258074587931136001

image