On Sep 19, Alen Ribic <[EMAIL PROTECTED]> wrote: > Did you get a chance to analyze the details of whats involved?
[looks like this mail was lost in the sf.net downtime] The current imdbpy2sql.py script could be a good start. The SourceFile class, and specifically the getByHashSections() and getByNMMVSections() methods, can be a seed of what it's needed. I.e.: read a file a "logical block" at a time; for every kind of file you'll have to represent a set of SQL commands to write a block of information in the db; the same representation should be used to _remove_ the same information from the db and to identify it (to extract IDs, for example). So: a data structure of some sort to represent a correlation between a "logical block" and the data in the db, and a small set of generic "sql engines" to do things as "insert", "replace", "remove" these blocks from the db. On top of this, you have to manage data insertion (when no patches are handled), and the diffs. I've described a possible approach in the previous thread; I'm sure a lot of difficulties will arise, trying to implement it. It may be not completely impossible - or maybe I've just drank too many coffees. :-) It would probably be a good idea to start with a very simple and limited prototype: just read a short subset of movies.list.gz (an _extremely_ trivial file) and a very simple patch (with movies added, removed and/or renamed). Release 3.7 is just around the corner. Maybe after that I'll be crazy enough... ;-) -- 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