Open
Conversation
Adding CLAUDE.md with task information for AI processing. This file will be removed when the task is complete. Issue: #13
- Add convertGoogleDriveUrl() function to detect and convert Google Drive URLs to direct download links - Support both /view and non-/view URL formats - Update image handler to directly download images from Google Drive instead of taking screenshots - Update HTML handler to generate simple HTML page for Google Drive images - Update markdown handler to fetch content from converted Google Drive URLs - Add comprehensive E2E tests for all three endpoints (/image, /html, /markdown) with Google Drive URLs - Add unit tests for URL conversion function with edge cases Fixes #13 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This reverts commit d469aab.
Collaborator
Author
🤖 Solution Draft LogThis log file contains the complete execution trace of the AI solution draft process. 💰 Cost estimation:
Now working session is ended, feel free to review and add any feedback on the solution draft. |
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.
Summary
This PR implements support for extracting images from public Google Drive links, as requested in issue #13. The implementation now correctly handles both
/viewand non-/viewURL formats, converting them to direct download links.Changes Made
Core Functionality (
src/lib.js):convertGoogleDriveUrl()function to detect and convert Google Drive URLs to direct download formathttps://drive.google.com/file/d/{FILE_ID}/viewhttps://drive.google.com/file/d/{FILE_ID}https://drive.google.com/open?id={FILE_ID}Image Endpoint (
src/image.js):HTML Endpoint (
src/html.js):Markdown Endpoint (
src/markdown.js):Testing
Unit Tests (
tests/unit/convertGoogleDriveUrl.test.js):E2E Tests (
tests/e2e/google-drive.test.js):/viewand non-/viewformatsTest Results
All tests passing locally:
Specifically for Google Drive:
Verified Functionality
Tested with the exact URLs from issue #13:
https://drive.google.com/file/d/1Cxkx6-428EQAX0-eiaq66H829ohnPp7q/viewhttps://drive.google.com/file/d/1Cxkx6-428EQAX0-eiaq66H829ohnPp7q(without /view)https://drive.google.com/file/d/1fgJaftjv53xCN7vgiJOaQlbfWkUqPgyd/viewhttps://drive.google.com/file/d/1fgJaftjv53xCN7vgiJOaQlbfWkUqPgyd(without /view)All endpoints (
/image,/html,/markdown) correctly extract content from these URLs.Closes #13
🤖 Generated with Claude Code