Skip to content

Comments

feat: add smart file renaming with AI and EXIF analysis (Vibe Kanban)#3

Merged
d1maash merged 2 commits intomainfrom
vk/cff0-
Jan 24, 2026
Merged

feat: add smart file renaming with AI and EXIF analysis (Vibe Kanban)#3
d1maash merged 2 commits intomainfrom
vk/cff0-

Conversation

@d1maash
Copy link
Owner

@d1maash d1maash commented Jan 24, 2026

Summary

This PR adds a smart file renaming feature that automatically converts unreadable filenames (like IMG_20240315_123456.jpg) into meaningful, human-readable names (like Анталья - Март 2024.jpg) using EXIF metadata and AI analysis.

Changes Made

New Files

  • src/ai/smart-renamer.ts - Core service for intelligent filename generation
  • src/utils/geocoding.ts - Offline reverse geocoding utility with 150+ cities database

Modified Files

  • src/cli.ts - Added new sortora rename command

Features

SmartRenamer Service

  • Detects unreadable filename patterns (IMG_, DSC_, PXL_*, WhatsApp files, etc.)
  • Extracts date and GPS coordinates from EXIF metadata
  • Converts GPS coordinates to city/country names using offline geocoding
  • Uses AI classification to determine content type (photo, screenshot, document, etc.)
  • Supports OCR for reading text from images
  • Batch renaming with automatic grouping by date and location

Offline Reverse Geocoding

  • Database of 150+ major cities worldwide (Russia, CIS, Europe, USA, Asia, popular resorts)
  • Finds nearest city within 100km radius
  • No external API calls required - fully offline

CLI Command

sortora rename <path> [options]

Options:
  -d, --deep      # Recursive search
  --ai            # Use AI for classification
  --ocr           # OCR for reading text from images
  --dry-run       # Preview without making changes
  --auto          # Automatic renaming
  --event <name>  # Specify event/trip name
  --lang <lang>   # Language (ru/en)
  --json          # JSON output

Example Transformations

Before After
IMG_20240315_123456.jpg Анталья - Март 2024.jpg
DSC_4521.jpg Стамбул - Апрель 2024 (2).jpg
Screenshot_20240315.png Снимок экрана 2024-03-15 14-30.png

Usage Examples

# Preview renames
sortora rename ~/Photos --dry-run

# Rename vacation photos
sortora rename ~/Photos/Turkey --event "Отпуск Турция" --auto

# With AI analysis
sortora rename ~/Downloads --ai --deep

This PR was written using Vibe Kanban

- Add SmartRenamer service for intelligent filename generation
- Add offline reverse geocoding utility with 150+ cities database
- Add CLI command 'sortora rename' with interactive and auto modes
- Support EXIF date extraction, GPS location detection
- Support AI classification and OCR text recognition
- Support batch renaming with grouping by date/location

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@d1maash d1maash changed the title Реализуй мне эту функцию: (vibe-kanban) feat: add smart file renaming with AI and EXIF analysis Jan 24, 2026
@d1maash d1maash changed the title feat: add smart file renaming with AI and EXIF analysis feat: add smart file renaming with AI and EXIF analysis (Vibe Kanban) Jan 24, 2026
@d1maash d1maash merged commit 51aaebb into main Jan 24, 2026
0 of 9 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.

1 participant