First time here? Check out the FAQ!
1

How to export data from Askbot?

Hello,

I am wondering if anyone has experience merging, moving or exporting forums from askbot to something else?

Stack exchange seems to be an option, according to some.

What are some other forum options?

How does one proceed to move all this data?

Br /H

henriksahlin's avatar
21
henriksahlin
asked 2021-12-08 08:11:24 -0500
Evgeny's avatar
13.2k
Evgeny
updated 2023-05-21 20:01:32 -0500
edit flag offensive 0 remove flag close merge delete

Comments

add a comment see more comments

1 Answer

1

You will need to iterate over users, questions, answers and comments.

User records can be accessed from Python code as follows:

from askbot.models import User
users = User.objects.all() # you will need at least the fields: username, email

Questions, comments and answers are accessible via the Post model:

from askbot.models import Post
questions = Post.objects.filter(post_type='question')
answers = Post.objects.filter(post_type='answer')
comments = Post.objects.filter(post_type='comment')

Question id which is part of the url is id of question object (i.e. question.id).

Post text is some_post.text - a markdown source, some_post.html - rendered html of the post.

Question title is question.thread.title

Tags are question.thread.tagnames

Post votes are some_post.vote_up_count and some_post.vote_down_count

This is probably the minimum you need. That is you'll need to create a script iterating over the objects that I've mentioned above and store the result in some file.

Obviously, how to import that data wherever you want to move it depends on the software package you intend to use in the future.

Evgeny's avatar
13.2k
Evgeny
answered 2023-05-21 19:56:15 -0500
edit flag offensive 0 remove flag delete link

Comments

add a comment see more comments