-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
Pandoc wrappers and interfaces
Several wrappers and interfaces exist to use pandoc in other programming languages or via a graphical user interface (GUI). A wrapper can be used to run the pandoc executable while an interface gives access to the abstract syntax tree (AST) of Pandoc documents, for instance to create pandoc filters. A writer is an interface that can only be used to create pandoc documents but not to modify them.
Language | Type | Name and link | Maintainer |
---|---|---|---|
C | wrapper | libpandoc | Shahbaz Youssefi |
Crystal | wrapper | pandocr | Huub de Beer |
Electron | GUI | PandocElectron (Github) | Engelbert Niehaus |
Elixir | interface | Panpipe | Marcel Otto |
Groovy | interface | groovy-pandoc | Dennis Frommknecht |
Java | wrapper | Universal Document Converter | Leonardo S. De Seta |
JavaScript | wrapper | grunt-node-pandoc | Eric R. Shinn |
JavaScript | interface | pandoc-filter | Mike Henderson |
JavaScript | wrapper | node-pdc | Paul Vorbach |
JavaScript | wrapper | node-pandoc | Eric R. Shinn |
JavaScript | wrapper | simple-pandoc | Hyunje Jun |
JavaScript | wrapper | paja | Huub de Beer |
.NET | interface | PandocFilters (NuGet, GitHub) | Zev Spitz |
Pascal | wrapper | PasPandoc | Huub de Beer |
Perl | interface | Pandoc::Elements | Jakob Voß |
Perl | wrapper | Pandoc | Jakob Voß |
PHP | interface | pandocfilters-php | Vinai Kopp |
Python | GUI | PanConvert (GitHub, SourceForge) | Andreas Paeffgen |
Python | interface | panflute | Sergio Correia |
Python | interface | pandocfilters | John MacFarlane |
Python | wrapper | pypandoc | Juho Vepsäläinen |
Python | wrapper | Pyandoc | Kenneth Reitz |
R | writer | pander | Gergely Daróczi |
R | wrapper | rmarkdown (see here for the Pandoc wrapper functions in particular) | Yihui Xie |
Ruby | interface | Paru | Huub de Beer |
Ruby | wrapper | pandoc-ruby | William Melody |
Ruby | wrapper | Pandoku | Hong Minhee |
Scala | wrapper | scala-pandoc | Paul Vorbach |
Web | interface | Typademic (Github) | Moritz Mähr |
""" XXX DEX PPT Generator - 主入口文件 生成深色科技风格的XXX DEX产品演示PPT """
from fastapi import FastAPI, File, UploadFile, HTTPException from fastapi.responses import FileResponse from fastapi.middleware.cors import CORSMiddleware from src.ppt_generator import XXXDEXPPTGenerator import uvicorn import os import tempfile
app = FastAPI( title="XXX DEX PPT Generator", description="生成XXX DEX产品演示PPT的自动化工具", version="1.0.0" )
app.add_middleware( CORSMiddleware, allow_origins=[""], allow_credentials=True, allow_methods=[""], allow_headers=["*"], )
@app.post("/generate-ppt") async def generate_ppt(): """生成PPTX文件并返回下载链接""" try: generator = XXXDEXPPTGenerator()
# 创建临时文件
with tempfile.NamedTemporaryFile(suffix='.pptx', delete=False) as tmp_file:
tmp_path = tmp_file.name
# 生成PPT
generator.create_presentation(tmp_path)
return FileResponse(
tmp_path,
media_type="application/vnd.openxmlformats-officedocument.presentationml.presentation",
filename="XXX-DEX-产品演示.pptx"
)
except Exception as e:
raise HTTPException(status_code=500, detail=str(e))
@app.get("/health") async def health_check(): """健康检查接口""" return {"status": "healthy", "service": "XXX DEX PPT Generator"}
if name == "main": uvicorn.run(app, host="0.0.0.0", port=8000)