Skip to content

zembutsu/erimil

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

320 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Erimil (ιΈγ‚Šθ¦‹γ‚‹)

A macOS image distillation tool β€” browse, curate, and refine image collections from ZIP archives, PDFs, and folders with iterative β˜… favorites workflow. Keyboard-driven, RTL-aware, privacy-first.

Why Erimil?

Most archive tools let you extract files. Most image viewers let you browse. Erimil does something different: iterative visual distillation.

photos.zip (100 images)
    β†’ Browse, mark β˜… favorites (protected from deletion)
    β†’ Export β†’ photos_opt.zip (50 images)
        β†’ β˜… metadata carried over β€” see what you liked before
        β†’ Refine selection, mark new β˜…
        β†’ Export β†’ photos_opt_opt.zip (20 images) = Best Selection

Each pass refines your collection. β˜… favorites are protected from deletion, and their metadata carries over to exported archives so you can build on previous rounds.

Features

  • Iterative Distillation: β˜… favorites with deletion protection and metadata carry-over on export
  • Multi-Format Sources: ZIP archives, folders, and PDFs β€” unified browsing
  • Spread View: Two-page display for books with RTL (right-to-left) support
  • Auto-Slide Mode: Automatic slideshow with multi-speed control and reverse playback
  • Animated GIF Playback: GIF files play in Viewer and Slide Modes with pause/loop control
  • Metadata Inspector: "i" key opens floating panel with image dimensions, format, and more
  • PDF Page Export: Export selected pages as optimized PDF, PNG folder, or PNG ZIP
  • Bookmarks (栞): Named position markers for quick navigation within sources
  • Tile-Based Thumbnail Cache: Fast re-opening of archives with persistent tile sheet cache
  • Keyboard-Driven: Every action reachable without a mouse
  • Privacy-First: No telemetry, no cloud, no network β€” your files stay local

Installation

Requirements: macOS 14.0 (Sonoma) or later

Download the latest release from GitHub Releases.

Erimil is open source. You can clone the repository and build it yourself with Xcode.

Quick Start

  1. Drag a folder containing ZIPs to the sidebar, or use File β†’ Open
  2. Click a source (ZIP / folder / PDF) to view thumbnails
  3. Navigate with arrow keys or WASD, mark favorites with F
  4. Select images to exclude with X (or keep, depending on mode)
  5. Click export to generate optimized archive

Selection Modes: Toggle between Exclude Mode (mark items to remove) and Keep Mode (mark items to retain) via the toolbar or Settings.

Viewer Modes: Press Enter or R for Viewer Mode with thumbnail sidebar, Ctrl+F for fullscreen Slide Mode. Press Space for Auto-Slide (automatic slideshow).

πŸ“– Full Keyboard Shortcuts Reference

Common Navigation (All Viewer Modes)

All navigation keys are RTL-aware β€” they follow "physical key position = visual screen position" principle.

Key Action
← β†’ ↑ ↓ / WASD Navigate images
Z / C Previous / Next favorite β˜…
Ctrl+A / Ctrl+D Jump to first / last image
Ctrl+Z / Ctrl+C Jump to first / last favorite
Cmd+1/2/3/4/5 Jump to 0% / 25% / 50% / 75% / 100%
Ctrl+Option+←/β†’ N-step jump (configurable in Settings)
Ctrl+R Toggle reading direction (LTR ↔ RTL)
Shift+S Add / delete bookmark (栞)
Shift+A / Shift+D Previous / Next bookmark
Shift+B Bookmark list overlay

Filer View (Thumbnail Grid)

Key Action
X Toggle selection
Cmd+A Select all / Deselect all
F Toggle favorite β˜…
V Toggle single page marker
Enter / R Open Viewer Mode
Ctrl+F Open Slide Mode
Ctrl+W/S or Ctrl+↑/↓ Previous / Next source
Ctrl+Option+←/β†’ N-step jump (configurable)

Viewer Mode

