Skip to content

Conversation

@myjeong19
Copy link
Member

@myjeong19 myjeong19 commented Mar 24, 2025

Overview

This PR implements a comprehensive system for extracting, processing, and filtering metadata from bookmark blocks in Notion. The implementation extends the Notion API SDK to transform standard bookmark blocks into enhanced notionpress_bookmark blocks with rich metadata.

Key Features

  • Type Extension: Added NotionpressBookmarkBlock type that extends standard Notion blocks with enhanced metadata capabilities

  • Metadata Extraction: Implemented HTML parsing using Cheerio to extract rich metadata from bookmarked web pages

  • Intelligent Default Fields: Set up default metadata fields (title, url, description, favicon, image) that are always included

  • Flexible Field Filtering: Added ability for users to specify which metadata fields to include via the --fields option

  • Error Handling: Robust error handling for URL fetching and HTML processing failures

Implementation Details

  • Created a clean, modular architecture for bookmark processing

  • Used preprocessors for consistent metadata cleaning and formatting

  • Ensured backward compatibility with the original Notion API

  • Implemented a recursive processing method to handle nested bookmark blocks

  • Fixed ESM module compatibility issues with proper file extensions

@Moon-DaeSeung

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant