On Jul 03, "H. Turgut Uyar" <[EMAIL PROTECTED]> wrote:

> > I've committed support for names/titles references (mostly untested).
> 
> Seen it. I still have to figure out how references are used. Can you 
> tell me where to find an example?

_Inside_ some text values (like "plot" or "mini biography") there are,
on the web site and in the plain text data files, links to other
movies/persons/characters.
Where it makes sense (there are very few pages with such data), IMDbPY
collects these links in dictionaries of the Movie/Person instances.
A "refs" dictionary is in the form: {'Actor Name': 'movieID1',
'Another Actor Name': 'movieID2', ...}

At the same time, the relative text values stored in Movie/Person
objects (e.g.: the ones returned by movie['plot']) are in fact
saved using a special representation.
For example, a raw movie['plot'] value can contains something like:
  "... in this movie 'Julia Roberts' (qv) plays ..."

notice the "'" around the name and the "(qv)" at the end.
These notations come from the plain text data files.

When a user accesses the 'plot' key, its value is modified according
to the MOVIE_OR_PERSON_OBJECT.modFunct function, which replaces the
funny notation with... something, maybe using the values stored in
the "refs" dictionaries.
By default, the plain string (in our example, just Julia Roberts)
is returned, but other functions can return html links and so on - and
so they need to know the imdbID of the referred text.
These functions are used by programs like imdbpyweb, and can be easily
built with the helpers module.

There are no performances problems, since the modFunct function is
applied only for the very few key that need it.

[the quotes parser]

Quite tricky. :-)

>    quote:          following-sibling::text()

Using following::text() seems to collect also the notes in italic,
but I don't know if it's too difficult to support it for bsoup.


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

-------------------------------------------------------------------------
Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW!
Studies have shown that voting for your favorite open source project,
along with a healthy diet, reduces your potential for chronic lameness
and boredom. Vote Now at http://www.sourceforge.net/community/cca08
_______________________________________________
Imdbpy-devel mailing list
Imdbpy-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/imdbpy-devel

Reply via email to