feat: add thread retrieval and automatic thread splitting #52
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 two major thread-related features for the
sskytool:Changes
New Files
src/ssky/thread_data.py: Represents a single thread with flattened post structuresrc/ssky/thread_data_list.py: Holds multiple ThreadData objectstests/test_thread.py: Comprehensive test suite with 9 test casesModified Files
src/ssky/get.py: Added--threadsupport with thread retrieval logicsrc/ssky/post.py: Added automatic thread splitting for long posts (>300 chars)src/ssky/main.py: Added--thread,--thread-depth,--thread-parent-height,--no-splitoptionssrc/ssky/result.py: AddedInvalidOptionCombinationErrorandTooLongForThreadErrortests/test_get.py: Fixed parameter names (param=→target=)README.md: Added thread retrieval and splitting documentationCLAUDE.md: Updated architecture documentationFeature 1: Thread Retrieval (#47)
Command Line Options
Supported Targets
The
--threadoption works with ALL target types:ssky get --threadssky get user.bsky.social --threadssky get did:plc:xxx --threadssky get at://... --threadOutput Formatting
-S,-I): Reply lines prefixed with"| "-L,-T): Posts within thread separated by"|", independent threads by"----------------"InvalidOptionCombinationError(cannot be used with--thread)Usage Examples
Feature 2: Thread Splitting (#51)
Automatic Thread Splitting
Posts exceeding 300 characters are automatically split into threads:
Facet Preservation
Opt-out Option
Limits
TooLongForThreadErrorif message would require 100+ postsTesting
All tests pass (130 total):
tests/test_thread.pyImplementation Details
Thread Retrieval
--threadis specifiedThread Splitting
Commits
Related Issues
Closes #47
Closes #51