in reply to PPT to TXT Pure Perl

If you are parsing a "PPT" file, I would approach that problem by writing a perl script that reads the file into a buffer and then scans the buffer for continuous sections of characters (6 or more characters) that only include : 0-9 a-z A-Z \0 \r \n space comma, period, exclamation point, question mark. If any character is outside of this range, then that character is filtered out. Also, if it finds the word ":the#$" by itself alone, then it skips that too since we're looking for at least 6 characters next to each other that fall within the expected range. This would be an easy way to filter out all the binary "trash" that ppt files are filled with. So, I'd start there. Of course, if it's a PPTX file, then you just unzip it and run some type of html or xml filter on the text, and you get the content that way. Easy! ;-)

Replies are listed 'Best First'.
Re^2: PPT to TXT Pure Perl
by haukex (Archbishop) on Feb 03, 2019 at 12:15 UTC