File: README.mobile

package info (click to toggle)
imdbpy 2.7-2
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 780 kB
  • ctags: 1,295
  • sloc: python: 8,867; ansic: 440; makefile: 44
file content (129 lines) | stat: -rw-r--r-- 4,344 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
  IMDbPY FOR SMALL SYSTEMS
  ========================

Since version 1.8, IMDbPY tries to be usable even on
systems with very limited storage space, bandwidth and
CPU power, like PDA, hand-held devices and mobile phones.

Sections in this file:
* INSTALLATION OPTIONS
  how to save a little space installing IMDbPY.
* THE "MOBILE" DATA ACCESS SYSTEM
  useful for systems with very little CPU power and bandwidth.
* THE "HTTPTHIN" DATA ACCESS SYSTEM
  for systems with normal CPU power, but insufficient bandwidth.
* OTHER TIPS

Please read all the following section.


  INSTALLATION OPTIONS
  ====================

You can modify some variables in the setup.py script:
setting DO_LOCAL to 0, the parser.local package is not installed;
this is useful if your system doesn't have the space (more than 600Mb)
for a local installation of the IMDb's database.
Preventing the installation of the parser.local package will also save
at least 120Kb of disk space on your system.

The DO_SQL variable, if set to 0, will excludes the parser.sql
package; you don't need it if your system does not have the
SQLObject module and you don't want to store the whole IMDb's plain
text database files in a SQL database.

If both DO_LOCAL and DO_SQL are set to 0, the parser.common package
is not installed, and the "cutils" C module is not compiled.

If the DO_SCRIPTS variable is set to 0, the example scripts in
the ./bin/ directory are not installed, saving about 65Kb.


Now, if you're installing IMDbPY (using ./setup.py install), you
should take a look at some options, like "--no-compile" and "-O0"
to exclude pyc (saving at least 450Kb of disk space) and pyo
(other 400Kb) files.

Moreover, if you're creating a package (rpm, deb or whatever),
in the setup.cfg you can exclude from your package things
like the documentation (more than 200Kb) and the icon (~4Kb).

In both situations (installing and packaging), you may also need
to modify the MANIFEST.in file.


  THE "MOBILE" DATA ACCESS SYSTEM
  ===============================

Intended to be used with PDA, smart phones and hand-held devices,
the "mobile" data access system is a subclass of the default
"httpThin" data access system, with some methods replaced with faster
string methods, instead of the html parser.  Moreover, for
the movies, only the main information are retrieved (see the 'httpThin'
notes).  It should be, at usage time, from 2 to 20 times faster than
the "http"/"httpThin" data access system.

This code is still BETA!  Please report me bugs/ideas/hints...

Usage:
  from imdb import IMDb
  i = IMDb('mobile')
  sp = i.search_person('mel gibson', results=10)
  p = sp[0]
  i.update(p)
  sm = i.search_movie('mystic river', results=15)
  m = sm[0]
  i.update(m)
  ...and so on...


A GUI for Series 60 smart phones, developed by Tero Saarni,
is available at:
  http://kotisivu.mtv3.fi/terosaarni/python/imdbpygui/


  THE "HTTPTHIN" DATA ACCESS SYSTEM
  =================================

Instead of the default data access system ('http'), you can
also use 'httpThin' (or 'webThin' or 'htmlThin').

I.e.:
  from imdb import IMDb
  i = IMDb('httpThin')
  sp = i.search_person('mel gibson', results=10)
  sm = i.search_movie('mystic river', results=15)
  ...and so on...


The main difference is that, parsing movies' information,
the "maindetails" page is parsed, in place of the "combined" page.
This reduces the required bandwidth and the CPU power needed.
Obviously a lot of information are lost (and only the first 15
people of the cast are listed), but it still retrieves everything
you usually need (director, writer, runtime, country, language, akas,
etc.)

Another difference is that, if the "defaultModFuct" parameter is not
provided (as default) calling the IMDb() function, no references
to people or movie are collected from textual information (like
the plot of a movie).


  OTHER TIPS
  ==========

Remember that, calling the search_movie() and search_person()
methods of the "IMDb" object, you can provide a "results"
parameter, to download only a limited amount of results (20,
by default).

With the http, httpThin and mobile data access systems you can
set a proxy with the set_proxy() method; e.g.:
  i = IMDb('http')
  i.set_proxy('http://localhost:8080/')

Remember that the proxy is automatically used if the $HTTP_PROXY
environment variable is set.