I have an Obsidian vault that I wanted to automatically and reliably export as PDFs using Obsidian’s native export. Since there's no API for this, I built a Proxmox VM-based solution that watches a Git repo for changes. When updates are detected, it uses automation (via PyAutoGUI) to trigger the export, then processes the PDFs further.
No followers yet
Once you ship this you can't edit the description of the project, but you'll be able to add more devlogs and re-ship it as you add new features!
Works great. implemented now a remote control mechanism to toggle and a prometheus data export for use in my grafana dashboards:).
Runs still strong on my proxmox install
At first I ran Ubuntu but GNOME was causing issues, so I switched to Xubuntu. XFCE is lighter on resources and just way simpler and more predictable in my experience.
After a lot of troubleshooting, I first tried intercepting the native file save dialog using C, but that wasn’t feasible because of sandboxing and security restrictions. I then moved to using xdotool and pyautogui. After TONS of trial and error to get the timing and window focus right, the automation finally works. It uses the Advanced URI plugin in Obsidian to open the export dialog and the save window. Then pyautogui takes over, enters the path, and saves the PDF. Xdotool had problems reliably selecting the right window.
Obsidian tries to open the PDF afterwards, in my case in Firefox, so for now I just close the tab programmatically. Still looking into disabling that directly in Obsidian.
Now I'm onto setting up change tracking and hooking everything into systemd to run it regularly.