Add Karakeep export command with comprehensive functionality #3
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
Add a new
exportcommand to sync Pocket bookmarks to Karakeep via REST API. This provides a complete solution for exporting Pocket data to external bookmark management systems with robust error handling, retry logic, and user-friendly features.New Export Command Features
🚀 Core Functionality
pocket-to-sqlite exportcommand with comprehensive options🛡️ Robust Error Handling
🎯 Advanced Filtering & Options
🔧 Authentication & Configuration
karakeep_tokenandkarakeep_base_urlto existing auth patternTechnical Implementation
KarakeepClient API Integration
Field Mapping
resolved_titleorgiven_title→titleexcerpt→summaryresolved_urlorgiven_url→urltype→"link"(constant)Error Recovery Features
Usage Examples
Basic Export
Advanced Filtering
Batching & Resume
Preview & Testing
Authentication Setup
Extend existing
auth.jsonfile:{ "pocket_consumer_key": "...", "pocket_access_token": "...", "karakeep_token": "your-karakeep-api-token", "karakeep_base_url": "https://your-karakeep-instance.com" }Testing & Quality
Comprehensive Test Coverage
Real-World Validation
Files Changed
pocket_to_sqlite/cli.py- New export command with full CLI interfacepocket_to_sqlite/utils.py- KarakeepClient and export functionalitytests/test_save_pocket.py- Comprehensive test coverageREADME.md- Complete documentation with examplesBreaking Changes
None. This is a purely additive feature that extends existing functionality without modifying current behavior.
Performance & Reliability
Ready for Production
This implementation provides enterprise-grade reliability with:
🤖 Generated with Claude Code
Co-Authored-By: Claude noreply@anthropic.com