Re: #Wikispaces Page #Discussions & #Comments - #wikispaces #export #json #discussions #comments


Tom H
 
Edited

JSON (JavaScript Object Notation) is a lightweight data-interchange format. Here's an example of a Wikispaces Page Discussion exported to a JSON file:

{"page":"Place Names - parse and recombine","page_id":"142723754","share_type":"discussion","created":"2018-02-08T13:43:39-08:00","createdBy":"alerum68","title":"Place Details","description":"What happens to place details with this script?  Are they taken into account, or are they lost in the conversion?","replies":[{"user":"ve3meo","created":"2018-02-11T08:14:12-08:00","body":"These scripts have no effect on Place Details records. Neither do they split out a Place Detail embedded in a Place record."}]}

There are JSON viewers that can reformat or process the text to be more easily read:

{
"page": "Place Names - parse and recombine",
"page_id": "142723754",
"share_type": "discussion",
"created": "2018-02-08T13:43:39-08:00",
"createdBy": "alerum68",
"title": "Place Details",
"description": "What happens to place details with this script?  Are they taken into account, or are they lost in the conversion?",
"replies": [{
"user": "ve3meo",
"created": "2018-02-11T08:14:12-08:00",
"body": "These scripts have no effect on Place Details records. Neither do they split out a Place Detail embedded in a Place record."
}]
}
and others that can present it as a table:

page Place Names - parse and recombine
page_id 142723754
share_type discussion
created 2018-02-08T13:43:39-08:00
createdBy alerum68
title Place Details
description What happens to place details with this script? Are they taken into account, or are they lost in the conversion?
replies
user created body
ve3meo 2018-02-11T08:14:12-08:00 These scripts have no effect on Place Details records. Neither do they split out a Place Detail embedded in a Place record.

The data is structured:
  • page: the title of the Wikispaces Page and corresponds to the name of that Page's exported file.
  • sharetype: "discussion"|"comment", identifies whether JSON file contains a Page Discussion or a Page Comment
  • title: the subject line of the Discussion (the Topic) | the selected text from the Page for which the Comment is meant
  • description: the body of the first message of the Discussion | Comment
The rest of the fields are pretty self-evident.  

Given the above information, it is apparent that it is possible to program a script that could transform the JSON formatted data into other another wiki's system or onto the static wiki pages exported by Wikispaces, thus bringing the Page Discussions and Comments back together. 

Tom
Looking to move SQLite Tools For RootsMagic from Wikispaces

Join main@Wikispaces-Refugees.groups.io to automatically receive all group messages.