A Python script to convert your Logseq notes to Obsidian format, preserving your content while adapting to Obsidian's markdown syntax.
- Converts Logseq's block-based structure to Obsidian's markdown format
- Handles block references, page references, and tags
- Converts Logseq properties to Obsidian YAML frontmatter
- Preserves code blocks and other markdown formatting
- Copies assets (images, attachments) to the Obsidian vault
- Properly handles empty bullet points
- Provides detailed logging and statistics
- Python 3.6 or higher
- Clone this repository or download the script files
- No additional dependencies are required beyond the Python standard library
python logseq_to_obsidian.py --logseq-dir /path/to/logseq/graph --obsidian-dir /path/to/obsidian/vault--logseq-dir: Path to your Logseq graph directory (required)--obsidian-dir: Path to your Obsidian vault directory (required)--preserve-bullets: Keep bullet points in the conversion (default: convert to plain text)--skip-block-refs: Skip conversion of block references--skip-properties: Skip handling of properties--skip-queries: Skip handling of queries--skip-tags: Skip handling of tags--verbose,-v: Enable verbose logging
python logseq_to_obsidian.py --logseq-dir ~/Documents/logseq/my-notes --obsidian-dir ~/Documents/obsidian/my-vaultpython logseq_to_obsidian.py --logseq-dir ~/Documents/logseq/my-notes --obsidian-dir ~/Documents/obsidian/my-vault --preserve-bulletspython logseq_to_obsidian.py --logseq-dir ~/Documents/logseq/my-notes --obsidian-dir ~/Documents/obsidian/my-vault --skip-queries --skip-tags- Bullet Points: By default, Logseq's bullet points are converted to plain text. Use
--preserve-bulletsto keep them.- Empty bullet points (lines with just a dash
-) are converted to blank lines.
- Empty bullet points (lines with just a dash
- Block References: Logseq's
((block-id))format is converted to Obsidian's[[block-id]]format. - Page References: Logseq's
[[page name]]is already compatible with Obsidian, but references with block IDs are adjusted. - Properties: Logseq properties are converted to YAML frontmatter.
- Queries: Logseq queries are converted to HTML comments.
- Tags: Logseq's
#[[tag name]]format is converted to Obsidian's#tag-nameformat.
The script copies all files from the Logseq assets directory to the Obsidian vault's assets directory, preserving the directory structure.
- The script does not handle Logseq's advanced features like custom queries or templates
- Some manual adjustments may be needed for complex notes
- The script does not migrate Logseq plugins or settings
If you encounter issues, check the log file logseq_to_obsidian_conversion.log for details. Use the --verbose flag for more detailed logging.
This project is licensed under the MIT License - see the LICENSE file for details.