This tool converts Copilot JSON conversation files to well-formatted Markdown.
- Parses JSON files containing Copilot conversations
- Extracts and formats user requests and assistant responses
- Preserves code blocks and formatting
- Handles tool invocations and file edits
python json_to_md.py <input_json_file> [output_md_file] [options]input_json_file: Path to the JSON file to be converted (required)output_md_file: Path for the output Markdown file (optional, default: same name with .md extension)
--detailsor-d: Include detailed results in the output (like full tool responses and file edit details)--compactor-c: Generate a more compact Markdown output (omit request IDs and other verbose elements)
Basic conversion:
python json_to_md.py petsdb-fe.json conversation.mdGenerate a detailed markdown with all available information:
python json_to_md.py petsdb-fe.json conversation.md --detailsGenerate a compact markdown for easier reading:
python json_to_md.py petsdb-fe.json --compactIf you don't specify an output file, it will create one with the same name as the input file but with a .md extension:
python json_to_md.py petsdb-fe.json
# Creates petsdb-fe.mdThe generated Markdown file includes:
- Title with assistant's name
- Timestamp of generation
- Each request/response pair as a section
- Code blocks preserved with proper formatting
- Tool invocation summary information
- Indication of file edits
With the --details option, the output will also include:
- Detailed tool invocation results
- Raw JSON for file edits
- More information about other response items
- Python 3.6 or higher
- No additional packages needed (uses standard library only)