rabestro / gpt4-session-to-markdown

ChatGPT-4 to Jekyll Markdown: Command-line tool with JQ, converting ChatGPT-4 JSON sessions to Jekyll markdown posts. Simplify site updates and content generation.

Home Page:https://rabestro.github.io/gpt4-session-to-markdown/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

GPT-4 Session to Markdown

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.

Requirements

  • jq - A lightweight and flexible command-line JSON processor.

Usage

  1. Clone the repository:
git clone https://github.com/rabestro/gpt4-session-to-markdown.git
cd gpt4-session-to-markdown
  1. Make the script executable:
chmod +x post
  1. 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.

Configuration

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 is AI.
  • TAGS: The tags to be used in the YAML front matter. Default is ai.

Showcases

  • My Tech Blog - My personal tech blog where I publish my GPT-4 chat sessions.

License

This project is licensed under the MIT License. See the LICENSE file for details.

About

ChatGPT-4 to Jekyll Markdown: Command-line tool with JQ, converting ChatGPT-4 JSON sessions to Jekyll markdown posts. Simplify site updates and content generation.

https://rabestro.github.io/gpt4-session-to-markdown/

License:MIT License


Languages

Language:Shell 100.0%