In the previous article, we introduced how to add blog content to the knowledge base so that the ChatGPT bot can reply based on the article content. However, the method of manually copying the article content is inefficient and very inconvenient to use.
To solve this problem, I developed a project called xlog-Archivist.
xlog-Archivist is a tool for automatically crawling article content and URLs from xlog-based blogs. With xlog-Archivist, we don't need to manually copy the article content. It can automatically retrieve the article content and export it in JSON format, making it easy for us to migrate blog content to the ChatGPT knowledge base. This greatly simplifies the process of knowledge acquisition, allowing the ChatGPT bot to learn and accumulate knowledge more quickly based on fresh content.
Usage#
- Clone the project to your local machine or download the zip file
git clone https://github.com/endercatone/xlog-Archivist.git
- Install dependencies
pip install requests
- Run the program
python main.py
Now you should be able to find the articles and url.txt
in the articles
directory.
After the first run, your blog URL will be saved in the configuration file, so you don't need to enter the URL next time.