awesome-python
awesome-python copied to clipboard
Sort README entries alphabetically
Summary
This PR adds an automated sorting script that organizes README entries alphabetically, making it easier for users to find Python libraries and for maintainers to manage the list.
Motivation
The current README has libraries scattered throughout sections without alphabetical order, making it difficult for users to quickly locate specific tools. This script automates the sorting process and maintains consistency.
Key Features
- 🔤 Alphabetical Sorting: Automatically sorts all library entries within their categories
- 📄 PDF Generation: Creates professional PDF versions for offline reading
- 🏗️ Structure Preservation: Maintains existing README structure and formatting
- 🔧 Cross-platform: Works on Windows, macOS, and Linux
- 📱 Multiple Output Formats: Supports ReportLab PDF and HTML-to-PDF conversion
Files Added/Modified
sort.py- Main sorting script with comprehensive documentationrequirements.txt- Added dependencies for PDF generationmkdocs.yml- Updated configuration for PDF export capabilityREADME.md- Sorted all entries alphabetically while preserving structuredocs/css/pdf.css- Styling for PDF generation
Technical Implementation
- Dual Sorting Approach: Line-based and section-based sorting algorithms
- Indentation-Aware: Preserves nested list structures
- Link-Safe Processing: Maintains all markdown links and descriptions
- Error Handling: Comprehensive error checking and user feedback
Usage Examples
# Basic README sorting
python sort.py
# Generate professional PDF
python sort.py --pdf
# Create HTML for browser-based PDF conversion
python sort.py --html
Thanks @poteakshay241