Importing to Tender - General
This articles explains how to generate an import archive for Tender.
Format of the archive
Tender is in many ways similar to a forum and is composed of discussions (which belongs to categories) and users. As a result, the import format reflects this simple structure. What we need is an archive (zip, tar.gz, tar.bz2) which contains the following directories:
categories/
1.json # This file describes category 1
2.json # This file describes category 2
1/ # Subdirectory for the discussions
1.json # This file describes discussion 1 in category 1
2.json # This file describes discussion 2 in category 1
...
2/ # Subdirectory for the discussions
3.json # This file describes discussion 3 in category 2
4.json # This file describes discussion 4 in category 2
...
users/
1.json # This file describes user 1
2.json # This file describes user 2
...
If you don't have "categories", you can use a dummy one and put all your discussions in this single category.
Format of the JSON files
Each file should be a valid JSON file. There are libraries for many languages, and you can validate your JSON data here.
Users
Each user needs to be in his own separate file. The required data is:
{
"name": "Lane Upton MD",
"email": "towski@entp.com",
"title": "Programmer",
"created_at": "2007-01-01T00:01:00Z",
"state": "user", # user or support
"password": "secret"
}
Categories
Each category needs its own JSON file and its own subdirectory for its discussions.
categories/1.json
:
{
"name": "Questions and Discussions",
"summary": ""
}
Discussions
Each discussion needs its own JSON file and should be placed in the sub-directory of the category it belongs to.
categories/1/12.json
{
"title": "engineer rich networks",
"author_email": "towski@entp.com",
"created_at": "2008-01-01T00:01:00Z",
"comments": [
{
"body": "Beatae suscipit sit",
"author_email": "towski@entp.com",
"created_at": "2008-01-01T00:01:00Z"
},
{
"body": "Beatae suscipit sit",
"author_email": "towski@entp.com",
"created_at": "2008-01-01T00:01:00Z"
},
...
]
}
The first comment's body is actually the discussion's body (ie the initial question).
Importing
Once you have this data stored in the correct format:
- Bundle the users and categories directories into an archive,
- open a discussion requesting an import and
- attach the compressed archive.
Scripts for existing services
List of known tools:
- vanilla2tender: web application that migrates Vanilla forum data to Tender import-compatible json files
There is also a git repository of Tender import scripts that is currently very limited. Contributed scripts for producing Tender import archives from various services will appear in this repository as they are developed and/or contributed.
The methods used to produce an import archive will vary with the service and the facilities they provide, such as data dumps or API access. These scripts are being made available in the hopes that they'll be useful, but it's up to you to review them before running them on your own computer or against an existing service. If you make useful or necessary modifications to a script, or produce a script for importing from a new service, please open a discussion to let us know.