Skip to content

feat. Improve Notion Bookmark Block Metadata Processing #5

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

myjeong19
Copy link
Member

@myjeong19 myjeong19 commented Mar 24, 2025

This PR enhances the functionality of processing Notion bookmark blocks in the CLI tool:

Type Transformation:

  • Implemented transformation of regular bookmark type to notionpresso_bookmark type
  • Added logic to remove the original bookmark property after transformation to avoid data duplication

Metadata Field Management:

  • Added default fields (title, url, description, favicon, image) when using the --meta option without --fields
  • Prepared the CLI to support selective field extraction through the --fields option
  • Note: Complete field filtering requires additional changes in the API SDK
// default
npm run cli -- --page "pageId" --auth "secret_key" --meta

// custom
npm run cli -- --page "pageId" --auth "secret_key" --meta --fields "title,url,description,author,site_name,domain,locale"

Screenshot 2025-03-24 at 19 55 54

@myjeong19
Copy link
Member Author

myjeong19 commented Mar 24, 2025

todo

I need to publish the @notionpresso/api-sdk to npm and install it.

@Moon-DaeSeung
Copy link
Contributor

I found unnecessary file changed (maybe linting), you should check linting rule

@myjeong19
Copy link
Member Author

I found unnecessary file changed (maybe linting), you should check linting rule

I added Prettier configuration to ensure consistent formatting and prevent unnecessary file changes.

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.

2 participants