This script converts GPT-4 chat session JSON data to markdown format and adds YAML front matter to the top of the file to prepare it for publishing on a Jekyll site.
- jq - A lightweight and flexible command-line JSON processor.
- Clone the repository:
git clone https://github.com/rabestro/gpt4-session-to-markdown.git
cd gpt4-session-to-markdown- Make the script executable:
chmod +x post- Run the script with the JSON file as an argument:
./post <file.json>Replace <file.json> with the path to your GPT-4 chat session JSON file.
You can customize the script by modifying the following variables at the beginning of the post script:
POSTS_DIR: The directory where the generated markdown files will be saved. Default is../_posts.TIMEZONE: The timezone to be used in the YAML front matter. Default is+0300.CATEGORIES: The categories to be used in the YAML front matter. Default isAI.TAGS: The tags to be used in the YAML front matter. Default isai.
- My Tech Blog - My personal tech blog where I publish my GPT-4 chat sessions.
This project is licensed under the MIT License. See the LICENSE file for details.