Skip to content

Disfactory/docx-exporter-js

Folders and files

NameName
Last commit message
Last commit date

Latest commit

261899f · Nov 29, 2023

History

17 Commits
Nov 15, 2023
Nov 18, 2023
Nov 15, 2023
Nov 18, 2023
Nov 29, 2023
Nov 18, 2023
Nov 18, 2023
Nov 15, 2023
Nov 18, 2023
Nov 18, 2023
Nov 15, 2023
Nov 15, 2023
Nov 18, 2023

Repository files navigation

Factory reporting docx exporter

A browser javascript rewrite of the original python exporter

Development

pnpm install
pnpm dev

Click the download button will generate a docx file with sample data inside main.js

Build

pnpm build

This will generate a dist folder with export-word-docx.js inside. Copy the file to your project and include it with script tag.

Usage

<script src="export-word-docx.js"></script>

And the exportWordDocx function will be available in the global scope.

const exampleData = [
{
  sender: 'XXX',
  serialNumber: '00000000',
  location: '台北市中山區中山北路一段',
  legislator: 'XXX',
  townName: '台北市中山區',
  imageUrls: [
    // 'https://i.imgur.com/taKOy2v.png',
    // 'https://i.imgur.com/LrUki4U.jpg',
  ],
},
];

await window.exportWordDocx(exampleData);

License

MIT

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published