Commit e82bc4f6 authored by Ana Guerrero López's avatar Ana Guerrero López

Import Upstream version 4.6.0

parent 42e1d237
Metadata-Version: 1.0
Name: IMDbPY
Version: 4.5.1
Version: 4.6
Summary: Python package to access the IMDb's database
Home-page: http://imdbpy.sf.net/
Author: Davide Alberani
......@@ -22,7 +22,7 @@ Description: IMDbPY is a Python package useful to retrieve and
in this package; other IMDbPY-based programs are available at the
home page: http://imdbpy.sf.net/
Keywords: imdb,movie,people,database,cinema,film,person,cast,actor,actress,director,sql,character,company,svn,package,plain text data files,keywords,top250,bottom100,xml
Keywords: imdb,movie,people,database,cinema,film,person,cast,actor,actress,director,sql,character,company,package,plain text data files,keywords,top250,bottom100,xml
Platform: any
Classifier: Development Status :: 5 - Production/Stable
Classifier: Environment :: Console
......
......@@ -24,22 +24,6 @@ IMDbPY.egg-info/dependency_links.txt
IMDbPY.egg-info/not-zip-safe
IMDbPY.egg-info/requires.txt
IMDbPY.egg-info/top_level.txt
bin/get_character.py
bin/get_company.py
bin/get_first_character.py
bin/get_first_company.py
bin/get_first_movie.py
bin/get_first_person.py
bin/get_keyword.py
bin/get_movie.py
bin/get_person.py
bin/get_top_bottom_movies.py
bin/imdbpy2sql.py
bin/search_character.py
bin/search_company.py
bin/search_keyword.py
bin/search_movie.py
bin/search_person.py
docs/AUTHOR.txt
docs/CONTRIBUTORS.txt
docs/CREDITS.txt
......@@ -69,7 +53,7 @@ docs/README.users
docs/README.utf8
docs/TODO.txt
docs/imdbpy.cfg
docs/imdbpy45.dtd
docs/imdbpy46.dtd
docs/imdbpyPowered.png
docs/imdbpyico.png
docs/imdbpyico.xpm
......
......@@ -11,9 +11,13 @@ recursive-include imdb/locale *
global-exclude *~
prune CVS
prune .svn
prune .hg
global-exclude CVS
global-exclude .svn
# Try to force the inclusion of ez_setup.py.
include ez_setup.py
# Uncomment the following line if you don't want to install the logo images.
# exclude docs/*.png docs/*.xpm docs/*.bmp
......
Metadata-Version: 1.0
Name: IMDbPY
Version: 4.5.1
Version: 4.6
Summary: Python package to access the IMDb's database
Home-page: http://imdbpy.sf.net/
Author: Davide Alberani
......@@ -22,7 +22,7 @@ Description: IMDbPY is a Python package useful to retrieve and
in this package; other IMDbPY-based programs are available at the
home page: http://imdbpy.sf.net/
Keywords: imdb,movie,people,database,cinema,film,person,cast,actor,actress,director,sql,character,company,svn,package,plain text data files,keywords,top250,bottom100,xml
Keywords: imdb,movie,people,database,cinema,film,person,cast,actor,actress,director,sql,character,company,package,plain text data files,keywords,top250,bottom100,xml
Platform: any
Classifier: Development Status :: 5 - Production/Stable
Classifier: Environment :: Console
......
......@@ -4,8 +4,9 @@ get_character.py
Usage: get_character "characterID"
Show some info about the character with the given imdbID (e.g. '0000001'
for "Jesse James".
Show some info about the character with the given characterID (e.g. '0000001'
for "Jesse James", using 'http' or 'mobile').
Notice that characterID, using 'sql', are not the same IDs used on the web.
"""
import sys
......@@ -20,10 +21,10 @@ except ImportError:
if len(sys.argv) != 2:
print 'Only one argument is required:'
print ' %s "imdbID"' % sys.argv[0]
print ' %s "characterID"' % sys.argv[0]
sys.exit(2)
imdbID = sys.argv[1]
characterID = sys.argv[1]
i = imdb.IMDb()
......@@ -31,8 +32,8 @@ out_encoding = sys.stdout.encoding or sys.getdefaultencoding()
try:
# Get a character object with the data about the character identified by
# the given imdbID.
character = i.get_character(imdbID)
# the given characterID.
character = i.get_character(characterID)
except imdb.IMDbError, e:
print "Probably you're not connected to Internet. Complete error report:"
print e
......@@ -40,7 +41,7 @@ except imdb.IMDbError, e:
if not character:
print 'It seems that there\'s no character with imdbID "%s"' % imdbID
print 'It seems that there\'s no character with characterID "%s"' % characterID
sys.exit(4)
# XXX: this is the easier way to print the main info about a character;
......
......@@ -4,8 +4,9 @@ get_company.py
Usage: get_company "companyID"
Show some info about the company with the given imdbID (e.g. '0071509'
for "Columbia Pictures [us]".
Show some info about the company with the given companyID (e.g. '0071509'
for "Columbia Pictures [us]", using 'http' or 'mobile').
Notice that companyID, using 'sql', are not the same IDs used on the web.
"""
import sys
......@@ -20,10 +21,10 @@ except ImportError:
if len(sys.argv) != 2:
print 'Only one argument is required:'
print ' %s "imdbID"' % sys.argv[0]
print ' %s "companyID"' % sys.argv[0]
sys.exit(2)
imdbID = sys.argv[1]
companyID = sys.argv[1]
i = imdb.IMDb()
......@@ -31,8 +32,8 @@ out_encoding = sys.stdout.encoding or sys.getdefaultencoding()
try:
# Get a company object with the data about the company identified by
# the given imdbID.
company = i.get_company(imdbID)
# the given companyID.
company = i.get_company(companyID)
except imdb.IMDbError, e:
print "Probably you're not connected to Internet. Complete error report:"
print e
......@@ -40,7 +41,7 @@ except imdb.IMDbError, e:
if not company:
print 'It seems that there\'s no company with imdbID "%s"' % imdbID
print 'It seems that there\'s no company with companyID "%s"' % companyID
sys.exit(4)
# XXX: this is the easier way to print the main info about a company;
......
......@@ -2,10 +2,11 @@
"""
get_movie.py
Usage: get_movie "imdbID"
Usage: get_movie "movieID"
Show some info about the movie with the given imdbID (e.g. '0133093'
for "The Matrix".
Show some info about the movie with the given movieID (e.g. '0133093'
for "The Matrix", using 'http' or 'mobile').
Notice that movieID, using 'sql', are not the same IDs used on the web.
"""
import sys
......@@ -20,10 +21,10 @@ except ImportError:
if len(sys.argv) != 2:
print 'Only one argument is required:'
print ' %s "imdbID"' % sys.argv[0]
print ' %s "movieID"' % sys.argv[0]
sys.exit(2)
imdbID = sys.argv[1]
movieID = sys.argv[1]
i = imdb.IMDb()
......@@ -31,8 +32,8 @@ out_encoding = sys.stdout.encoding or sys.getdefaultencoding()
try:
# Get a Movie object with the data about the movie identified by
# the given imdbID.
movie = i.get_movie(imdbID)
# the given movieID.
movie = i.get_movie(movieID)
except imdb.IMDbError, e:
print "Probably you're not connected to Internet. Complete error report:"
print e
......@@ -40,7 +41,7 @@ except imdb.IMDbError, e:
if not movie:
print 'It seems that there\'s no movie with imdbID "%s"' % imdbID
print 'It seems that there\'s no movie with movieID "%s"' % movieID
sys.exit(4)
# XXX: this is the easier way to print the main info about a movie;
......@@ -56,7 +57,7 @@ print movie.summary().encode(out_encoding, 'replace')
# This is only a short example; you can get a longer summary using
# 'print movie.summary()' and the complete set of information looking for
# the output of the movie.keys() method.
#print '==== "%s" / imdbID: %s ====' % (movie['title'], imdbID)
#print '==== "%s" / movieID: %s ====' % (movie['title'], movieID)
# XXX: use the IMDb instance to get the IMDb web URL for the movie.
#imdbURL = i.get_imdbURL(movie)
#if imdbURL:
......
......@@ -4,8 +4,9 @@ get_person.py
Usage: get_person "personID"
Show some info about the person with the given imdbID (e.g. '0000210'
Show some info about the person with the given personID (e.g. '0000210'
for "Julia Roberts".
Notice that personID, using 'sql', are not the same IDs used on the web.
"""
import sys
......@@ -20,10 +21,10 @@ except ImportError:
if len(sys.argv) != 2:
print 'Only one argument is required:'
print ' %s "imdbID"' % sys.argv[0]
print ' %s "personID"' % sys.argv[0]
sys.exit(2)
imdbID = sys.argv[1]
personID = sys.argv[1]
i = imdb.IMDb()
......@@ -31,8 +32,8 @@ out_encoding = sys.stdout.encoding or sys.getdefaultencoding()
try:
# Get a Person object with the data about the person identified by
# the given imdbID.
person = i.get_person(imdbID)
# the given personID.
person = i.get_person(personID)
except imdb.IMDbError, e:
print "Probably you're not connected to Internet. Complete error report:"
print e
......@@ -40,7 +41,7 @@ except imdb.IMDbError, e:
if not person:
print 'It seems that there\'s no person with imdbID "%s"' % imdbID
print 'It seems that there\'s no person with personID "%s"' % personID
sys.exit(4)
# XXX: this is the easier way to print the main info about a person;
......@@ -56,7 +57,7 @@ print person.summary().encode(out_encoding, 'replace')
# This is only a short example; you can get a longer summary using
# 'print person.summary()' and the complete set of information looking for
# the output of the person.keys() method.
#print '==== "%s" / imdbID: %s ====' % (person['name'], imdbID)
#print '==== "%s" / personID: %s ====' % (person['name'], personID)
# XXX: use the IMDb instance to get the IMDb web URL for the person.
#imdbURL = i.get_imdbURL(person)
#if imdbURL:
......
......@@ -1597,7 +1597,7 @@ def doAkaNames():
try:
name_dict = analyze_name(line)
except IMDbParserError:
if line: print 'WARNING: wrong name:', _(line)
if line: print 'WARNING doAkaNames wrong name:', _(line)
continue
name = name_dict.get('name')
namePcodeCf, namePcodeNf, surnamePcode = name_soundexes(name)
......@@ -1692,7 +1692,13 @@ def doAkaTitles():
if line[0] == '\n': continue
line = line.strip()
if obsolete:
tonD = analyze_title(line, _emptyString='')
try:
tonD = analyze_title(line, _emptyString='')
except IMDbParserError:
if line:
print 'WARNING doAkaTitles(obsol O) invalid title:',
print _(line)
continue
tonD['title'] = normalizeTitle(tonD['title'])
line = build_title(tonD, ptdf=1, _emptyString='')
# Aka information for titles in obsolete files are
......@@ -1702,7 +1708,13 @@ def doAkaTitles():
continue
mid = CACHE_MID.addUnique(line)
if line[0] == '"':
titleDict = analyze_title(line, _emptyString='')
try:
titleDict = analyze_title(line, _emptyString='')
except IMDbParserError:
if line:
print 'WARNING doAkaTitles (O) invalid title:',
print _(line)
continue
if 'episode of' in titleDict:
if obsolete:
titleDict['episode of']['title'] = \
......@@ -1735,7 +1747,13 @@ def doAkaTitles():
if not akat:
continue
if obsolete:
akatD = analyze_title(akat, _emptyString='')
try:
akatD = analyze_title(akat, _emptyString='')
except IMDbParserError:
if line:
print 'WARNING doAkaTitles(obsol) invalid title:',
print _(akat)
continue
akatD['title'] = normalizeTitle(akatD['title'])
akat = build_title(akatD, ptdf=1, _emptyString='')
if count % 10000 == 0:
......@@ -1744,7 +1762,13 @@ def doAkaTitles():
if isEpisode and seriesID is not None:
# Handle series for which only single episodes have
# aliases.
akaDict = analyze_title(akat, _emptyString='')
try:
akaDict = analyze_title(akat, _emptyString='')
except IMDbParserError:
if line:
print 'WARNING doAkaTitles (epis) invalid title:',
print _(akat)
continue
if 'episode of' in akaDict:
if obsolete:
akaDict['episode of']['title'] = normalizeTitle(
......@@ -2196,24 +2220,27 @@ def _parseBiography(biol):
elif x4 == 'RN: ':
n = x[4:].strip()
if not n: continue
rn = build_name(analyze_name(n, canonical=1), canonical=1)
res['birth name'] = rn
try:
rn = build_name(analyze_name(n, canonical=1), canonical=1)
res['birth name'] = rn
except IMDbParserError:
if line: print 'WARNING _parseBiography wrong name:', _(n)
continue
elif x6 == 'AT: * ':
res.setdefault('articles', []).append(x[6:].strip())
res.setdefault('article', []).append(x[6:].strip())
elif x4 == 'HT: ':
res['height'] = x[4:].strip()
elif x6 == 'PT: * ':
res.setdefault('pictorials', []).append(x[6:].strip())
res.setdefault('pictorial', []).append(x[6:].strip())
elif x6 == 'CV: * ':
res.setdefault('magazine covers', []).append(x[6:].strip())
res.setdefault('magazine cover photo', []).append(x[6:].strip())
elif x4 == 'NK: ':
res.setdefault('nick names', []).append(normalizeName(x[4:]))
elif x6 == 'PI: * ':
res.setdefault('portrayed', []).append(x[6:].strip())
res.setdefault('portrayed in', []).append(x[6:].strip())
elif x6 == 'SA: * ':
sal = x[6:].strip().replace(' -> ', '::')
res.setdefault('salary history', []).append(sal)
trl = _parseList(biol, 'TR')
if trl: res['trivia'] = trl
quotes = _parseList(biol, 'QU')
......@@ -2229,7 +2256,7 @@ def _parseBiography(biol):
biomovies = _parseList(biol, 'BT')
if biomovies: res['biographical movies'] = biomovies
tm = _parseList(biol, 'TM')
if tm: res['trademarks'] = tm
if tm: res['trade mark'] = tm
interv = _parseList(biol, 'IT')
if interv: res['interviews'] = interv
return res
......
CREDITS
=======
See also CONTRIBUTORS.txt for a list of the most important developers
who share the copyright on some portions of the code.
First of all, I want to thank all the maintainers of the
packages, listed on http://imdbpy.sf.net/?page=download#otherpkg,
and especially Ana Guerrero.
Another big thank to the developers who used IMDbPY for their
projects and researches; they can be found here:
http://imdbpy.sf.net/?page=programs
I'd like to thank the following people for their help:
Other very special thanks go to some people who followed very
closely the development of IMDbPY, providing hints and insights:
Ori Cohen, James Rubino, Tero Saarni and Jesper Noer (for a lot
of help, and also for the wonderful http://bitbucket.org)
* Ana Guerrero, for maintaining the official debian package.
* H. Turgut Uyar for a number of bug reports and a lot of work on
the test-suite.
Below, a list of persons who contributed with bug reports, small
patches and hints (kept in a reverse order since IMDbPY 4.5):
* David Kaufman for an idea to make the 'update' method more robust.
* Dustin Wyatt for a bug with SQLite of Python 2.6.
* Julian Scheid for bug reports about garbage in the ptdf.
* Adeodato Simó for a bug report about the new imdb.com layout.
......@@ -20,12 +37,19 @@ I'd like to thank the following people for their help:
* Mark Jeffery, for some help debugging a lxml bug.
* Hieu Nguyen for a bug report about fetching real imdbIDs.
* Rdian06 for a patch for movies without plot authors.
* Tero Saarni, for the series 60 GUI and a lot of testing and
debugging.
* Hieu Nguyen for a bug report about fetching real imdbIDs.
* Ana Guerrero, for maintaining the official debian package.
* Rdian06 for a patch for movies without plot authors.
* H. Turgut Uyar for a number of bug reports and a lot of work on
the test-suite.
* Ori Cohen for some code and various hints.
* Jesper Nøhr for a lot of testing, especially on 'sql'.
......@@ -35,6 +59,12 @@ I'd like to thank the following people for their help:
* Andre LeBlanc for a bug report about airing date of tv series episodes.
* aow for a note about some misleading descriptions.
* Sébastien Ragons for tests and reports.
* Sridhar Ratnakumar for info about PKG-INF.
* neonrush for a bug parsing Malcolm McDowell filmography!
* Alen Ribic for some bug reports and hints.
......@@ -43,9 +73,12 @@ I'd like to thank the following people for their help:
of testing and debugging of the ibm_db driver (plus a lot of hints
about how to improve the imdbpy2sql.py script).
* Chris Thompson for some bug reports about summary() methods.
* Karl Newman for bug reports about the installer of version 4.5.
* Ori Cohen for some code and various hints.
* Saruke Kun and Treas0n for bug reports about 'Forbidden' errors
from the imdb.com server.
* Chris Thompson for some bug reports about summary() methods.
* Mike Castle for performace tests with SQLite and numerous hints.
......
Changelog for IMDbPY
====================
* What's the new in release 4.6 "The Road" (19 Jun 2010)
[general]
- introduced the 'full-size cover url' and 'full-size headshot'
keys for Movie, Person and Character instances.
- moved the development to a Mercurial repository.
- introduced the parseXML function in the imdb.helpers module.
- now the asXML method can exclude dynamically generated keys.
- rationalized the use of the 'logging' and 'warnings' modules.
- the 'update' method no longer raises an exception, if asked for
an unknown info set.
[http/mobile]
- removed new garbage from the imdb pages.
- support new style of akas.
- fix for the "trivia" page.
- fixes for searches with too many results.
[sql]
- fixes for garbage in the plain text data files.
- support for SQLite shipped with Python 2.6.
* What's the new in release 4.5.1 "Dollhouse" (01 Mar 2010)
[general]
- reintroduced the ez_setup.py file.
......
......@@ -11,3 +11,122 @@ A1: if python-lxml is not installed in your system, IMDbPY uses the
README.newparsers file.
Q2: why the movieID (and other IDs) used in the 'sql' database are not
the same used on the IMDb.com site?
A2: first, a bit of nomenclature: we'll call "movieID" (or things like
"personID", for instance of the Person class) a unique identifier used
by IMDbPY to manage a single movie (or other kinds of object).
We'll call "imdbID" a unique identifier used, for the same kind
of data, by the IMDb.com site (i.e.: the 7-digit number in tt0094226,
as seen in the URL for "The Untouchables").
Using IMDbPY to access the web ('http' and 'mobile' data access
systems), movieIDs and imdbIDs are the same thing - beware that
in this case a movieID is a string, with the leading zeroes.
Unfortunately, populating a sql database with data from the plain
text data files, we don't have access to imdbIDs - since they are
not distributed at all - and so we have to made them by ourselves
(they are the 'id' column in tables like 'title' or 'name').
This mean that these values are valid only for your current database:
if you update it with a newer set of plain text data files, these IDs
will surely change (and, by the way, they are integers).
It's also obvious, now, that you can't exchange IDs between the
'http' (or 'mobile') data access system and 'sql', and in the same
way you can't use imdbIDs with your local database or vice-versa.
Q3: using a sql database, what's the imdb_id (or something like that)
column in tables like 'title', 'name' and so on?
A3: it's internally used by IMDbPY to remember the imdbID (the one
used by the web site - accessing the database you'll use the numeric
value of the 'id' column, as movieID) of a movie, once it stumbled
upon. This way, if IMDbPY is asked again about the imdbID of
a movie (or person, or ...), it doesn't have to contact again to
the web site. Notice that you have to access the sql database using
a user with write permission, to update it.
As a bonus, when possible, the values of these imdbIDs are saved
between updates of the sql database (using the imdbpy2sql.py script).
Beware that it's tricky and not always possible, but the script does
its best to succeed.
Q4: but what if I really need the imdbIDs, to use my database?
A4: no, you don't. Search for a title, get its information. Be happy!
Q5: I have a great idea: write a script to fetch all the imdbID from the
web site! Can't you do it?
A5: yeah, I can. But I won't. :-)
It would be somewhat easy to map every title on the web to its
imdbID, but there are still a lot of problems.
First of all, every user will end up doing it for its own copy
of the plain text data files (and this will make the imdbpy2sql.py
script painfully slow and prone to all sort of problems).
Moreover, the imdbIDs are unique and never reused, true, but movie
title _do_ change: to fix typos, override working titles, to cope
with a new movie with the same title release in the same year (not
to mention cancelled or postponed movies).
Besides that, we'd have to do the same for persons, characters and
companies. Believe me: it doesn't make sense.
Work on your local database using your movieIDs (or even better:
don't mind about movieIDs and think in terms of searches and Movie
instances!) and retrieve the imdbID only in the rare circumstances
when you really need them (see the next FAQ).
Repeat with me: I DON'T NEED ALL THE imdbIDs. :-)
Q6: using a sql database, how can I convert a movieID (whose value
is valid only locally) to an imdbID (the ID used by the imdb.com site)?
A6: various functions can be used to convert a movieID (or personID or
other IDs) to the imdbID used by the seb site.
Example of code:
from imdb import IMDb
ia = IMDb('sql', uri=URI_TO_YOUR_SQL_DATABASE)
movie = ia.search_movie('The Untouchables')[0] # a Movie instance.
print 'The movieID for The Untouchables:', movie.movieID
print 'The imdbID used by the site:', ia.get_imdbMovieID(movie.movieID)
print 'Same ID, smarter function:', ia.get_imdbID(movie)
It goes without saying that get_imdbMovieID has some sibling
methods: get_imdbPersonID, get_imdbCompanyID and get_imdbCharacterID.
Also notice that the get_imdbID method is smater, and takes any kind
of instance (the other functions need a movieID, personID, ...)
Another method that will try to retrieve the imdbID is get_imdbURL,
which works like get_imdbID but returns an URL.
In case of problems, these methods will return None.
Q7: I have a movie title (in the format used by the plain text data files)
or other kind of data (like a person/character/company name) and I want
to get its imdbID. How can I do?
A7: the safest thing, is probably to do a normal search on IMDb (using the
'http' or 'mobile' data access system of IMDbPY) and see if the first
item is the correct one.
You can also try the 'title2imdbID' method (and similar) of the IMDb
instance (no matter if you're using 'http', 'mobile' or 'sql'), but
expect some failures - it returns None in this case.
Q8: I have an URL (of a movie, person or something else); how can I
get a Movie/Person/... instance?
A8: import the imdb.helpers module and use the get_byURL function.
Q9: I'm writing an interface based on IMDbPY and I have problems handling
encoding, chars conversions, replacements of references and so on.
A9: see the many functions in the imdb.helpers module.
......@@ -15,9 +15,10 @@ Sections in this file:
imdb (package)
|
+-> _articles
+-> _compat
+-> _exceptions
+-> _logging
+-> articles
+-> Movie
+-> Person
+-> Character
......@@ -49,21 +50,22 @@ imdb (package)
+-> mobile (package)
|
+-> sql (package)
| |
| +-> dbschema
| +-> alchemyadapter
| +-> objectadapter
|
+-> dbschema
+-> alchemyadapter
+-> objectadapter
+-> cutils (C module)
Description:
imdb (package): contains the IMDb function, the IMDbBase class and imports
the IMDbError exception class.
_articles: defines some functions and data useful to smartly guess the
language of a movie title (internally used).
_compat: compatibility functions and class for some strange environments
(internally used).
_exceptions: defines the exceptions internally used.
_logging: provides the logging facility used by IMDbPY.
articles: defines some functions and data useful to smartly guess the
language of a movie title (internally used).
Movie: contains the Movie class, used to describe and manage a movie.
Person: contains the Person class, used to describe and manage a person.
Character: contains the Character class, used to describe and manage
......
......@@ -17,7 +17,10 @@ It's also possible to get a representation of a whole object,
using the asXML() method:
print movie.asXML()
The returned strings are unicode.
The returned strings are unicode. The _with_add_keys argument
of the asXML() method can be set to False (default: True) to
exclude the dynamically generated keys (like 'smart canonical title'
and so on).
XML FORMAT
......@@ -28,14 +31,17 @@ a 'item' tag. E.g.:
<keywords>
<item>a keyword</item>
<item>another keyword</item>
<keywords>
</keywords>
Except when keys are known to be not fixed (e.g.: a list of keywords),
in which case this schema is used:
<item title="EscapedKeyword">
<item key="EscapedKeyword">
...
</item>
In general, the 'key' attribute is present whenever the used tag
doesn't match the key name.
Movie, Person, Character and Company instances are converted like
that (portions enclosed in squares are optionals):
<movie id="movieID" access-system="accessSystem">
......@@ -72,8 +78,7 @@ Since version 4.1 a DTD is available; it can be found in this
directory or on the web, at:
http://imdbpy.sf.net/dtd/imdbpy41.dtd
The version number may (or may not) change with new version, if
changes to the DTD were introduced.
The version number changes with the IMDbPY version.
LOCALIZATION
......@@ -82,3 +87,14 @@ changes to the DTD were introduced.
Since version 4.1 it's possible to translate the XML tags;
see README.locale.
FROM XML TO OBJECTS
===================
Since version 4.6, you can dump the generated XML in a string or
in a file, using it - later - to rebuild the original object.
In the imdb.helpers module there's the parseXML() function which
takes a string as input and return - if possible - an instance of
the Movie, Person, Character or Company classes.
......@@ -45,6 +45,10 @@ E.g.:
ADD A NEW LANGUAGE
==================
You can (but you're not forced to) use Transifex to manage/coordinate
your translations; see: http://www.transifex.net/projects/p/imdbpy/c/default/
Below, the generic instruction about how translation works.
In the imdb.locale package, you'll find some scripts useful to build
your own internationalization files.
If you create a new translation or update an existing one, you can send
......@@ -66,3 +70,26 @@ E.g.:
msgmerge -N imdbpy-fr.po imdbpy.pot > new-imdbpy-fr.po
ARTICLES IN TITLES
==================
Converting a title to its 'Title, The' canonical format, IMDbPY does
some assumptions about what is an article and what not, and this could
lead to some wrong canonical titles. E.g.: "Hard, Die" instead of
"Die Hard", since 'Die' is guessed as an article (and it is, in Germany...)
To solve this problem, there are other keys: "smart canonical title",
"smart long imdb canonical title", "smart canonical series title",
"smart canonical episode title" which can be used to do a better job
converting a title into its canonical format.
It works, but it needs to know something about articles in various
languages: if you want to help, see the LANG_ARTICLES and _LANG_COUNTRIES
dictionaries in the 'articles' module.