Skip to content

zhimaAi/converter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Simple File Conversion Service

This FastAPI service supports file conversions between PDF, DOCX, and other formats like HTML. Use the /convert endpoint to convert files by specifying the from_format, to_format, and uploading the file.

Endpoints

  • /: Returns "hello, world!"
  • /ping: Returns "pong"
  • /convert: Converts files from one format to another and downloads the converted file.

Files are temporarily stored and automatically deleted after 1 minute.

Usage

Run from docker

docker run -d --name converter -p 8000:80 shellphy/chatwiki_converter

Convert html doc file to markdown

curl -X POST -F "from_format=html" -F "to_format=md" -F "file=@/path/to/example.html" http://127.0.0.1:8000/convert --output result.md

Convert html string to markdown

curl -X POST -F "from_format=html" -F "to_format=md" -F "content=hello,world" http://127.0.0.1:8000/convert --output result.md

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published