Socket
Socket
Sign inDemoInstall

docx-extractor

Package Overview
Dependencies
42
Maintainers
1
Versions
90
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.0.83 to 1.1.0

26

index.js

@@ -45,3 +45,3 @@ var fs = require('fs');

return console.log("Error occured trying to get the template used. If you are seeing this error and cannot resolve the issue, contact me at nicholasdangles@gmail.com");
return console.log("Error occured trying to get the template used. If you are seeing this error and cannot resolve the issue, you can open an issue on the Github page");
}

@@ -78,3 +78,3 @@

return console.log("This document does not appear to have a last modified time in its xml");
return console.log("This document does not appear to have the number of pages listed in its xml");

@@ -101,3 +101,3 @@ } else{

return console.log("Error occured trying to get last time modified. If you are seeing this error and cannot resolve the issue, contact me at nicholasdangles@gmail.com");
return console.log("Error occured trying to get number of pages. If you are seeing this error and cannot resolve the issue, you can open an issue on the Github page");
}

@@ -117,3 +117,3 @@

} else {
return console.log("Can't get last time modified. The file you are passing into the function is not a 'docx' file");
return console.log("Can't get number of pages. The file you are passing into the function is not a 'docx' file");
}

@@ -155,3 +155,3 @@ }

return console.log("Error occured trying to get last time modified. If you are seeing this error and cannot resolve the issue, contact me at nicholasdangles@gmail.com");
return console.log("Error occured trying to get last time modified. If you are seeing this error and cannot resolve the issue, you can open an issue on the Github page");
}

@@ -185,3 +185,3 @@

return console.log("This document does not appear to a created time in its xml");
return console.log("This document does not appear to have a created time in its xml");

@@ -206,3 +206,3 @@ } else{

return console.log("Error occured trying to get time created. If you are seeing this error and cannot resolve the issue, contact me at nicholasdangles@gmail.com");
return console.log("Error occured trying to get time created. If you are seeing this error and cannot resolve the issue, you can open an issue on the Github page");
}

@@ -239,3 +239,3 @@

return console.log("This document does not appear to a revision number");
return console.log("This document does not appear to have a revision number");

@@ -260,3 +260,3 @@ } else{

return console.log("Error occured trying to get revisionNum. If you are seeing this error and cannot resolve the issue, contact me at nicholasdangles@gmail.com");
return console.log("Error occured trying to get revisionNumber. If you are seeing this error and cannot resolve the issue, you can open an issue on the Github page");
}

@@ -295,3 +295,3 @@

return console.log("This document does not appear to a specified author");
return console.log("This document does not appear to have a last specified author");

@@ -316,3 +316,3 @@ } else{

return console.log("Error occured trying to get author name. If you are seeing this error and cannot resolve the issue, contact me at nicholasdangles@gmail.com");
return console.log("Error occured trying to get author name. If you are seeing this error and cannot resolve the issue, you can open an issue on the Github page");
}

@@ -331,3 +331,3 @@

} else {
return console.log("Can't get author name. The file you are passing into the function is not a 'docx' file");
return console.log("Can't get last author name. The file you are passing into the function is not a 'docx' file");
}

@@ -370,3 +370,3 @@ }

return console.log("Error occured trying to get author name. If you are seeing this error and cannot resolve the issue, contact me at nicholasdangles@gmail.com");
return console.log("Error occured trying to get author name. If you are seeing this error and cannot resolve the issue, you can open an issue on the Github page");
}

@@ -373,0 +373,0 @@

{
"name": "docx-extractor",
"version": "1.0.83",
"description": "Extracts comments from docx files",
"version": "1.1.0",
"description": "Extracts comments and other data from docx files",
"main": "index.js",

@@ -20,3 +20,14 @@ "scripts": {

"xml comments",
"word document"
"word document",
"word extractor",
"xml extractor",
"docx data",
"word data",
"parse comments",
"word parser",
"docx parser",
"hyperlink extractor",
"url extractor",
"docx url",
"word url"
],

@@ -23,0 +34,0 @@ "author": "Nicholas Dangles",

Node.js: docx-extractor
=================
This module allows you to extract comments in 'docx' files.
This module allows you to extract comments in 'docx' files and other data stored such as author name, hyperlinks, modification times, etc.

@@ -12,5 +12,7 @@

Please feel free to make any comments or suggestions. It can always be improved so I accept any and all feedback.
Installation

@@ -26,4 +28,6 @@ ------------

docx-extractor is a module that will let you extract the comments embedded into the xml of 'docx' files. It returns all of the comments as an array.
docx-extractor is a module that will let you extract the comments embedded into the xml of 'docx' files as well as other data.
Every method uses the same format as below. Just replace "someMethod" below with the name of the method you want to use.
Example:

@@ -34,3 +38,3 @@

dxe.extractComments('myfile.docx', function(data){
dxe.someMethod('myfile.docx', function(data){
console.log(data)

@@ -40,5 +44,55 @@ });

Methods
-------
- extractComments(file, callback)
Extracts the comments embedded into the xml of 'docx' files. It returns all of the comments as an array.
- getHyperlinks(file, callback)
Returns all hyperlinks in the docx file as an array
- getRevisionNumber(file, callback)
Returns the number of times the document was modified and saved.
- numberPages(file, callback)
Returns number of pages in the docx file
- getAuthor(file, callback)
Returns the original author of the document. This will be the name of the user account on the machine it was created from.
- lastModifiedBy(file, callback)
Returns the last person that modified the document. Again, this returns the name of the computer's user account that was in use at the time.
- timeCreated(file, callback)
Returns the time the docx file was originally created. Example: 2017-03-08T17:40:00Z
- lastModified(file, callback)
Returns the time that the document was last modified. Example: 2017-03-09T14:23:00Z
- templateUsed(file, callback)
Returns the template that was used when creating the document. Example: "Normal.dotm" is the template name of when someone starts a docx file with the blank template.
Future
------
I plan to add more methods in the near future for extracting and parsing other specific data out of the 'docx' xml files.
I plan to add more methods in the near future for extracting and parsing other specific data out of the 'docx' xml files.
My next plan is to add word, character and paragraph count. Although this information is stored in the xml, microsoft recommends against it because it can be inconsistent with the values that the client application(Word gui) shows.
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc