PyObsidian is a powerful command-line tool for managing and analyzing Obsidian vaults. It provides a wide range of features to enhance your note-taking experience and optimize your knowledge management workflow.
- Create and manage notes
- Search notes by content, tags, and frontmatter
- Analyze notes (find empty notes, duplicates, unused images)
- Manage tags and generate tag clouds
- Create daily notes
- Backup and restore vaults
- Analyze links (find broken links and orphaned notes)
- Generate note statistics
- Google Calendar integration
- Voice note to text conversion
- Git synchronization
- Report generation
- Data visualization
- Tag management
- Link analysis
- Note templating
- Plugin management
- Spaced repetition
- Citation extraction
- Knowledge mapping
-
Ensure you have Python 3.12.3 or later installed on your system.
-
Install Poetry if you haven't already:
pip install poetry
-
Clone this repository:
git clone https://github.com/felipepimentel/pyobsidian.git cd pyobsidian
-
Install project dependencies:
poetry install
- Create a
.env
file in the project root directory. - Add the following line to the
.env
file, replacing/path/to/your/obsidian/vault
with the actual path to your Obsidian vault:
OBSIDIAN_VAULT_PATH="/path/to/your/obsidian/vault"
Note: The .env
file is gitignored to keep your personal configuration private.
To use PyObsidian, run the pyobsidian
command followed by a subcommand. Here are some examples:
# Create a new note
poetry run pyobsidian create-note "My New Note" --content "This is the content" --tags "tag1,tag2"
# Search notes
poetry run pyobsidian search "query"
# List all tags
poetry run pyobsidian list-tags
# Create a backup
poetry run pyobsidian backup --destination "./my_backup"
# Find empty notes
poetry run pyobsidian find-empty-notes
# Create a daily note
poetry run pyobsidian create-daily-note
# Show top tags
poetry run pyobsidian top-tags --limit 5
# Sync with Git
poetry run pyobsidian sync-git
# Process voice notes
poetry run pyobsidian process-voice-notes
# Generate report
poetry run pyobsidian generate-report
# Manage tags
poetry run pyobsidian manage-tags
# Analyze links
poetry run pyobsidian analyze-links
# Create note from template
poetry run pyobsidian create-note "Template Name" "New Note Name"
# List available templates
poetry run pyobsidian list-templates
# Check for plugin updates
poetry run pyobsidian check-plugin-updates
For a complete list of available commands, run:
poetry run pyobsidian --help
To set up the development environment:
-
Install development dependencies:
poetry install
-
Run tests:
poetry run pytest
-
Format code:
poetry run black .
-
Run linter:
poetry run flake8
Contributions are welcome! Please feel free to submit a Pull Request.
- Fork the project
- Create your feature branch (
git checkout -b feature/AmazingFeature
) - Commit your changes (
git commit -m 'Add some AmazingFeature'
) - Push to the branch (
git push origin feature/AmazingFeature
) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
Felipe Pimentel - @felipepimentel
Project Link: https://github.com/felipepimentel/pyobsidian
- Obsidian for providing an excellent note-taking tool
- All contributors who have dedicated time to improve this project
pyobsidian/
├── pyobsidian/
│ ├── __init__.py
│ ├── cli.py
│ ├── obsidian_helper.py
│ └── scripts/
│ ├── analyze_content.py
│ ├── archive_old_notes.py
│ ├── backup_and_export.py
│ ├── daily_note_generator.py
│ ├── extract_citations.py
│ ├── generate_index.py
│ ├── generate_reports.py
│ ├── google_calendar_integration.py
│ ├── identify_broken_links.py
│ ├── identify_duplicate_notes.py
│ ├── identify_empty_notes.py
│ ├── identify_unused_images.py
│ ├── incremental_backup.py
│ ├── knowledge_map.py
│ ├── link_analyzer.py
│ ├── manage_tasks.py
│ ├── merge_agenda_notes.py
│ ├── note_templating.py
│ ├── notify.py
│ ├── plugin_manager.py
│ ├── spaced_repetition.py
│ ├── sync_with_git.py
│ ├── tag_management.py
│ ├── visualize_data.py
│ └── voice_notes.py
├── tests/
│ ├── test_backup.py
│ ├── test_note_manager.py
│ ├── test_search.py
│ └── test_tag_manager.py
├── .gitignore
├── LICENSE
├── poetry.lock
├── pyproject.toml
└── README.md
- cli.py: Contains the main command-line interface using Click.
- obsidian_helper.py: Provides utility functions for interacting with Obsidian vaults.
- scripts/: Contains individual script files for each feature.
To add a new feature:
- Create a new script file in the
scripts/
directory. - Implement the main functionality in the new script.
- Add a new command in
cli.py
to expose the functionality. - Update the README.md with the new command and its description.
- Add tests for the new feature in the
tests/
directory.
- Follow PEP 8 guidelines for Python code style.
- Use type hints where appropriate.
- Write docstrings for all functions and classes.
- Maintain test coverage for new features.
We use pytest for testing. To run tests:
poetry run pytest
We use GitHub Actions for CI/CD. The workflow is defined in .github/workflows/main.yml
.
We use Semantic Versioning (SemVer) for version numbers. Update the version in pyproject.toml
when making releases.
- Keep this README.md up to date with new features and changes.
- Use inline comments for complex logic.
- Consider adding a more comprehensive documentation using Sphinx for larger features.
For more detailed information on each module and function, please refer to the inline documentation in the source code.