Key Action
X Toggle selection
F Toggle favorite β˜…
V Toggle single page marker
I Toggle metadata inspector
L Toggle loop (animated GIF only)
T Cycle thumbnail position
Space Auto-Slide start/stop
Shift+Space Reverse Auto-Slide
Enter Open Slide Mode
Q / R / Esc Close (return to Filer)
Ctrl+W/S or Ctrl+↑/↓ Previous / Next source

Slide Mode (Fullscreen)

Key Normal Mode Favorites Mode
← β†’ ↑ ↓ / WASD Previous/Next image Previous/Next β˜…
Z / C Previous/Next β˜… Previous/Next β˜…
Tab Next β˜… + Enter Favorites Mode Next β˜…
F Toggle favorite β˜… Toggle favorite β˜…
X Toggle selection Toggle selection
V Toggle single page marker Toggle single page marker
I Toggle metadata inspector Same
L Toggle loop (animated GIF only) Same
Q Exit fullscreen Exit Favorites Mode
Esc Exit fullscreen Exit fullscreen
Ctrl+W/S or Ctrl+↑/↓ Previous/Next source Same
Ctrl+T Cycle thumbnail position Same
Shift+S Add/delete bookmark (栞) Same
Shift+A / Shift+D Previous/Next bookmark Same
Shift+B Bookmark list overlay Same
Space Auto-Slide start/stop Same
Shift+Space Reverse Auto-Slide Same
O Toggle controls overlay Same

Sidebar Navigation

Action Result
Single-click Select source, show thumbnails
Double-click Select source + open Slide Mode

Advanced Features

Favorites System (β˜…)

Press F to mark an image as β˜… favorite. Favorites are protected from deletion in Exclude mode β€” selecting a β˜… image shows a "PROTECTED" label and the selection is blocked.

Favorites metadata is carried over when exporting, so you can see your previous selections when reopening an exported archive. This enables iterative refinement across multiple export passes.

Bookmarks (栞) System

Bookmarks are named position markers within a source for quick navigation.

  • Shift+S: Add a bookmark at current position (with custom name) or delete existing bookmark
  • Shift+A/D: Navigate between bookmarks (wraps around, RTL-aware)
  • Shift+B: Open bookmark list overlay for browsing and jumping
  • Grid View: Bookmark dividers appear as section headers between thumbnails

Bookmarks are stored per-source and persist across sessions. Mnemonic: Shift = Shiori (栞).

Spread View (Two-Page Display)

Enable in Settings to display two pages side-by-side β€” ideal for book reading.

  • RTL (right-to-left) direction support for Japanese vertical text
  • Wide images automatically displayed as single pages
  • Press V to manually mark/unmark pages as single
  • Per-source settings for reading direction and single page markers

PDF Export

For PDF sources, the export button offers three formats:

Format Output Use Case
PDF (primary) {name}_opt.pdf Selected pages as new PDF
PNG folder {name}_pages/ Individual PNG files (300dpi)
PNG ZIP {name}_png.zip PNG files packaged in ZIP (300dpi)

Exported pages preserve original page numbers (e.g., page_001.png, page_003.png with gaps where pages were excluded). Metadata (β˜… favorites, 栞 bookmarks, reading direction, markers) is carried over to the new file.

Slide Mode Details

Position Indicators: Image position bar shows current position with β˜… and Γ— markers. Source position bar shows position among sibling sources in the directory.

Favorites Mode: Press Tab to enter β€” navigation keys move between favorites only. Yellow header indicates active. Press Q to exit back to normal navigation.

Source Navigation: Ctrl+W/S or Ctrl+↑/↓ switches between sources while maintaining fullscreen state. Loops from last to first.

Position Jump: Ctrl+A/D for first/last, Ctrl+Z/C for first/last favorite, Cmd+1-5 for percentage positions. All jumps are RTL-aware.

Auto-Slide Mode

Automatic slideshow with tap-counted speed control:

