onenote-dump icon indicating copy to clipboard operation
onenote-dump copied to clipboard

Higher fidelity conversion

Open genericmoniker opened this issue 4 years ago • 0 comments

The current approach of using the HTML from the OneNote graph API is limited by the quality of the API's rendering, which isn't always that great.

For example, using the "Quote" style, followed by a "Normal" paragraph looks like this in the application:

image

The graph API's rendering to HTML is this, where the "Normal" style has been lost:

<p style="color:#595959;font-style:italic;margin-top:0pt;margin-bottom:0pt">Many of life&#39;s failures are people who did not realize how close they were to success when they gave up.</p>
<br />
<p style="color:#595959;font-style:italic;margin-top:0pt;margin-bottom:0pt">Thomas Edison</p>

This seems like a bug in the rendering.

A potential alternative strategy would be to do a direct conversion from the OneNote binary format to Markdown, which would also imply working directly on local files rather than using the graph API at all.

genericmoniker avatar Nov 11 '21 18:11 genericmoniker