Security News
New Proposed CISA Mandate Would Require Critical Infrastructure to Report Ransom Payments Within 24 Hours
CISA has proposed a set of new rules that would require critical infrastructure to report cyber incidents and ransom payments.
docx-extractor
Advanced tools
Extracts comments and other data from docx files
Weekly downloads
Readme
This module allows you to extract comments in 'docx' files and other data stored such as author name, hyperlinks, modification times, etc.
It was a requirement of a job I was working on and I could not find any modules to do this. It was a pain to have to try and create it at the time of the job so I figured I would just make a module incase anyone else ever needed it.
Please feel free to make any comments or suggestions. It can always be improved so I accept any and all feedback.
npm install --save docx-extractor
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:
var dxe = require('docx-extractor');
dxe.someMethod('myfile.docx', function(data){
console.log(data)
});
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.
FAQs
Extracts comments and other data from docx files
The npm package docx-extractor receives a total of 11 weekly downloads. As such, docx-extractor popularity was classified as not popular.
We found that docx-extractor demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
CISA has proposed a set of new rules that would require critical infrastructure to report cyber incidents and ransom payments.
Security News
Redis is no longer OSS, breaking its explicit commitment to remain under the BSD 3-Clause License forever. This has angered contributors who are now working to fork the software.
Product
Socket AI now enables 'AI detected potential malware' alerts by default, ensuring users benefit from AI-powered state-of-the-art malware detection without needing to opt-in.