1.1.1 • Published 8 years ago

sp-wiki-to-docx v1.1.1

Weekly downloads
5
License
Apache License Ve...
Repository
github
Last release
8 years ago

SPWikiToDocx

Convert a sharepoint wiki library into a DOCX file. The tool reads each Wiki page in a given SP library and combines all of the contents of the Wiki pages into a single HTML chunk. html-docx-js is used to convert that one large HTML chunk into a DOCX file. The tool attempts to retrieve each of the images referenced by the Wiki pages and embeds the images as base64 data in the HTML files ("data:image/png;base64,XXXXX") so that the images are visible in the output.

Dependencies

  • html-docx-js
  • q
  • readline
  • request
  • sharepoint
  • xml2js
  • yargs

Installation

npm install sp-wiki-to-docx -g

Usage

sp-wiki-to-docx -s SITE_URL -l LIBRARY_NAME -u USERNAME -o output.docx

Options:

LongShortDescriptionRequired?
--site-sThe site URLYes
--library-lThe name of the library (no spaces)\nex: "GeneralGuides"Yes
--username-uSharepoint online username\nEx: my@email.comYes
--password-pSharepoint online passwordNo, will prompt if not specified on command line
--output-oThe file to save the output to (default: "output.docx")No
--combinedHtml-cThe file to save the combined HTML output to\nex: output.htmlNo