Importing to Tender
Our basic import format is gzip-compressed tar archive with two subdirectories: categories and users. These can be in the top-level or in a subdirectory, as long as they're in the same directory.
Categories
The file categories/1.json has json data for the category, like:
{"name": "Questions and Discussions", "summary":
""}
The file categories/1/12.json has json data for a single discussion. It also includes an array of comments.
{
"title": "engineer rich networks",
"author_email": "towski@entp.com",
"created_at": "2008-01-01T00:01:00Z",
"updated_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).
Users
The file users/1.json has json data for a user
Each user should be in a separate file in the users subdirectory (f.e., users/1.json) and can be named anything. Their data looks like:
{
"name": "Lane Upton MD",
"email": "towski@entp.com",
"title": "Programmer",
"created_at": "2007-01-01T00:01:00Z",
"state":"user",
"password":"secret"
}
All data has an optional 'updated_at' field
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
There is 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.