Is there's anything can convert NodeBB to other forum software?
-
I should say NodeBB is a very beautiful and wonderful forum software.
However , I meet some personal requirements so I should use some other software instead of NodeBB.
So, I should found a exporter or converter or something else, to help me to migrate it.
Is there anything can help me ? I just need all of the thread data , export to some json file is ok.
-
Usually you would need to ask the software you're moving to to make a converter. I don't think any forum software will spend time creating a tool to help you to leave their software. It's a waste of time and manpower (resources).
This may seem unethical (enticing people in, then not assisting them in leaving), but it's pretty much how everything in this world works. If you wanted to go from vBulletin to Xenforo, you would go to Xenforo for an import plugin. Not vBulletin for an exporter to Xenforo.
The problem is, other forum software doesn't see it as viable to spend time building an importer from NodeBB, because it's not particularly mainstream yet. SMF have said they won't be building one for some time. (But only 1 or 2 have asked for it. And even that was in the 0.3.x days)
I may be wrong on this, it may be easier to export from redis/mongo than I anticipate. So maybe someone will drop by with a solution.
-
Exporting data from NodeBB is pretty simple, if your data set is small you can just read the posts/topics and write them to a text file.
function export(set, prefix) { db.getSortedSetRange(set, 0, -1, function(err, ids) { var keys = ids.map(function(id){ return prefix + id; }); db.getObjects(keys, function(err, data) { fs.writeFile('/path/to/' + set + ' .txt', JSON.stringify(data)); }); }); } export('posts:pid', 'post:'); export('topics:tid', 'topic:');
The above code would export all posts and topics in JSON format, you would still need to write an importer for your target platform.
-
I guess the real question is, what could NodeBB do better to convince you to stay
-
@a_5mith I think you are right, but I can write the importer by myself and I just want some way to export it. But thanks anyway.
@psychobunny I'm not very good at Node.js, and I have to plug NodeBB into a sso platform.
However, when I done this, I get something strange: members on my site find that sometimes there are someone else.
I have used up all of my knowledge to deal with that, but it still strange, and unpredictable.
So I want to switch to some other software write by, you know, some other languages like PHP.NodeBB is very beautiful and can meet all of my need.
However, I can't deal with that, so I have to give up it.By the way, is there are any possible reasons ? I wonder that if there are something I haven't cover.
@baris Thanks a lot for your help. I think it exactly what I want.
I'm so sorry for I can't use such a wonderful BB software, and sorry for my poor English.
Thanks all of you again. -
@oott123 said:
So I want to switch to some other software write by, you know, some other languages like PHP.
I'm sure we can troubleshoot the issue you are having, if you still wish to give NodeBB a chance, create a topic in the development category and tag the developers. I'm sure they'll be more than happy to help.
However if you decide to part ways and go with P...P..PHP, then best of luck. Hope you'll be back soon.
-
@baris said:
Exporting data from NodeBB is pretty simple, if your data set is small you can just read the posts/topics and write them to a text file.
function export(set, prefix) { db.getSortedSetRange(set, 0, -1, function(err, ids) { var keys = ids.map(function(id){ return prefix + id; }); db.getObjects(keys, function(err, data) { fs.writeFile('/path/to/' + set + ' .txt', JSON.stringify(data)); }); }); } export('posts:pid', 'post:'); export('topics:tid', 'topic:');
The above code would export all posts and topics in JSON format, you would still need to write an importer for your target platform.
This is a great level of support! I appreciate it and for potential future adapters of nodeBB, it's definitely good to know that you can try without being locked in.
-
Here's a full script for export, put in same folder as
config.json
:var fs = require('fs'); var nconf = require('nconf'); nconf.argv().env().file({ file: './config.json' }); var db = require('./src/database'); function do_export(set, prefix) { db.getSortedSetRange(set, 0, -1, function(err, ids) { var keys = ids.map(function(id){ return prefix + id; }); db.getObjects(keys, function(err, data) { fs.writeFile('db.export.' + set + '.json', JSON.stringify(data), function() { console.log('Wrote '+set); }); }); }); } db.init(function() { do_export('posts:pid', 'post:'); do_export('topics:tid', 'topic:'); });
-
It must be better to fix the requested requirement instead of migrating out of NodeBB. I this projekt and my goal is to learn more about its architecture. One problem, time ... But I will get there