Skip to content

Commit

Permalink
Extracting notes from powerpoint slides.
Browse files Browse the repository at this point in the history
  • Loading branch information
NihalAGesudraz committed Dec 3, 2018
1 parent 9ad4aa6 commit 263664a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/extractors/pptx.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ var xpath = require( 'xpath' )
, yauzl = require( 'yauzl' )
, util = require( '../util' )
, slideMatch = /^ppt\/slides\/slide/
, noteMatch = /^ppt\/notesSlides\/notesSlide/
;

function _compareSlides( a, b ) {
Expand Down Expand Up @@ -71,7 +72,7 @@ function extractText( filePath, options, cb ) {
});

zipfile.on( 'entry', function( entry ) {
if ( slideMatch.test( entry.fileName ) ) {
if ( slideMatch.test( entry.fileName ) || noteMatch.test( entry.fileName ) ) {
util.getTextFromZipFile( zipfile, entry, function( err2, text ) {
var slide = +entry.fileName.replace( 'ppt/slides/slide', '' ).replace( '.xml', '' );
slides.push({ slide: slide, text: text });
Expand Down

0 comments on commit 263664a

Please sign in to comment.