imdb-sqlite 1.2.0__py3-none-any.whl → 2.0.0__py3-none-any.whl
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.
- imdb_sqlite/__main__.py +2 -2
- {imdb_sqlite-1.2.0.dist-info → imdb_sqlite-2.0.0.dist-info}/METADATA +5 -5
- imdb_sqlite-2.0.0.dist-info/RECORD +8 -0
- imdb_sqlite-1.2.0.dist-info/RECORD +0 -8
- {imdb_sqlite-1.2.0.dist-info → imdb_sqlite-2.0.0.dist-info}/WHEEL +0 -0
- {imdb_sqlite-1.2.0.dist-info → imdb_sqlite-2.0.0.dist-info}/entry_points.txt +0 -0
- {imdb_sqlite-1.2.0.dist-info → imdb_sqlite-2.0.0.dist-info}/licenses/LICENSE +0 -0
- {imdb_sqlite-1.2.0.dist-info → imdb_sqlite-2.0.0.dist-info}/top_level.txt +0 -0
imdb_sqlite/__main__.py
CHANGED
|
@@ -100,7 +100,7 @@ TSV_TABLE_MAP = OrderedDict([
|
|
|
100
100
|
('title.ratings.tsv.gz',
|
|
101
101
|
('ratings', OrderedDict([
|
|
102
102
|
('tconst', Column(name='title_id', type='VARCHAR PRIMARY KEY')),
|
|
103
|
-
('averageRating', Column(name='rating', type='
|
|
103
|
+
('averageRating', Column(name='rating', type='REAL')),
|
|
104
104
|
('numVotes', Column(name='votes', type='INTEGER')),
|
|
105
105
|
]))),
|
|
106
106
|
])
|
|
@@ -207,7 +207,7 @@ def ensure_downloaded(files, cache_dir):
|
|
|
207
207
|
ofn = os.path.join(cache_dir, filename)
|
|
208
208
|
|
|
209
209
|
if os.path.exists(ofn):
|
|
210
|
-
|
|
210
|
+
continue
|
|
211
211
|
|
|
212
212
|
logger.info('GET %s -> %s', url, ofn)
|
|
213
213
|
with urlopen(url) as response:
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: imdb-sqlite
|
|
3
|
-
Version:
|
|
3
|
+
Version: 2.0.0
|
|
4
4
|
Summary: Imports IMDB TSV files into a SQLite database
|
|
5
5
|
Home-page: https://github.com/jojje/imdb-sqlite
|
|
6
6
|
Author: Jonas Tingeborn
|
|
@@ -46,7 +46,7 @@ The program relies on the following IMDB tab separated files:
|
|
|
46
46
|
|
|
47
47
|
usage: imdb-sqlite [OPTIONS]
|
|
48
48
|
|
|
49
|
-
Imports imdb tsv interface files into a new
|
|
49
|
+
Imports imdb tsv interface files into a new sqlite database. Fetches them from imdb
|
|
50
50
|
if not present on the machine.
|
|
51
51
|
|
|
52
52
|
optional arguments:
|
|
@@ -160,7 +160,7 @@ the following:
|
|
|
160
160
|
```sql
|
|
161
161
|
-- // table aliases: st = show-title, et = episode-title
|
|
162
162
|
SELECT st.primary_title, st.premiered, st.genres, e.season_number,
|
|
163
|
-
e.
|
|
163
|
+
e.episode_number, et.primary_title, r.rating, r.votes
|
|
164
164
|
FROM titles AS st
|
|
165
165
|
INNER JOIN episodes e ON ( e.show_title_id = st.title_id )
|
|
166
166
|
INNER JOIN titles et ON ( e.episode_title_id = et.title_id )
|
|
@@ -170,7 +170,7 @@ AND st.type = 'tvSeries'
|
|
|
170
170
|
ORDER BY r.rating DESC
|
|
171
171
|
```
|
|
172
172
|
|
|
173
|
-
**Find which productions both Robert
|
|
173
|
+
**Find which productions both Robert De Niro and Al Pacino acted together on**
|
|
174
174
|
```sql
|
|
175
175
|
SELECT t.title_id, t.type, t.primary_title, t.premiered, t.genres,
|
|
176
176
|
c1.characters AS 'Pacino played', c2.characters AS 'Deniro played'
|
|
@@ -252,7 +252,7 @@ you don't need all the aliases for all the titles, like the portuguese title of
|
|
|
252
252
|
some bollywood flick, then the akas can also be skipped. Getting rid of those
|
|
253
253
|
two tables shaves off 3/4 of the required space. That's significant.
|
|
254
254
|
|
|
255
|
-
If you don't care about characters, and just want to query
|
|
255
|
+
If you don't care about characters, and just want to query movies or shows, their
|
|
256
256
|
ratings and perhaps per-episode ratings as well, then 2 GiB of storage suffices
|
|
257
257
|
as you only need tables titles, episodes and ratings. However if you actually
|
|
258
258
|
want to query those tables as well, then you'd want to create indices, either
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
imdb_sqlite/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
2
|
+
imdb_sqlite/__main__.py,sha256=TzoEdtaFR1LxCCQfzMxpShsa4mO6Nrky_160_S1Egvw,13120
|
|
3
|
+
imdb_sqlite-2.0.0.dist-info/licenses/LICENSE,sha256=gXf5dRMhNSbfLPYYTY_5hsZ1r7UU1OaKQEAQUhuIBkM,18092
|
|
4
|
+
imdb_sqlite-2.0.0.dist-info/METADATA,sha256=f8xwzNUvY05o2T6l5knh65iczhVZriydRWF90iYkYZE,12014
|
|
5
|
+
imdb_sqlite-2.0.0.dist-info/WHEEL,sha256=wUyA8OaulRlbfwMtmQsvNngGrxQHAvkKcvRmdizlJi0,92
|
|
6
|
+
imdb_sqlite-2.0.0.dist-info/entry_points.txt,sha256=0qU1qhre6z6V8Q_q0QxnKvmx2c8BVjhPGqIg9-Inpcc,58
|
|
7
|
+
imdb_sqlite-2.0.0.dist-info/top_level.txt,sha256=mPPacZxoJziQ2beMOavSJ9Yyg_dhGmOkNN5gP_boDSY,12
|
|
8
|
+
imdb_sqlite-2.0.0.dist-info/RECORD,,
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
imdb_sqlite/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
2
|
-
imdb_sqlite/__main__.py,sha256=w_xmBuRxj6-Cg31ITwnkW5QYWaco3E-3HYoiDZ_AZYk,13121
|
|
3
|
-
imdb_sqlite-1.2.0.dist-info/licenses/LICENSE,sha256=gXf5dRMhNSbfLPYYTY_5hsZ1r7UU1OaKQEAQUhuIBkM,18092
|
|
4
|
-
imdb_sqlite-1.2.0.dist-info/METADATA,sha256=J3N9Z7f7K_LYNcDLAPogrMOGiKkXO6Z222QWi15v1EM,12011
|
|
5
|
-
imdb_sqlite-1.2.0.dist-info/WHEEL,sha256=wUyA8OaulRlbfwMtmQsvNngGrxQHAvkKcvRmdizlJi0,92
|
|
6
|
-
imdb_sqlite-1.2.0.dist-info/entry_points.txt,sha256=0qU1qhre6z6V8Q_q0QxnKvmx2c8BVjhPGqIg9-Inpcc,58
|
|
7
|
-
imdb_sqlite-1.2.0.dist-info/top_level.txt,sha256=mPPacZxoJziQ2beMOavSJ9Yyg_dhGmOkNN5gP_boDSY,12
|
|
8
|
-
imdb_sqlite-1.2.0.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|