{"id":20768355,"url":"https://github.com/ainilili/html2docx","last_synced_at":"2025-08-01T04:16:46.596Z","repository":{"id":153086526,"uuid":"627262914","full_name":"ainilili/html2docx","owner":"ainilili","description":"html convert to docx.","archived":false,"fork":false,"pushed_at":"2023-04-14T01:59:51.000Z","size":8,"stargazers_count":3,"open_issues_count":2,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-18T06:43:29.972Z","etag":null,"topics":["converter","documentation","docx","html","openxml"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ainilili.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-04-13T05:36:17.000Z","updated_at":"2023-12-29T09:54:23.000Z","dependencies_parsed_at":null,"dependency_job_id":"c96904f4-ad46-4e49-8e16-a0c5412295d3","html_url":"https://github.com/ainilili/html2docx","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ainilili%2Fhtml2docx","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ainilili%2Fhtml2docx/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ainilili%2Fhtml2docx/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ainilili%2Fhtml2docx/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ainilili","download_url":"https://codeload.github.com/ainilili/html2docx/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243098218,"owners_count":20235987,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["converter","documentation","docx","html","openxml"],"created_at":"2024-11-17T11:38:11.529Z","updated_at":"2025-03-11T19:29:12.550Z","avatar_url":"https://github.com/ainilili.png","language":"Go","readme":"# Introduction\nConvert [HTML](https://zh.wikipedia.org/wiki/HTML) to [DOCX](https://zh.wikipedia.org/wiki/Office_Open_XML)\n\n# Install\n```shell\ngo get github.com/ainilili/html2docx\n```\n\n# Usage\n```go\npackage main\n\nimport (\n\t\"github.com/ainilili/html2docx\"\n\t\"log\"\n\t\"os\"\n)\n\nfunc main() {\n\tsource := `\u003c!DOCTYPE html\u003e\n\u003chtml\u003e\n\u003chead\u003e\n\t\u003ctitle\u003e我的网页\u003c/title\u003e\n\u003c/head\u003e\n\u003cbody\u003e\n\t\u003ch1\u003e欢迎来到我的网页\u003c/h1\u003e\n\t\u003cp\u003e这是一个简单的HTML文档。\u003c/p\u003e\n\u003c/body\u003e\n\u003c/html\u003e`\n\tdist, err := html2docx.Convert([]byte(source))\n\tif err != nil {\n\t\tlog.Fatalln(err)\n\t}\n\terr = os.WriteFile(\"test.docx\", dist, 0666)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n}\n```","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fainilili%2Fhtml2docx","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fainilili%2Fhtml2docx","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fainilili%2Fhtml2docx/lists"}