On Mar 21, Kanesodi <kanes...@gmail.com> wrote:

> > Please, be sure to use vdbpy 1.1 _and_ IMDbPY 4.0.
> 
> You're right, my mistake was using 3.6 version

Good to know. :-)

> For sake of search engines and users who might come across this mail,
> here is a little guide:

Thanks!

> My source here would be simple command ls My files are located on
> a FreeNAS system (BSD),

Cool. :-)

> using command-line I execute ls > ls.txt which gives me a file
> containing a list of folders like this:

A list of directory names?  Out of curiosity, what program originated
them?

> one movie on each line. Then I would clean up the file removing years
> (or maybe not needed).

No need to strip the year.

> And here I'm stuck.. how can I get vdbpy to read every line and
> generate files like dump function does?

vdbpy_batch.py was thought to fetch info from the videoDB database,
and then update missing information, so in my opinion your best chance
is to modify it to suit your needs.

My idea (untested):
starting from line 139, remove the first 11 lines (they handle the
connection to the database) and replace them with a quick-and-dirty
hack like:
    titlesFd = open('/path/to/your/list/of/title.txt', 'r')
    # there 2 lines replace 'for vid, title, imdbID in movies:'
    for line in titlesFd:
        vid, title, imdbID = 0, line.strip(), ''

And then, to convert the 'update' step in an 'insert', change:
    cmd = 'vdbpy_add.py -f "%s" -u "%s"' % (CONF_FILE, vid)
to
    cmd = 'vdbpy_add.py -f "%s"' % CONF_FILE

After than you should be able to run 'vdbpy_batch.py dump' to
read every lines in your list of title; it will create a file
for every title, with the results of the search.
Following the BATCH.txt instructions, edit these files (if there
are too many: give up and hope the first match is the right one ;-)
and then run 'vdbpy_batch.py update'.

It goes without saying that it could mess up your database, so
a backup is mandatory. :-)


HTH,
-- 
Davide Alberani <davide.alber...@gmail.com> [PGP KeyID: 0x465BFD47]
http://erlug.linux.it/~da/

------------------------------------------------------------------------------
Apps built with the Adobe(R) Flex(R) framework and Flex Builder(TM) are
powering Web 2.0 with engaging, cross-platform capabilities. Quickly and
easily build your RIAs with Flex Builder, the Eclipse(TM)based development
software that enables intelligent coding and step-through debugging.
Download the free 60 day trial. http://p.sf.net/sfu/www-adobe-com
_______________________________________________
Imdbpy-devel mailing list
Imdbpy-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/imdbpy-devel

Reply via email to