On Sep 18, Alen Ribic <[EMAIL PROTECTED]> wrote:

> I managed to miss 2 files from the imdb interface when downloading the
> latest plain text files.
> The import to sql ran successfully.

It's designed to cope with (any) missing files gracefully.

> My question is can I import just the 2 missed files now? The 2 files
> where "complete-cast.list.gz" and "aka-names.list.gz".
> If so how?

For the series "kids don't try this at home", you can modify
the imdbpy2sql.py that way:

- go to the run() function, near the end.
- comment out (so that they are _not_ executed):
  - dropTables()
  - createTables()
  - readMovieList()
  - doMovieCompaniesInfo()
  - castLists()
  - doAkaTitles()
  - doMinusHashFiles()
  - doNMMVFiles()
  - doMiscMovieInfo()
  - getRating()
  - getTaglines()
  - getTopBottomRating()
- uncomment (so that they are executed):
  - CACHE_MID.populate()
  - CACHE_COMPID.populate() # probably not needed.
  - CACHE_PID.populate()
  - CACHE_CID.populate() # probably not needed.

Summany: run only the .populate() methods and doAkaNames() and
completeCast().
To be sure: put the two files in a directory with _no_ other files,
so they will be the only available information.

It should work.  Could.  Possibly.  Maybe.  Who knows? :-)

> If not, then do I just drop the imdb database and create it
> and run the import again?

That's exactly what happens when you run the imdbpy2sql.py script on
an already populated db: it drops the old data, and creates the db
from scratch (with a bonus over a manual drop: the collected imdbIDs
are saved).

One of my long time wet dreams is to use the "diffs" weekly distributed
by IMDb to update a "live" database, but I fear the task is beyond my
abilities (search for previous threads on the argument, in this
mailing lsit).


-- 
Davide Alberani <[EMAIL PROTECTED]> [PGP KeyID: 0x465BFD47]
http://erlug.linux.it/~da/

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Imdbpy-devel mailing list
Imdbpy-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/imdbpy-devel

Reply via email to