Is it possible to export topic post data to a csv file?
I’d like to take a topic post and all of it’s replies and turn it into a handy wiki (for example).
I could copy and paste the replies and find a good way to group them. However, if it’s easier to do an export of a topic and all replies I’d welcome the time saver.
If not an option via csv, could this be done via the data explorer?
I’d like to see the reply content along with the associated user who replied.
I’m not entirely certain if this is precisely what you had in mind, but I can provide you with a starting point. You provide a topic ID and the post number you want to get all replies from:
-- [params]
-- integer :topic_id
-- integer :post_number
SELECT u.id,
u.username,
p.raw,
p.cooked
FROM topics t
JOIN posts p ON t.id = p.topic_id
JOIN users u ON p.user_id = u.id
WHERE t.id = :topic_id
AND p.reply_to_post_number = :post_number
AND p.hidden_at IS NULL
AND p.deleted_at IS NULL