Monthly Archives: May 2023

OneNote to Markdown (and Obsidian.md)

GitHub

github.com/SjoerdV/ConvertOneNote2MarkDown
OneNote-to-MD.md: Converting One Note to Markdown

YouTube

Easily Convert OneNote to Markdown (and Obsidian.md)
OneNote – Export Pages, Sections, or Workbooks into Word (easily!)

Requirements

Python

> pip install -r requirements.txt
Collecting pywin32
  Downloading pywin32-306-cp311-cp311-win_amd64.whl (9.2 MB)
     ---------------------------------------- 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)
     ---------------------------------------- 11.7/11.7 MB 36.4 MB/s eta 0:00:00
Installing collected packages: pywin32, pymupdf
Successfully installed pymupdf-1.22.3 pywin32-306


> python convert.py
!!WARNING!! Page Failed: C:\Users\bacr\Desktop\OneNoteExport\Andreas @ ZHAW\Quick Notes\000_OneNote- one place for all of your notes.md
!!WARNING!! Page Failed: C:\Users\bacr\Desktop\OneNoteExport\Andreas @ ZHAW\Quick Notes\001_OneNote Basics.md
!!WARNING!! Page Failed: C:\Users\bacr\Desktop\OneNoteExport\Andreas @ ZHAW\Quick Notes\002_Untitled page.md
!!WARNING!! Page Failed: C:\Users\bacr\Desktop\OneNoteExport\Andreas @ ZHAW\Quick Notes\003_Untitled page.md
Traceback (most recent call last):
  File "U:\onenote-to-markdown\convert.py", line 134, in <module>
    handle_element(onenote, child)
  File "U:\onenote-to-markdown\convert.py", line 111, in handle_element
    handle_element(onenote, c2, os.path.join(path, safe_str(elem.attrib['name'])), i)
  File "U:\onenote-to-markdown\convert.py", line 113, in handle_element
    hier2 = onenote.GetHierarchy(elem.attrib['ID'], win32.constants.hsPages, "")
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\bacr\AppData\Local\Temp\gen_py\3.11\F2A7EE29-8BF6-4A6D-83F1-098E366C709Cx0x1x0\IApplication.py", line 63, in GetHierarchy
    return self._ApplyTypes_(1610743808, 1, (24, 0), ((8, 1), (3, 1), (16392, 2)), 'GetHierarchy', None,bstrStartNodeID
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\bacr\Miniconda3\envs\onenote\Lib\site-packages\win32com\client\__init__.py", line 574, in _ApplyTypes_
    self._oleobj_.InvokeTypes(dispid, 0, wFlags, retType, argTypes, *args),
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
pywintypes.com_error: (-2147023174, 'Der RPC-Server ist nicht verfügbar.', None, None)
!!!Error!!! Hint: Make sure OneNote is open first.

=> RPC server is unavailable error no=-2147023174

RPC server is unavailable error no=-2147023174

PowerShell

> .\convert3.ps1

Notebook: Andreas @ ZHAW
Section: Andreas @ ZHAW\Quick Notes
Creating DOCX: C:\Users\bacr\Desktop\OneNoteExport\Andreas @ ZHAW\Quick Notes\00_OneNote_ one place for all of your notes.docx
ERROR!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
Exception calling "Publish" with "4" argument(s): "Der Remoteprozeduraufruf ist fehlgeschlagen. (Exception from HRESULT: 0x800706BE)"

==> Error -2147023174 (dec) translates to 800706BA (hex), 'the RPC server is unavailable'.

Sie können Rollen und Features nicht anzeigen und erhalten Fehlercode 0x800706BE in Server-Manager

Sensirion SHT

Technical download (products/downloads)
Technischer Download (produkte/technischer-download)


Python

Sensirion SEK-SensorBridge Python Driver
Sensirion SHDLC Python Driver
Sensirion SHT I²C Python Driver
SHDLC Protocol (Sensirion High-Level Data Link Control)

github.com/Sensirion/info
github.com/Sensirion/python-i2c-sht/

pip install sensirion-shdlc-driver
pip install sensirion-shdlc-sensorbridge
pip install sensirion-i2c-driver
pip install sensirion-i2c-sht

sensirion-i2c-driver         1.0.0                 pypi_0    pypi
sensirion-i2c-sht            0.3.0                 pypi_0    pypi
sensirion-shdlc-driver       0.1.5                 pypi_0    pypi
sensirion-shdlc-sensorbridge 0.1.1                 pypi_0    pypi