-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Added DOC to Markdown Converter Function - Issue #23 #37
Conversation
@StanFromIreland Please review this due to pycharm i was getting indentation error in my last PR |
should add test(s) |
adding but having problem to run that |
added test cases and it is passed |
can anyone please help me here @gagb , I am not able to run tests and pre-commits |
it is showing this in my pycharm ================== 2 passed, 1 skipped, 3 warnings in 26.27s =================== |
fixed according to review as the Args are creating issue in pychram so removed them according to all other functions |
@l-lumin please review this once |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Sorry, I'm just a random person passing by, so I can't magically approve this!
@realrajaryan sir please can you help me to move forward |
You can run precommit via 'pre-commit run --all-files' and then update the PR |
Another PR introduced conflicts, can you please resolve? |
@gagb sir please review this , I have updated the test code ,help me to merge this |
Thanks, will get it merged soon. Appreciate your contributions. |
@aviral-bhardwaj I wonder how you used mammoth to convert .doc file to html? I have tried on my own .doc file, it riased error |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Mammoth does not support converting doc file format, need to find an alternative.
|
||
result = None | ||
with open(local_path, "rb") as doc_file: | ||
result = mammoth.convert_to_html(doc_file) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
mammoth does not seem to support .doc files
tests/test_files/test.doc
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like this is not a proper doc file. If you just renamed test.docx to test.doc, it does not effectively convert it into a .doc file, it merely changes the file extension while retaining the docx file format. This is why your test passes when it shouldn’t, as mammoth does not support doc files.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok checking , will update
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@realrajaryan added new doc file it is working in my local added screenshot below
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is still not a valid doc file. The MIME type for this file is application/octet-stream, but for a doc file it’s supposed to be application/msword.
tests/test_files/test.doc
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is still not a valid doc file. The MIME type for this file is application/octet-stream, but for a doc file it’s supposed to be application/msword.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, this is a valid doc file now, and the test case fails as mammoth does not support converting doc files.
yes doing more research on this , will update soon |
this PR can be closed as this feature is completed from this PR #153 |
Added DOC to Markdown Converter Function
Issue URL- This is Issue URL
Closed Previous same PR due to the PyCharm Indentation Errors