DeepSeek JSON to Markdown Converter
Tool for converting DeepSeek chat export JSON files (conversations.json) into high-fidelity Markdown files suitable for archival or Obsidian knowledge bases.
Features
- Thinking Process Preservation: Extracts and formats the Model's "Chain of Thought" as blockquoted text (
> [!Thinking] ...). - Template Standardization: Outputs consistent Markdown with Frontmatter, standardized headers (
User/Deepseek), and document structure (背景 / 动机,对话正文,关键结论 / 摘要). - Branch Handling: Automatically detects and exports the final regenerated response in a branching conversation trace.
- Metadata: Includes
createdandmodifiedtimestamps in the Frontmatter using the original conversation data.
Getting Started
Prerequisites
- Python 3.9+
Setup
Prepare three required files/paths:
- DeepSeek export file:
conversations.json - Output directory for markdown files
- Markdown template file with placeholders
Template placeholders supported:
{title}{conversion_created_time}{conversion_export_time}{content}
Run Conversion
Execute the main script from the repository root with required arguments:
python3 src/main.py \
--input ./data/conversations.json \
--output-dir ./deepseek_exported_md \
--template ./output_template.md
You can also run the installed CLI command after package installation:
deepseek-md-export \
--input ./data/conversations.json \
--output-dir ./deepseek_exported_md \
--template ./output_template.md
Optional flag:
-f,--force: overwrite existing markdown files and continue export.- Without
--force, when exporter detects an existing target file, it will stop the whole remaining export immediately.
Output
Converted files will be generated in the directory specified by --output-dir.
Filenames follow the pattern: YYYYMMDD-Title.md.
Packaging & Publish (Poetry)
Build wheel and source distribution:
poetry build
Publish to PyPI (token should be configured first):
poetry config pypi-token.pypi <your-pypi-token>
poetry publish --build
Optional test publish to TestPyPI:
poetry config repositories.testpypi https://test.pypi.org/legacy/
poetry config pypi-token.testpypi <your-testpypi-token>
poetry publish --build -r testpypi
Install from local dist for quick verification:
pip install dist/*.whl
deepseek-md-export --help
Contributing
Any contributions made are greatly appreciated.
If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement". Don't forget to give the project a star! Thanks again!
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature) - Commit your Changes (
git commit -m 'feat(module):add some AmazingFeature') - Push to the Branch (
git push origin feature/AmazingFeature) - Open a Pull Request
Top contributors:
License
All code is licensed under the AGPL-3.0 license. See LICENSE for more information.
Metadata
Release files for deepseek-json-to-markdown-converter 0.2.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| deepseek_json_to_markdown_converter-0.2.1.tar.gz | 18.5 kB | Without provenance | Details for deepseek_json_to_markdown_converter-0.2.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| deepseek_json_to_markdown_converter-0.2.1-py3-none-any.whl | Python 3 | none | any | Details for deepseek_json_to_markdown_converter-0.2.1-py3-none-any.whl |
Total release size: 39.3 kB
Release files / deepseek_json_to_markdown_converter-0.2.1.tar.gz
| Download URL | deepseek_json_to_markdown_converter-0.2.1.tar.gz |
|---|---|
| Size | 18.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
a39f2a2447cfb74268ec3dfb085631a4e2728396fda335d2f8e0d451f97d2b68
|
|
BLAKE2b-256 checksum How to use checksums |
6a0ab143a8f37e1376d2e387159cd636a941b8cc373d2ee16936001a92c8a110
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/2.1.0 CPython/3.13.1 Darwin/25.3.0
|
Release files / deepseek_json_to_markdown_converter-0.2.1-py3-none-any.whl
| Download URL | deepseek_json_to_markdown_converter-0.2.1-py3-none-any.whl |
|---|---|
| Size | 20.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
87c3b38f0bd197b3583c045aba01ac22cc0aa1ec0e5e5282b87504d703193476
|
|
BLAKE2b-256 checksum How to use checksums |
7c48155c9b0039cf946e706e2c935379c6dd1d4ea76489399f0e31cc717ec4d1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/2.1.0 CPython/3.13.1 Darwin/25.3.0
|
Security for deepseek-json-to-markdown-converter 0.2.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.