Thank you for considering contributing to OneNoteXML! This document provides guidelines for contributing to the project.
Found a bug? Please open an issue and include:
- Windows version (e.g., Windows 10, Windows 11)
- OneNote version (must be 2010-2013 desktop edition)
- Python version (
python --version) - Installation method (pip, git clone, etc.)
- Full error logs from
logs/directory (redact personal info) - Console output showing the complete error message
- Notebook structure (number of sections, pages, images)
If possible, provide:
- Sample XML file (you can redact content, keep structure)
- Steps to reproduce the issue
- Expected vs. actual behavior
Note: Please check existing issues before creating a new one.
We welcome feature requests! Please open an issue describing:
- What you're trying to achieve - Your use case
- Why current functionality doesn't work - What's missing
- Proposed solution - How you envision it working
- Alternatives considered - Other approaches you've thought about
OneNoteXML focuses on:
- Direct XML extraction from OneNote COM API
- Conversion to Obsidian and Logseq formats
- Image extraction via CallbackID mechanism
- Windows-based OneNote 2010-2013 desktop
Out of scope:
- OneNote cloud/web versions (no COM API)
- Cross-platform support (COM API is Windows-only)
- Real-time sync (this is a one-time migration tool)
- Other output formats (focus is Obsidian/Logseq)
-
Fork the repository
# On GitHub: Click "Fork" button -
Clone your fork
git clone https://github.com/YOUR_USERNAME/OneNoteXML.git cd OneNoteXML -
Create a virtual environment (optional but recommended)
python -m venv venv venv\Scripts\activate # Windows
-
Install dependencies
pip install -r requirements.txt
-
Create a feature branch
git checkout -b feature/your-feature-name
- Follow PEP 8 style guide
- Use descriptive variable names (
page_contentnotpc) - Add docstrings to all functions and classes
- Keep functions focused (single responsibility)
def extract_page_title(xml_root: ET.Element) -> str:
"""
Extract page title from OneNote XML root element.
Args:
xml_root: Parsed XML root element
Returns:
Page title as string, or "Untitled" if not found
"""
# Implementation...- Use descriptive parameter names
- Add comment-based help at top of script
- Handle errors gracefully (don't crash on missing images)
Use clear, descriptive commit messages:
# Good
git commit -m "Fix image extraction for PNG files with transparency"
git commit -m "Add support for nested table structures"
# Less good
git commit -m "fix bug"
git commit -m "update"- Update documentation if you changed functionality
- Test with real OneNote notebooks (see Testing section)
- Update CHANGELOG.md with your changes
- Push to your fork
git push origin feature/your-feature-name
- Open a Pull Request on GitHub
- Describe what you changed and why
- Reference any related issues (#123)
- Include test results
Since OneNoteXML requires OneNote COM API, testing requires:
- Windows OS
- OneNote 2010-2013 desktop edition
- Python 3.8+
Before submitting a PR, test with:
-
Multiple notebook types
- Personal notebooks (diary, journal)
- Work notebooks (structured, hierarchical)
- Mixed content (text, images, tables, lists)
-
Both output formats
- Obsidian vault generation
- Logseq graph generation
-
Image handling
- Notebooks with many images
- Different image types (PNG, JPG, GIF)
- Embedded vs. attached images
-
Edge cases
- Empty sections
- Pages with no title
- Special characters in filenames
- Very long page names
# Check requirements
python onenotexml.py --check-only
# Test extraction with a small notebook
python onenotexml.py "TestNotebook" --format obsidian
# Test Logseq format
python onenotexml.py "TestNotebook" --format logseq
# Check logs for errors
cat logs/*.logAll requirements met
[1/3] Exporting XML from OneNote...
XML export completed
[2/3] Converting to obsidian format...
Obsidian conversion completed
[3/3] Extracting images...
Image extraction completed
Images copied: Y of X
[Verification]
Created X markdown files
Copied Y images to vault
- Code documentation - Docstrings in Python files
- User documentation - README.md, README_USAGE.md
- Research documentation - Files in
docs/directory
If you change functionality:
- README.md - Update feature list, examples, or requirements
- README_USAGE.md - Update usage instructions
- CHANGELOG.md - Add entry for your change
- Docstrings - Keep function documentation accurate
- Use bold for UI elements and important concepts
- Use
code formattingfor commands and file paths - Include examples showing real usage
- Keep it concise - users want quick answers
- General questions - Open a GitHub Discussion
- Bug reports - Open an Issue
- Feature ideas - Open an Issue with "Feature Request" label
This is a personal project maintained in spare time. I'll do my best to respond within:
- Critical bugs - 1-3 days
- Feature requests - 1-2 weeks
- General questions - 1 week
If you're stuck:
- Check the README.md troubleshooting section
- Search existing issues
- Look at
docs/for technical deep-dives - Open a new issue with details
We want OneNoteXML to be a welcoming project for everyone. We pledge to:
- Be respectful and inclusive
- Welcome newcomers and help them contribute
- Focus on what's best for the community
- Accept constructive criticism gracefully
- Personal attacks or insults
- Harassment of any kind
- Publishing others' private information
- Spam or off-topic comments
If you experience or witness unacceptable behavior, please contact the project maintainer. Violations may result in temporary or permanent ban from the project.
By contributing to OneNoteXML, you agree that your contributions will be licensed under the MIT License.
Every contribution helps make OneNoteXML better for everyone trying to migrate from OneNote. Whether you:
- Report a bug
- Suggest a feature
- Fix a typo
- Write code
Your help is appreciated.