Skip to content

Conversation

rkristelijn
Copy link
Owner

Closes #10

What's New

Repository listings now show README descriptions for better context:

Before:

0: white-hat-hacking
1: todo-md
2: supabase-keycloak-auth

After:

0: white-hat-hacking - Ethical Hacking Findings Collection
1: todo-md - A tool for the TODO.md standard
2: supabase-keycloak-auth - NextJS Supabase Keycloak example

Features

  • Smart README detection - supports README.md, readme.md, README.txt
  • Intelligent parsing - skips HTML comments, badges, empty headers
  • Project name filtering - avoids redundant repo name display
  • Truncation - long descriptions capped at 80 chars with '...'
  • Graceful fallbacks - shows repo name only if no README found
  • Works everywhere - both --list and interactive modes

Testing

  • 28/28 tests passing
  • 3 new tests for README preview functionality
  • Comprehensive edge case coverage

Ready to merge!

- Add getReadmePreview() function to extract first meaningful line from README files
- Support README.md, readme.md, README.txt, readme.txt
- Filter out HTML comments, badges, and empty headers
- Skip project name if it matches repository name
- Truncate long descriptions to 80 characters with '...'
- Update both --list and interactive modes to show previews
- Add 3 comprehensive tests for the new functionality

Example output:
0: white-hat-hacking - Ethical Hacking Findings Collection
1: todo-md - A tool for the TODO.md standard

Closes #10
- Increase default search depth to better handle nested directory structures
- Now finds repos in ~/git/hub AND ~/git/lab by default
- Update help text to reflect new default
- Resolves issue where repos at depth 3+ were missed

Before: 58 repos found (only ~/git/hub)
After: 134 repos found (~/git/hub + ~/git/lab + others)
- Remove markdown links [text](url) -> text for cleaner display
- Example: 'A tool for the [TODO.md](https://github.com/todo-md/todo-md) standard'
  becomes 'A tool for the TODO.md standard'
- Add test for markdown link stripping
- Fix test to expect new default maxDepth of 5

All 29 tests passing ✅
- Add previewLength config option (default: 80)
- Strip non-alphanumeric chars except spaces, dots, hyphens
- Pass config.previewLength to getReadmePreview function
- Add previewLength to default config creation
- Add 2 tests for character filtering and custom length

Example config:
{
  "previewLength": 50  // Shorter previews
}

All 31 tests passing ✅
@rkristelijn rkristelijn merged commit d9b26fc into main Sep 24, 2025
5 checks passed
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.

📖 Add README Preview to Repository Overview

1 participant