imdb-terminal 0.7.4 → 1.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +186 -52
  3. data/bin/imdb +2414 -782
  4. metadata +62 -26
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 8d391b3fb6db051666570ba1d988b6d97e8a77e4700722227f3bdf2f5ad4fa5e
4
- data.tar.gz: 8e2a1822d569b7381b12e661f0fda3386d49756838405aa4d5e1104c116cbd5c
3
+ metadata.gz: d763638e2b8cbd23494844067d5242ccbfa6a6fd86d7e14a8171c0ce7e4187ba
4
+ data.tar.gz: 8f4d96f2e04333d068d2910e041a853177200568364f21358c19456c89755b38
5
5
  SHA512:
6
- metadata.gz: 5869f3e01903ed9a0b1926b818ccedd8c315d64e63132887f63207195f6c4d96d12a5e6165d9fc3cfcd785b2dd05566dda4407a9f0132ad2724d338a6dd84176
7
- data.tar.gz: 1aace6cafc04b8856607294bb71aaba8d32333c037cba4e0507f230c1bbdd4c451c5d89acc69ec70fe7f815424108abbaf4b3c7f6001d0ab7661932279942279
6
+ metadata.gz: 44db85c8c4ae50dda526ddf147e10ed68f0e29190bcf1496db7517e3374e33c557e5963c3747588132ba1ddec7b7b0cb6bee386de3a7f169a850ada19348a603
7
+ data.tar.gz: f8367dfdd0a2580e6a8568e44b19cf9c5ba910792584056e7852fa67eca18057dc3f26e49409d3acfa37e86892089eb9d5b263c2ea79cb1ee54887004e04f51a
data/README.md CHANGED
@@ -1,58 +1,192 @@
1
+ # IMDb Terminal Browser
1
2
 
