Topics

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

Tom H
 

For all the Export/Backup options except PDF, Wikispaces exports a folder "mainSpace>discussion". It contains the Comments and Discussions on each Page. Each file is the complete thread for a Page's Discussion topic or for the selected text thereon in JSON format. For my 277 Page site, 194 files were exported for 94 of its Pages; some Pages have multiple JSON files because there were multiple Discussion topics and/or multiple Comments on the Page.

The Export thus separates the exported Page from its Discussions and Comments. This may be unimportant for some sites but for others the loss of the relationship is critical. The JSON files do list the Name or Title of the Page to which they refer. Comments type JSON's also refer to the highlighted text on the Page to which they refer. Therefore it is technically possible for Discussions and Comments to be reunited with their Pages in the target site. This may be as basic as incorporating them into the exported Page's static HTML file; ideally, they would be converted into the corresponding Discussions and Comments systems in the target site.

The EditMe service demonstrates the conversion of Wikispaces Discussions into EditMe Comments but, as yet, no conversion of Wikispaces Comments. I do not know if EditMe has the ability to comment on specific text within the Page.  

Discussion of Discussions and Comments has been ongoing under a more general topic. I'd like to consolidate and continue it under this more specific one.

Tom
Looking to move SQLite Tools For RootsMagic from Wikispaces

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