Action Result
Space Γ— 1 Start Normal speed
Space Γ— 2 (within 0.3s) Switch to Fast
Space Γ— 3 (within 0.3s) Switch to Turbo
Shift+Space Reverse direction
Space (while running) Stop

Works in both Viewer and Slide Modes. In Favorites Mode, Auto-Slide advances through β˜… only. Loops at source boundary (configurable in Settings).

Animated GIF Playback

GIF files are played automatically in Viewer and Slide Modes. Grid thumbnails show a [β–Ά] badge for animated entries.

Key Action
Space Pause / Resume playback
L Toggle loop On/Off (Off = stop after current cycle)

When an animated image is displayed, Space controls playback instead of Auto-Slide.

Metadata Inspector

Press I in Viewer or Slide Mode to open a floating panel showing image metadata (dimensions, file size, color space, format). The panel is draggable, resizable, and remembers its position across sessions.

Data Storage

Erimil stores cache and favorites in the sandboxed container:

~/Library/Containers/jp.pocketstudio.zem.Erimil/Data/Library/Application Support/Erimil/
β”œβ”€β”€ cache/                      # Thumbnail cache (disk, .ecache format)
β”œβ”€β”€ tilesheets/                 # Tile-based thumbnail cache for archives
β”œβ”€β”€ index.json                  # Path hash β†’ content hash mapping
β”œβ”€β”€ favorites_hybrid.json       # Favorites data
β”œβ”€β”€ bookmarks.json              # Per-source bookmarks (栞)
β”œβ”€β”€ source_settings.json        # Per-source settings (direction, markers)
└── last_folder_bookmark.data   # Security-scoped bookmark for folder restoration

Development Philosophy & AI Usage

This project was developed with assistance from Claude AI (Anthropic). I want to be transparent about this approach and my reasoning.

Standing on the Shoulders of Giants

I've been fortunate to work with open source technologies for over 30 yearsβ€”from the early internet days to Linux, Virtualization, Cloud Computing, Docker, and beyond. The knowledge and code shared freely by countless developers made my career possible. Using AI trained on open source code without acknowledgment would feel like forgetting where I came from.

Learning, Not Replacing

I used AI as a learning accelerator to explore SwiftUI, a framework I hadn't worked with before:

  • I identified the problem (visual preview and selective extraction of images from ZIP archives)
  • I defined all requirements and architectural decisions
  • AI generated initial code structures and API examples
  • I read and understood every line of generated code
  • I debugged, refined, and made all final decisions

This mirrors how I learned in the 1990s: reading others' code, asking questions in forums, and building on shared knowledge. The tools changed, but the learning process remains the same.

Why Share This?

Transparency: The community deserves to know how projects are built, especially when new tools are involved.

For students: If you're learning to code, know that using AI as a learning tool is okayβ€”as long as you understand what you're building. Don't copy-paste. Read, understand, modify, and make it yours.

For fellow developers: I don't claim this is the "right" way. It's simply my way of balancing learning new technologies with years of experience in software development. Your approach may differ, and that's perfectly valid.

A Note of Respect

To developers who built their skills entirely through manual effort: I deeply respect that path. This isn't about claiming my approach is superiorβ€”it's about being honest regarding the tools I used. The open source community thrives on honesty, sharing, and mutual respect. I hope this project reflects those values, even if the development process looks different from what came before.

Contributing

Contributions are welcome! This project was created as a practical solution to a real problem, and maintained as a learning resource.

  • Simplicity First: Resist feature creep
  • Privacy Matters: No telemetry, no cloud
  • Readable Code: Clear over clever
  • User Agency: Give users control

Acknowledgments

Development Support

  • ZIPFoundation for reliable ZIP archive handling
  • The macOS developer community for comprehensive documentation and helpful discussions
  • Apple's engineering teams for SwiftUI and the macOS sandbox security model

Related Tools

  • kurumil β€” Companion tool for image compression and AI upscaling

License

MIT License β€” Masahito Zembutsu / @zembutsu

About

A macOS application for visual preview and selective extraction of images from ZIP archives.

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors