# 有可以从文本文件读取的导入器吗？

**URL:** https://meta.discourse.org/t/is-there-an-importer-than-can-read-from-text-files/135844
**Category:** Support
**Created:** [2019年十二月13日 09:01 UTC](https://meta.discourse.org/t/is-there-an-importer-than-can-read-from-text-files/135844 "2019-12-13T09:01:35Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![paultaylor](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/paultaylor/32/166024_2.png) [@paultaylor](https://meta.discourse.org/u/paultaylor)
#### Post date: [2019年十二月13日 09:01 UTC](https://meta.discourse.org/t/is-there-an-importer-than-can-read-from-text-files/135844/1 "2019-12-13T09:01:36Z")

</div>

是否有可以从文本文件（如 CSV 文件）读取的导入工具？

如果是这样，这似乎是导入其他来源数据的最简单方法，因为我可以毫无问题地从旧论坛提取数据，难点在于如何将数据导入 Discourse。

---

<div class="post-metadata">

### Author: ![paultaylor](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/paultaylor/32/166024_2.png) [@paultaylor](https://meta.discourse.org/u/paultaylor)
#### Post date: [2019年十二月13日 10:12 UTC](https://meta.discourse.org/t/is-there-an-importer-than-can-read-from-text-files/135844/2 "2019-12-13T10:12:33Z")

</div>

实际上，是否可以通过 API 导入所有内容？- [Discourse API Docs](https://docs.discourse.org/#tag/Users/paths/~1users/post)

---

<div class="post-metadata">

### Author: ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)
#### Post date: [2019年十二月13日 12:10 UTC](https://meta.discourse.org/t/is-there-an-importer-than-can-read-from-text-files/135844/3 "2019-12-13T12:10:11Z")

</div>

有几个导入器使用 CSV 格式。不过，通常使用数据库会更好。

你可以使用 API，但速度会慢很多。如果你只有几千条消息，这可能是一个解决方案，但使用导入脚本会更简单。

---

<div class="post-metadata">

### Author: ![system](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/system/32/443519_2.png) [@system](https://meta.discourse.org/u/system)
#### Post date: [2020年一月12日 12:14 UTC](https://meta.discourse.org/t/is-there-an-importer-than-can-read-from-text-files/135844/4 "2020-01-12T12:14:14Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
