Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PPTX missing newlines, writes error messages to stdout #29

Closed
SheetJSDev opened this issue Aug 24, 2014 · 2 comments
Closed

PPTX missing newlines, writes error messages to stdout #29

SheetJSDev opened this issue Aug 24, 2014 · 2 comments

Comments

@SheetJSDev
Copy link

I took the test file and used powerpoint to save as an RTF file. Using textutil on OSX, I generated a baseline. Ideally, textract should produce the exact text:

$ textutil -convert txt layout_types_2011.rtf # creates layout_types_2011.txt
$ textract layout_types_2011.pptx 2>/dev/null >layout_types_2011.textract
$ diff layout_types_2011.txt layout_types_2011.textract

While the differences might be conscious decisions, it's worth clarifying:

A) the line "textract not ready, retrying in .5 seconds" is printed to stdout. This probably should be printed to stderr: https://github.com/dbashford/textract/blob/master/lib/extract.js#L72 should use console.error rather than console.log

B) Newlines are completely lost. For example, slide 10 reads

Who thought this would be a good idea?

Unfortunately the arrow keys act relative to the screen rather than the text

The entire input situation is confusing

but textract is writing

Who thought this would be a good idea? Unfortunately the arrow keys act relative to the screen rather than the text The entire input situation is confusing

C) The character U+2026 is missing (is that intentional?)

@dbashford
Copy link
Owner

A) Given its command line usage, I agree. If someone pipes the output they'll get that in there. Otherwise its not really an error, its informational.

B) Will look into it.

C) Not intentional. It's not a character I white listed. Can add it.

dbashford added a commit that referenced this issue Aug 24, 2014
dbashford added a commit that referenced this issue Aug 24, 2014
@dbashford
Copy link
Owner

Addressed C here, 3693058, and here, bbb008e.

A B addressed with commits referenced below.

Enough monkeying with regexes here to warrant push in minor version.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants