A tool to convert Logseq notes to Obsidian format
Project description
A Python tool to migrate Logseq notes to Obsidian format.
Logseq is a privacy-first, open-source knowledge management tool that uses an outliner editor with bidirectional linking and block references, perfect for building personal knowledge networks.
Obsidian is a Markdown-based local knowledge management tool that helps users build knowledge graphs through bidirectional linking, featuring a powerful plugin ecosystem and visualization capabilities.
🚀 Quick Start
PyPI Installation (Recommended)
Install directly from PyPI:
pip install logseq2obsidian
Running Conversion
After PyPI Installation
# Basic conversion
logseq2obsidian <logseq_dir> <obsidian_dir>
# Preview mode (no actual file writing)
logseq2obsidian <logseq_dir> <obsidian_dir> --dry-run
Development Environment Usage
# Basic conversion
python -m src.main <logseq_dir> <obsidian_dir>
# Preview mode (no actual file writing)
python -m src.main <logseq_dir> <obsidian_dir> --dry-run
Example Data Conversion
# Basic conversion (keep list format)
python scripts/convert_examples.py
# Convert to paragraph format (remove top-level list symbols)
python scripts/convert_examples.py --remove-top-level-bullets
# Conversion with categorization
python scripts/convert_examples.py \
--remove-top-level-bullets \
--category-tag wiki \
--category-folder wiki
Parameter Description:
--remove-top-level-bullets: Remove first-level list symbols, convert content to paragraph format--category-tag <tag>: Specify category tag name (e.g., "wiki")--category-folder <folder>: Specify category folder name, used with category-tag
🎯 Key Features
- ✅ Logseq Format Parsing: Parse Logseq markdown files
- ✅ Page Link Conversion: Maintain
[[page]]format compatibility - ✅ Block Reference Processing: Convert
((uuid))to Obsidian block references - ✅ Meta Property Conversion: Convert
property:: valueto YAML frontmatter - ✅ Format Optimization: Empty line processing, title spacing, content cleanup
- ✅ Filename Processing: URL encoding and special character handling
- ✅ Categorization: Automatically categorize files to folders based on tags
Running Tests
Provide multiple test running methods:
# Run all tests (recommended)
python test.py
# View all available tests
python test.py --list
# Run specific tests
python test.py --test test_basic
python test.py --test test_bug_fixes
python test.py --test test_formatting_comprehensive
# Use standard test framework
python test.py --unittest # unittest auto discovery
python test.py --pytest # use pytest (if installed)
# Run individual test files directly
python tests/test_basic.py
🛠️ Development Environment Setup
The project uses Poetry for dependency management, one-click installation:
# Run environment setup script
bash scripts/setup.sh
The script will automatically:
- Check Python 3.10+ version
- Check and configure Poetry
- Create virtual environment (.venv)
- Install all dependencies
Manually activate environment:
source .venv/bin/activate
Test-driven development ensures code quality:
# Continuously run tests during development
python test.py
# Verify after code changes
python test.py --test test_specific_feature
Test Types:
test_basic- Basic functionality testingtest_bug_fixes- Bug fix verification testingtest_formatting_comprehensive- Format optimization comprehensive testingtest_block_id_comprehensive- Block ID processing comprehensive testingtest_page_links_comprehensive- Page link processing comprehensive testingtest_category_detection_comprehensive- Category detection comprehensive testing
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file logseq2obsidian-0.0.1.tar.gz.
File metadata
- Download URL: logseq2obsidian-0.0.1.tar.gz
- Upload date:
- Size: 24.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/2.2.1 CPython/3.10.15 Darwin/25.0.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d3e6b527efd1aec619ca252bc814f1095d8d3acafe2867b36a0773d7a61300cd
|
|
| MD5 |
0102ea21ab99e2327406ea22171b5996
|
|
| BLAKE2b-256 |
f5d49078bb29886caeba72ef5955223c65268f8c36f8e658997d3cd96bf07437
|
File details
Details for the file logseq2obsidian-0.0.1-py3-none-any.whl.
File metadata
- Download URL: logseq2obsidian-0.0.1-py3-none-any.whl
- Upload date:
- Size: 25.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/2.2.1 CPython/3.10.15 Darwin/25.0.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ef656cf84868f6f90aa44f8ee22c5aa4fc13905ec01ac013ed73b62d6de8b7f1
|
|
| MD5 |
5a08cb4222bf42bdcb1fdd2fe1af2396
|
|
| BLAKE2b-256 |
baefb2984411f631a94372be64985a780aa001203ed52ce79abd8494807c8f59
|