Socialengine importer

Has anyone hacked together an import script from Socialengine to Discourse? I’d hate to reinvent the wheel here.

1 个赞

It doesn’t look like it. Can you get a database dump from them? If so, you can use one of the existing importers as a model. (See discourse/script/import_scripts at main · discourse/discourse · GitHub)

2 个赞

Yea, I didnt find anything either. Should be easy enough to import users and forums. I think forums/topics/posts become categories and their posts, and the users should just come across. I pull nightly backups from my site. I can load it into pgadmin and export out a CSV of the tables.

1 个赞

Most importers pull from an sql database. Most use mysql, but there may be a couple that use postgres. You definitely want to avoid csv.

1 个赞

复活这个帖子,但我终于设法让它工作并将我的 SocialEngine 论坛导入到 Discourse。

花了很多精力进行黑客攻击和编写丑陋的代码,但它奏效了。大约有 4800 名用户和 390k 左右的帖子。我分块导入了帖子,因为源数据库最终会超时。导入帖子后进行了大量的处理,但总体而言,会员们似乎很高兴。

可能会在一定程度上清理代码,并将其发布为一个“你可以从这里开始,几乎可以肯定不会完全正常工作”的起点。

3 个赞

正如所威胁的,我已经清理了代码(删除了我所有的 FIXME、HACK 等标签以及 pp 调试输出),整理了一个简单的 README,并将其发布到了 Gitlab 上。

代码很丑陋,很粗糙,但它对我来说是有效的。我不敢声称它对其他人也有效。您已被警告。

2 个赞