{"id":14079,"date":"2023-05-24T15:33:02","date_gmt":"2023-05-24T15:33:02","guid":{"rendered":"https:\/\/blog.bachi.net\/?p=14079"},"modified":"2023-05-24T16:15:46","modified_gmt":"2023-05-24T16:15:46","slug":"onenote-to-markdown-and-obsidian-md","status":"publish","type":"post","link":"https:\/\/blog.bachi.net\/?p=14079","title":{"rendered":"OneNote to Markdown (and Obsidian.md)"},"content":{"rendered":"<h3>GitHub<\/h3>\n<p><a href=\"https:\/\/github.com\/SjoerdV\/ConvertOneNote2MarkDown\">github.com\/SjoerdV\/ConvertOneNote2MarkDown<\/a><br \/>\n<a href=\"https:\/\/gist.github.com\/heardk\/ded40b72056cee33abb18f3724e0a580\">OneNote-to-MD.md: Converting One Note to Markdown<\/a><\/p>\n<h3>YouTube<\/h3>\n<p><a href=\"https:\/\/www.youtube.com\/watch?v=C70jUkQyIQM\">Easily Convert OneNote to Markdown (and Obsidian.md)<\/a><br \/>\n<a href=\"https:\/\/www.youtube.com\/watch?v=6qEcy0oaNlc\">OneNote &#8211; Export Pages, Sections, or Workbooks into Word (easily!)<\/a><\/p>\n<p><!-- -------------------------------------------------------------------------------------- --><\/p>\n<h3>Requirements<\/h3>\n<ul>\n<li><a href=\"https:\/\/obsidian.md\/\">obsidian.md<\/a><\/li>\n<li><a href=\"https:\/\/pandoc.org\/\">Pandoc<\/a><\/li>\n<\/ul>\n<p><!-- -------------------------------------------------------------------------------------- --><\/p>\n<h3>Python<\/h3>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">\r\n&gt; pip install -r requirements.txt\r\nCollecting pywin32\r\n  Downloading pywin32-306-cp311-cp311-win_amd64.whl (9.2 MB)\r\n     ---------------------------------------- 9.2\/9.2 MB 32.8 MB\/s eta 0:00:00\r\nCollecting pymupdf\r\n  Downloading PyMuPDF-1.22.3-cp311-cp311-win_amd64.whl (11.7 MB)\r\n     ---------------------------------------- 11.7\/11.7 MB 36.4 MB\/s eta 0:00:00\r\nInstalling collected packages: pywin32, pymupdf\r\nSuccessfully installed pymupdf-1.22.3 pywin32-306\r\n\r\n\r\n&gt; python convert.py\r\n!!WARNING!! Page Failed: C:\\Users\\bacr\\Desktop\\OneNoteExport\\Andreas @ ZHAW\\Quick Notes&#92;&#48;00_OneNote- one place for all of your notes.md\r\n!!WARNING!! Page Failed: C:\\Users\\bacr\\Desktop\\OneNoteExport\\Andreas @ ZHAW\\Quick Notes&#92;&#48;01_OneNote Basics.md\r\n!!WARNING!! Page Failed: C:\\Users\\bacr\\Desktop\\OneNoteExport\\Andreas @ ZHAW\\Quick Notes&#92;&#48;02_Untitled page.md\r\n!!WARNING!! Page Failed: C:\\Users\\bacr\\Desktop\\OneNoteExport\\Andreas @ ZHAW\\Quick Notes&#92;&#48;03_Untitled page.md\r\nTraceback (most recent call last):\r\n  File &quot;U:\\onenote-to-markdown\\convert.py&quot;, line 134, in &lt;module&gt;\r\n    handle_element(onenote, child)\r\n  File &quot;U:\\onenote-to-markdown\\convert.py&quot;, line 111, in handle_element\r\n    handle_element(onenote, c2, os.path.join(path, safe_str(elem.attrib&#x5B;'name'])), i)\r\n  File &quot;U:\\onenote-to-markdown\\convert.py&quot;, line 113, in handle_element\r\n    hier2 = onenote.GetHierarchy(elem.attrib&#x5B;'ID'], win32.constants.hsPages, &quot;&quot;)\r\n            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\r\n  File &quot;C:\\Users\\bacr\\AppData\\Local\\Temp\\gen_py\\3.11\\F2A7EE29-8BF6-4A6D-83F1-098E366C709Cx0x1x0\\IApplication.py&quot;, line 63, in GetHierarchy\r\n    return self._ApplyTypes_(1610743808, 1, (24, 0), ((8, 1), (3, 1), (16392, 2)), 'GetHierarchy', None,bstrStartNodeID\r\n           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\r\n  File &quot;C:\\Users\\bacr\\Miniconda3\\envs\\onenote\\Lib\\site-packages\\win32com\\client\\__init__.py&quot;, line 574, in _ApplyTypes_\r\n    self._oleobj_.InvokeTypes(dispid, 0, wFlags, retType, argTypes, *args),\r\n    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\r\npywintypes.com_error: (-2147023174, 'Der RPC-Server ist nicht verf\u00fcgbar.', None, None)\r\n!!!Error!!! Hint: Make sure OneNote is open first.\r\n\r\n=&gt; RPC server is unavailable error no=-2147023174\r\n<\/pre>\n<p><a href=\"https:\/\/social.technet.microsoft.com\/Forums\/de-DE\/ad154f6c-0bed-4568-955a-92f381eafc49\/rpc-server-is-unavailable-error-no2147023174?forum=ITCG\">RPC server is unavailable error no=-2147023174<\/a><\/p>\n<p><!-- -------------------------------------------------------------------------------------- --><\/p>\n<h3>PowerShell<\/h3>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">\r\n&gt; .\\convert3.ps1\r\n\r\nNotebook: Andreas @ ZHAW\r\nSection: Andreas @ ZHAW\\Quick Notes\r\nCreating DOCX: C:\\Users\\bacr\\Desktop\\OneNoteExport\\Andreas @ ZHAW\\Quick Notes&#92;&#48;0_OneNote_ one place for all of your notes.docx\r\nERROR!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\r\nException calling &quot;Publish&quot; with &quot;4&quot; argument(s): &quot;Der Remoteprozeduraufruf ist fehlgeschlagen. (Exception from HRESULT: 0x800706BE)&quot;\r\n\r\n==&gt; Error -2147023174 (dec) translates to 800706BA (hex), 'the RPC server is unavailable'.\r\n<\/pre>\n<p><a href=\"https:\/\/learn.microsoft.com\/de-de\/troubleshoot\/windows-server\/system-management-components\/unable-view-roles-features-error-code-0x800706be\">Sie k\u00f6nnen Rollen und Features nicht anzeigen und erhalten Fehlercode 0x800706BE in Server-Manager<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>GitHub github.com\/SjoerdV\/ConvertOneNote2MarkDown OneNote-to-MD.md: Converting One Note to Markdown YouTube Easily Convert OneNote to Markdown (and Obsidian.md) OneNote &#8211; Export Pages, Sections, or Workbooks into Word (easily!) Requirements obsidian.md Pandoc Python &gt; pip install -r requirements.txt Collecting pywin32 Downloading pywin32-306-cp311-cp311-win_amd64.whl (9.2 MB) &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;- 9.2\/9.2 MB 32.8 MB\/s eta 0:00:00 Collecting pymupdf Downloading PyMuPDF-1.22.3-cp311-cp311-win_amd64.whl (11.7 MB) &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;- [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-14079","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/blog.bachi.net\/index.php?rest_route=\/wp\/v2\/posts\/14079","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.bachi.net\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.bachi.net\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.bachi.net\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.bachi.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=14079"}],"version-history":[{"count":3,"href":"https:\/\/blog.bachi.net\/index.php?rest_route=\/wp\/v2\/posts\/14079\/revisions"}],"predecessor-version":[{"id":14082,"href":"https:\/\/blog.bachi.net\/index.php?rest_route=\/wp\/v2\/posts\/14079\/revisions\/14082"}],"wp:attachment":[{"href":"https:\/\/blog.bachi.net\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=14079"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.bachi.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=14079"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.bachi.net\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=14079"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}