Skip to content

Simple script for unidirectional merging of two Logseq graphs

Published: at 03:00 AM

I have two Logseq graphs – a main one and a mobile version. While I don’t use my phone extensively, sometimes I need to jot down notes, to-dos, or save bookmarks with tags like #to/read or #to/watch. Since both graphs are Git repositories, I wanted a simple way to merge my mobile repo into the standard one but couldn’t find a built-in solution. The following script is a basic “copy” operation that takes files from the journals and pages folders of the mobile repo and copies them into the standard repo. It adds workspace prefixes (one for journals, one for pages) to prevent conflicts.

see: https://github.com/danielmzak/logseq-uni-merge/blob/main/logseq-uni-merge.py