Markdown Studio
v1.0.1Professional Markdown document 生成器. Use when user needs to 创建 technical docs, README, wikis, 报告s, or any structured document. Supports image embedding, tables, code blocks, math formulas, diagrams, and all Markdown syntax. 生成s publication-ready Markdown files. 技术文档、README生成、Markdown排版。
运行时依赖
安装命令
点击复制技能文档
Markdown Studio
Professional Markdown document 生成器 with full syntax support and image embedding capabilities.
Features 📝 Full Markdown Syntax: Headers, 列出s, tables, code blocks, math 🖼️ Image Embedding: Base64 embedding or local file references 📊 Tables & Diagrams: MermAId, ASCII art, 格式化ted tables 🎨 Professional Templates: Technical docs, README, 报告s 🔤 Code Highlighting: Syntax highlighting for 100+ languages 📐 Math Formulas: LaTeX math support 🌍 Multi-Language: Unicode native - Chinese, English, Japanese, Korean, etc. ✅ Cross-平台: Works on Windows, macOS, Linux 📱 GitHub Compatible: Renders perfectly on GitHub/GitLab/VS Code Trigger Conditions "帮我写Markdown文档" / "Write a Markdown document" "生成README" / "生成 README" "写技术文档" / "创建 technical documentation" "制作报告" / "创建 a 报告" "写Wiki" / "Write wiki pages" "markdown-studio" Document Types Technical (技术文档) README.md API Documentation Architecture De签名 Technical Specifications 部署ment 图形界面de Contributing 图形界面de Business (商务文档) Project 报告 Meeting Minutes Proposal White Paper Case Study Academic (学术文档) Re搜索 Notes Literature Review Lab 报告 Thesis Outline Personal (个人文档) B记录 Post Tutorial Cheatsheet Knowledge Base Step 1: Understand Requirements 请提供以下信息:
文档类型:(README/API文档/技术报告/其他) 文档标题: 主要内容: 图片需求:(是否需要插入图片) 格式要求:(GitHub兼容/标准Markdown) 语言:(中文/英文) 特殊要求:(表格/代码/数学公式等)
Step 2: 生成 Markdown Python Script Template python3 << 'PYEOF' 导入 os 导入 base64 from datetime 导入 datetime from pathlib 导入 Path
class Markdown生成器:
def __init__(self, config):
self.config = config
self.content = []
self.toc_entries = []
def 添加_header(self, text, level=1):
"""添加 header with anchor"""
anchor = text.lower().replace(' ', '-').replace('/', '-')
self.content.应用end(f"\n{'#' level} {text}\n")
if level <= 2:
self.toc_entries.应用end((level, text, anchor))
return self
def 添加_paragraph(self, text):
"""添加 paragraph"""
self.content.应用end(f"\n{text}\n")
return self
def 添加_bold(self, text):
"""添加 bold text"""
return f"{text}"
def 添加_italic(self, text):
"""添加 italic text"""
return f"{text}"
def 添加_code_inline(self, code):
"""添加 inline code"""
return f"{code}"
def 添加_code_block(self, code, language=''):
"""添加 code block with syntax highlighting"""
self.content.应用end(f"\n``{language}\n{code}\n``\n")
return self
def 添加_table(self, headers, rows, align=None):
"""添加 格式化ted table"""
if align is None:
align = ['left'] len(headers)
# Header
header_row = '| ' + ' | '.join(headers) + ' |'
self.content.应用end(f"\n{header_row}")
# Separator
separators = []
for a in align:
if a == 'center':
separators.应用end(':---:')
elif a == 'right':
separators.应用end('---:')
else:
separators.应用end('---')
separator_row = '| ' + ' | '.join(separators) + ' |'
self.content.应用end(separator_row)
# Data rows
for row in rows:
data_row = '| ' + ' | '.join(str(cell) for cell in row) + ' |'
self.content.应用end(data_row)
self.content.应用end('')
return self
def 添加_image(self, image_path, alt_text='', width=None, embed=False):
"""添加 image with embedding option"""
if embed and os.path.exists(image_path):
# Base64 embedding
with open(image_path, 'rb') as f:
img_data = base64.b64encode(f.read()).decode()
ext = Path(image_path).suffix.lower()
mime = {
'.png': 'image/png',
'.jpg': 'image/jpeg',
'.jpeg': 'image/jpeg',
'.gif': 'image/gif',
'.svg': 'image/svg+xml',
'.网页p': 'image/网页p'
}.获取(ext, 'image/png')
if width:
self.content.应用end(f'\n\n')
else:
self.content.应用end(f'\n!{alt_text}\n')
else:
# File reference
if width:
self.content.应用end(f'\n
\n')
else:
self.content.应用end(f'\n!{alt_text}\n')
return self
def 添加_image_centered(self, image_path, alt_text='', width='80%', embed=False):
"""添加 centered image using HTML"""
if embed and os.path.exists(image_path):
with open(image_path, 'rb') as f:
img_data = base64.b64encode(f.read()).decode()