2
3
  ![Ruby](https://img.shields.io/badge/language-Ruby-red) [![Gem Version](https://badge.fury.io/rb/imdb-terminal.svg)](https://badge.fury.io/rb/imdb-terminal) ![Unlicense](https://img.shields.io/badge/license-Unlicense-green) ![Stay Amazing](https://img.shields.io/badge/Stay-Amazing-important)
3
4
 
4
- # IMDB for the terminal
5
- Finding the right moviie to watch or series to binge can be time consuming. My
6
- girlfriend asked if I could create an application that would cut down the time
7
- spent on searching in favor of time spent watching and cuddling. Meet
8
- IMDB for the terminal.
9
-
10
- Narrow down your preferences from a 1000 movies and almost 500 series. Select
11
- a minimum IMDB rating, range of production years, genres you like and dislike
12
- to get your preferred list. Get detailed information on movies and series and
13
- where you can stream them. Even the movie poster in the terminal.
14
-
15
- IMDB for the terminal uses three APIs - one to scrape IMDB for the top 1000
16
- lists, one to give you details on the movies and series and one to show you
17
- where you can stream it. When you first run the application, it will guide you
18
- through the process of registering free accounts and get the three API keys
19
- needed. I would be happy to keys in the application, but there is a limit to
20
- the number of calls each day, so you need your own keys. The key to scrape the
21
- IMDB top 1000 is via `page2api`. You will get a certain amounts of credits for
22
- free when you sign up, and it will last you a very long time since the program
23
- caches the movies and series lists. You could probably do well with refreshing
24
- the lists once per month or so (using the key `I`).
25
-
26
- As for the application itself, it's a terminal curses program that is best
27
- installed with `gem install imdb-terminal` and run the program `imdb`in the
28
- terminal. Or you can clone this repo and run the single file `imdb`. As usual,
29
- I try to keep the requirements to a minimum and the program to a single file.
30
-
31
- # Screenshot
5
+ <img src="img/logo.png" align="left" width="150" height="150"> A powerful Ruby-based terminal application for discovering and managing movies and TV series from IMDb's Top 250 lists and trending lists.
6
+
7
+ > *"Cut down the time spent on searching in favor of time spent watching and cuddling"*
8
+
9
+ ## ! NOTE
10
+ Version 1.1 is a complete rewrite of this IMDB application based on [rcurses](https://github.com/isene/rcurses) with a huge upgrade in functionality.
11
+
12
+ ## Features
13
+
14
+ ### Core Functionality
15
+ - **Browse IMDb Top 250** movies and TV series
16
+ - **Advanced filtering** by rating, year, and genres
17
+ - **Smart search** with preview mode for new content
18
+ - **Streaming information** via TMDb integration
19
+ - **Terminal poster display** using w3mimgdisplay
20
+ - **Wish and dump lists** for personal curation
21
+
22
+ ### Enhanced Search Experience
23
+ - **Two-step workflow**: Search Preview Add
24
+ - **Jump to existing items** from search results
25
+ - **Rich preview mode** with ratings, cast, plot, and streaming info
26
+ - **Duplicate detection** and removal
27
+ - **Re-fetch capability** for corrupted data
28
+
29
+ ### Data Management
30
+ - **Persistent caching** of movie/series data and posters
31
+ - **Background fetching** for smooth performance
32
+ - **Incremental updates** to refresh stale data
33
+ - **Export/import** via YAML configuration
34
+
35
+ ## Screenshot
32
36
  The screenshot gives you an overview of the layout of the panes:
33
37
  ![IMDB-terminal screenshot](img/screenshot.png)
34
38
 
35
- # Keymap
36
- Keys | Function
37
- -------------|--------------------
38
- TAB or S-TAB | Cycle panes (active is gray) or backwards
39
- Arrow keys | UP, DOWN, PgUP, PgDOWN, HOME, END in lists
40
- \+ or - | Depends on pane (intuitive)
41
- I | Load fresh IMDB data (be patient)
42
- m or s | Show MOVIES or SERIES
43
- r | Select MINimum IMDB rating (in bottom line)
44
- y or Y | Select MINimum or MAXimum production year
45
- / or \\ | Enter or clear search for movie/series title
46
- G | Set genres to match every movie/series
47
- d | Get details on selected movie/series
48
- D | Show where you can stream the movie/series
49
- R | Refresh all panes
50
- v | Show version (and latest RybyGems version)
51
- w or W | Write changes to config or save IMDB data
52
- q or Q | Quit w/saving config or w/o saving config
53
-
54
- # Suggestions and improvements
55
- If you have any suggestions for improvement or cool features, create an issue
56
- in this repository.
57
-
58
- For more stuff, check out https://isene.com
39
+ ## ✓ Installation
40
+ ```bash
41
+ gem install imdb-terminal
42
+ ```
43
+
44
+ ### Dependencies
45
+ - **w3mimgdisplay** (for poster display): `sudo apt install w3m-img`
46
+ - **ImageMagick** (for poster processing): `sudo apt install imagemagick`
47
+
48
+ ### Quick Start
49
+ ```bash
50
+ git clone <repository>
51
+ cd imdb
52
+ ruby imdb.rb
53
+ ```
54
+
55
+ ## ⚙️ Configuration
56
+
57
+ The application will guide you through initial setup:
58
+
59
+ 1. **First run**: Automatically scrapes IMDb Top 250 lists
60
+ 2. **TMDb API key** (optional): Enter your key for streaming provider information
61
+ 3. **Region selection**: Choose your country for streaming availability
62
+
63
+ Configuration is stored in `~/.imdb.yml` and data cache in `~/.imdb/data/`.
64
+
65
+ ### Getting TMDb API Key
66
+ 1. Sign up at [themoviedb.org](https://www.themoviedb.org)
67
+ 2. Go to Settings → API → Create → Developer
68
+ 3. Copy your API key and enter it when prompted (press 'k')
69
+
70
+ ## → Usage
71
+
72
+ ### Navigation
73
+ - **Tab**: Switch between panes (List/Genres/Wish/Dump)
74
+ - **↑/↓**: Navigate within current pane
75
+ - **+/-**: Add to Wish/Dump lists or toggle genre filters
76
+ - **Enter**: Refresh screen
77
+
78
+ ### Filtering
79
+ - **r**: Set minimum rating threshold
80
+ - **y/Y**: Set year range filters
81
+ - **l**: Toggle between Movies and Series view
82
+ - **o**: Toggle sort order (Rating/Alphabetical)
83
+
84
+ ### Search & Discovery
85
+ - **/**: Search IMDb for new content
86
+ - **Tab/Shift-Tab**: Navigate search results
87
+ - **Enter**: Preview detailed information
88
+ - **Enter again**: Add to library
89
+ - **Esc**: Return to search or cancel
90
+
91
+ ### Data Management
92
+ - **I**: Full refresh (re-scrape and download all)
93
+ - **i**: Incremental update (refresh missing data)
94
+ - **f**: Re-fetch current item details
95
+ - **v**: Verify data integrity (check for missing/incomplete data)
96
+ - **D**: Remove duplicate entries
97
+ - **L**: Load additional lists (popular movies, popular series, trending)
98
+
99
+ ### Settings
100
+ - **k**: Set TMDb API key
101
+ - **R**: Select streaming region
102
+ - **?**: Show help
103
+
104
+ ## ★ Advanced Features
105
+
106
+ ### Genre Filtering
107
+ In the Genres pane:
108
+ - **+**: Include genre (green +)
109
+ - **-**: Exclude genre (red -)
110
+ - **Space**: Clear genre filter
111
+
112
+ ### Smart Lists
113
+ - **Wish List**: Items you want to watch
114
+ - **Dump List**: Items to hide from main view
115
+ - Lists are separate for movies and series
116
+
117
+ ### Background Processing
118
+ - Data fetching happens in background for smooth UI
119
+ - Progress indicators for long operations
120
+ - Cancellable operations (press 'c')
121
+ - **Automatic verification** after bulk operations (I, L commands)
122
+ - **Duplicate prevention** when loading additional lists
123
+
124
+ ## = File Structure
125
+
126
+ ```
127
+ ~/.imdb/
128
+ ├── .imdb.yml # Configuration
129
+ └── data/
130
+ ├── list.json # Movie/series metadata
131
+ ├── details.json # Detailed information cache
132
+ └── *.jpg # Poster images
133
+ ```
134
+
135
+ ## ! Troubleshooting
136
+
137
+ ### Common Issues
138
+
139
+ **No posters displayed:**
140
+ - Ensure w3m-img is installed: `sudo apt install w3m-img`
141
+ - Check terminal supports images (works best in terminals like urxvt, kitty, iTerm2)
142
+
143
+ **Encoding errors:**
144
+ - Fixed automatically with built-in encoding handling
145
+
146
+ **Missing data:**
147
+ - Use 'f' to re-fetch current item
148
+ - Use 'i' for incremental cache refresh
149
+ - Use 'I' for complete data refresh
150
+ - Use 'v' to verify and fix data integrity issues
151
+
152
+ **Network timeouts:**
153
+ - Application includes retry logic and graceful error handling
154
+
155
+ ### Debug Information
156
+ Error logs are written to:
157
+ - `/tmp/imdb_fetch_errors.log`
158
+ - `/tmp/imdb_tmdb_debug.log`
159
+
160
+ ## ▩ Keyboard Reference
161
+
162
+ | Key | Action | Key | Action |
163
+ |-----|-------------------|-----|---------------------------|
164
+ | Tab | Switch panes | +/- | Wish/Dump or Genre filter |
165
+ | ↑/↓ | Navigate | r | Rating threshold |
166
+ | / | Search IMDb | y/Y | Year filters |
167
+ | f | Re-fetch item | l | Toggle Movies/Series |
168
+ | i | Refresh cache | o | Toggle sort order |
169
+ | I | Full refresh | k | TMDb API key |
170
+ | v | Verify data | R | Streaming region |
171
+ | D | Remove duplicates | L | Load more lists |
172
+ | ? | Help | q | Quit |
173
+
174
+ ## ? What's New
175
+
176
+ This enhanced version includes:
177
+ - **Smart search workflow** with preview mode
178
+ - **Jump-to-existing** items from search
179
+ - **Duplicate management** with one-key removal
180
+ - **Data verification system** with automatic post-operation checking
181
+ - **Additional list fetching** (popular + trending content) without duplicates
182
+ - **Re-fetch capability** for data correction
183
+ - **Improved encoding** handling for international content
184
+ - **Better UX** with compact UI and auto-refresh
185
+
186
+ ## © License
187
+
188
+ None. Borrow or steal whatever you want.
189
+
190
+ ---
191
+
192
+ *Enjoy discovering your next favorite movie or series! :-)*