feat: simplify CLI usage with auto page discovery and smart file naming#7
Open
myjeong19 wants to merge 9 commits intonotionpresso:mainfrom
Open
feat: simplify CLI usage with auto page discovery and smart file naming#7myjeong19 wants to merge 9 commits intonotionpresso:mainfrom
myjeong19 wants to merge 9 commits intonotionpresso:mainfrom
Conversation
…9/cli into feat/simplify-cli-usage
…tion\n\n- Enforce max length in sanitizeFileName with safe fallback\n- Avoid trailing dashes after truncation
… Defer mkdir to per-image write path\n- Skip directory creation if no image is downloaded
Member
Author
|
Contributor
Moon-DaeSeung
left a comment
There was a problem hiding this comment.
I'm currently reviewing other tasks, but it's difficult to understand the actual changes here since formatting updates to unrelated files are included. Could you please separate the formatting changes from the main feature or bugfix? This will make the review process much clearer. Thanks!
Member
Author
sure, i’ll wrap this up by tomorrow morning. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description of Changes
Here is reference: @notionpresso/notionpresso-react #25
Summary
This PR revolutionizes CLI UX by eliminating manual page URL input and implementing automatic page discovery with
--alloption. Also introduces title-based file naming for better developer experience.File naming structure changed from ID-based to title-based.
abc123def456.jsonmy-blog-post.jsonAction required: Delete existing
notion-data/folder and re-run CLI.What Changed & Why
Problem
Solution
--alloption finds all accessible pages via Search APINOTION_API_KEYfrom.envfileImplementation Details
pages.jsonfor frontend integration.envsupportDocumentation
Review Needed
API reliability concern: Search API may not discover all pages due to Notion limitations. Should we add a fallback method or document this limitation?
Quick Test
Next.js Integration Testing
Review Guide
Reviews are conducted based on priority levels, such as p0, p1, p2, p3, p4, and p5.
p0 ~ p2: If the author decides not to reflect a review for p0 to p2, it signals that a proper discussion with the reviewer is
necessary. It is expected
that the review will be resolved either through incorporating the feedback or through further discussion.
p3: indicates that the reviewer has identified a significant issue, but either lacks a clear solution or the comment lacks sufficient context. Further explanation or additional discussion on the reviewer's concerns is needed.
p4, p5: p4 and p5 suggest low priority, and if the author does not deem them important, these comments can be disregarded.