Parse, check, and reorganize Chrome bookmarks with AI-powered intelligent categorization
Organize and categorize Chrome bookmarks using Python. Parse exported bookmark HTML files, check URL accessibility, use AI for intelligent categorization, and generate reorganized bookmark files.
Install the package in development mode:
```bash
pip install -e ".[dev]"
uv sync --dev
```
Configure environment variables for AI classification:
```bash
cp .env.example .env
```
```bash
python -m bookmark_organizer --input bookmarks.html --output organized.html
python -m bookmark_organizer --cache bookmarks_cache.json --input bookmarks.html --output organized.html
python -m bookmark_organizer --verbose --input bookmarks.html --output organized.html
python -m bookmark_organizer --max-workers 20 --request-timeout 15 --input bookmarks.html
```
```bash
python -m bookmark_organizer --help
python -m bookmark_organizer --version
python -m bookmark_organizer --export-cache cache.json --input bookmarks.html
python -m bookmark_organizer --import-cache cache.json --input bookmarks.html
```
The tool follows a pipeline architecture with five core modules:
1. **Parser** (`parser.py`) - Extracts bookmarks from Chrome HTML exports
2. **Checker** (`checker.py`) - Validates URL accessibility with concurrent processing
3. **Classifier** (`classifier.py`) - Categorizes bookmarks using AI or keyword-based rules
4. **Generator** (`generator.py`) - Creates reorganized HTML bookmark files
5. **Models** (`models.py`) - Pydantic data models with validation
```
HTML Input → Parser → Checker → Classifier → Generator → HTML Output
↓
[Cache] ←─────────────────────────┘
```
```bash
python -m pytest tests/
python -m pytest tests/ --cov=src/bookmark_organizer --cov-report=html
python -m pytest tests/test_models.py -v
python -m pytest tests/test_models.py::TestBookmarkItem::test_init_basic
```
```bash
ruff check .
ruff format .
mypy src/
ruff check . && ruff format . && mypy src/
```
Set these in `.env` file:
Check configuration:
```bash
python examples/env_usage_example.py
```
1. Create module in `src/bookmark_organizer/`
2. Add tests in `tests/test_<module>.py`
3. Update exports in `__init__.py`
4. Add CLI options if needed (in `cli.py`)
5. Update documentation
Edit `src/bookmark_organizer/config.py`:
```python
class AppConfig(BaseModel):
new_option: int = Field(default=10, description="Description")
```
```python
def test_new_feature(self) -> None:
"""Test description"""
# Arrange
input_data = ...
# Act
result = function_under_test(input_data)
# Assert
assert result == expected_value
```
Leave a review
No reviews yet. Be the first to review this skill!
# Download SKILL.md from killerskills.ai/api/skills/bookmark-organizer/raw