Is there anyway to read .one(OneNote files) using Python script?
Asked Answered
S

3

12

I am trying to read .one file(OneNote files) and want to write its content into a text file, but didn't find a single way to do it using Python. Please help me with this.

Staid answered 15/10, 2018 at 9:31 Comment(3)
Possible duplicate of #34622971Apfel
@JorgeLavín am able to fetch OneNote into my local but not able to read its content.By looking at API didn't find a way to read. Please suggest any possible solution.Staid
one note contains not just text, they have many other formatted contents. so do you really only need the text in it?Grams
L
2

This isn't Python, but for other internet voyagers trying to escape Microsoft's iron grip this PowerShell script is pure magic.

https://passbe.com/2019/bulk-export-onenote-2013-2016-pages-as-html/

Loveridge answered 8/2, 2023 at 0:32 Comment(0)
A
1

Try to get the content of your notes calling:

./me/onenote/pages/1-1c13bcbae2fdd747a95b3e5386caddf1!1-xxxxxxxx-xxxx-xxxx-xxxxxxxxxxxx/content?includeIDs=true&includeInkML=true&preAuthenticated=true

It will give you text/html, which you can parse with https://pypi.org/project/lxml/

Agnew answered 14/7, 2021 at 1:33 Comment(0)
M
1

I didn't find a good way to decode .one file. But I find another way to workaround it.

  1. Install OneNote 2016 and sync the contents.
  2. Install the Evernote legacy version
  3. Import data from OneNote to Evernote. (There's a button on GUI).
  4. Export notes to html from Evernote.
  5. Then you can do whatever you want. Yeah!
Maiamaiah answered 4/11, 2022 at 6:49 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.