Giter VIP home page Giter VIP logo

Comments (3)

Arondight avatar Arondight commented on July 30, 2024

现在弄清原因了,因为更改thread-key 时,没有预料到多说本身自带更改thread-key 功能,而是导出全部数据,然后手动修改thread-key 导入。本身这个行为也是没有问题的,但是导出后我随即删除了后台所有的评论和文章。删除评论不会导致问题,而删除文章会引发一个非常麻烦的问题:多说中每个文章都由一个id 来标识,再次添加文章后,id 已经变更,所以导入修改后的评论数据,仍然无法与文章对应。导致全部评论丢失。

解决方法只有一个,对应地修改json 中的文章id,但是太过繁琐,考虑再三决定放弃所有评论。

一个教训——先弄清楚产品的功能再使用。

from arondight.github.io.

Arondight avatar Arondight commented on July 30, 2024

顺便记录一下多说更改thread-key 的正确流程:

  1. 更改站点文章的thread-key
  2. 多说后台中选择文章选项卡,点击编辑,填入新的thread-key

from arondight.github.io.

Arondight avatar Arondight commented on July 30, 2024

已经找回所有评论:

  1. 删除整个多说站点,新建多说站点后与网站关联
  2. 每个文章下面评论一下,然后导出数据
  3. 根据新的json,分别替换旧json 的thread_idthread_key 字段
  4. 删除所有的site_id 字段,删除"threads" 部分

非常感谢jq,这个软件完成了很棒的两个工作:

  1. 将json 转换为格式统一且易于阅读的排版
  2. 将unicode 编码转换为字符

否则完成这个工作是难以想象的。从冒出来这个点子到实施完毕,大约花了半小时。顺道感谢atom,有时候提供一个不支持正则表达式的替换功能是至关重要的。

from arondight.github.io.

Related Issues (12)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.