diff options
-rw-r--r-- | AUTHORS | 2 | ||||
-rw-r--r-- | MANIFEST | 10 | ||||
-rwxr-xr-x | NEWS | 3 | ||||
-rw-r--r-- | activity.py | 4 | ||||
-rwxr-xr-x | activity/activity.info | 2 | ||||
-rw-r--r-- | py/server.py | 8 | ||||
-rw-r--r-- | static/biology.png | bin | 0 -> 12873 bytes | |||
-rw-r--r-- | static/bullet.gif | bin | 0 -> 50 bytes | |||
-rw-r--r-- | static/earth.png | bin | 0 -> 21002 bytes | |||
-rw-r--r-- | static/headbg.jpg | bin | 0 -> 7881 bytes | |||
-rw-r--r-- | static/humanities.png | bin | 0 -> 153948 bytes | |||
-rw-r--r-- | static/index.html | 204 | ||||
-rw-r--r-- | static/math.png | bin | 0 -> 9866 bytes | |||
-rw-r--r-- | static/monobook.css (renamed from js/monobook.css) | 0 | ||||
-rw-r--r-- | static/phys_science.png | bin | 0 -> 17125 bytes | |||
-rw-r--r-- | static/socialscience.png | bin | 0 -> 4779 bytes | |||
-rw-r--r-- | static/society.png | bin | 0 -> 3308 bytes | |||
-rw-r--r-- | static/technology.png | bin | 0 -> 21617 bytes |
18 files changed, 227 insertions, 6 deletions
@@ -3,5 +3,5 @@ Patrick Collison <patrick@collison.ie> Some code from bzip2 and the FreeBSD implementation of locate has been used; more details are provided in README OLPC adaptation by: -* Chris Ball <cjb@pullcord.laptop.org> +* Chris Ball <cjb@laptop.org> * Wade Brainerd <wadetb@gmail.com> @@ -38,7 +38,6 @@ c/searcher.c c/configure.ac c/indexer.i c/aclocal.m4 -c/safe.o c/ternary.h c/debug.h c/indexer.c @@ -52,3 +51,12 @@ js/wiki2html.js js/monobook.css js/instaview-0.6.1.js js/instaview-0.6.4.js +static/society.png +static/index.html +static/phys_science.png +static/math.png +static/biology.png +static/socialscience.png +static/earth.png +static/humanities.png +static/technology.png @@ -1,3 +1,6 @@ +* Add link-checking -- links not present in the index are in green.
+* Add portal page by Madeleine Price Ball.
+
2
* Added search toolbar to activity toolbar.
diff --git a/activity.py b/activity.py index 56acdfe..c4b363f 100644 --- a/activity.py +++ b/activity.py @@ -32,7 +32,7 @@ from searchtoolbar import SearchToolbar # Default settings. HTTP_PORT = '8000' WIKIDB = '40ormore.xml.bz2' -HOME_PAGE = '/wiki/Peru' +HOME_PAGE = '/static/index.html' # Activity class, extends WebActivity. class WikipediaActivity(webactivity.WebActivity): @@ -56,4 +56,4 @@ class WikipediaActivity(webactivity.WebActivity): def kill_server(self): print "Stopping server...\n" os.kill(self.server_pid, signal.SIGHUP) -
\ No newline at end of file + diff --git a/activity/activity.info b/activity/activity.info index fa00909..5a04c2b 100755 --- a/activity/activity.info +++ b/activity/activity.info @@ -1,6 +1,6 @@ [Activity] name = Wikipedia -activity_version = 2 +activity_version = 3 service_name = org.laptop.WikipediaActivity icon = activity-wikipedia exec = sugar-activity activity.WikipediaActivity diff --git a/py/server.py b/py/server.py index c46f527..6811430 100644 --- a/py/server.py +++ b/py/server.py @@ -126,7 +126,13 @@ class WikiRequestHandler(SimpleHTTPRequestHandler): while True: # Capitalize the first letter of the article -- Trac #6991. title = title[0].capitalize() + title[1:] + # Replace underscores with spaces in title. + title = title.replace("_", " ") article_text = wp.wp_load_article(title) + + # To see unmodified article_text, uncomment here. + # print article_text + m = re.match(r'^\s*\#redirect\s+\[\[(.*)\]\]', article_text, re.IGNORECASE|re.MULTILINE) if not m: break title = m.group(1) @@ -149,7 +155,7 @@ class WikiRequestHandler(SimpleHTTPRequestHandler): # Embed CSS file. self.wfile.write("<style type='text/css' media='screen, projection'>"\ - "@import '/js/monobook.css';</style>") + "@import '/static/monobook.css';</style>") self.wfile.write("</head>") diff --git a/static/biology.png b/static/biology.png Binary files differnew file mode 100644 index 0000000..7af35af --- /dev/null +++ b/static/biology.png diff --git a/static/bullet.gif b/static/bullet.gif Binary files differnew file mode 100644 index 0000000..b43de48 --- /dev/null +++ b/static/bullet.gif diff --git a/static/earth.png b/static/earth.png Binary files differnew file mode 100644 index 0000000..ff3abea --- /dev/null +++ b/static/earth.png diff --git a/static/headbg.jpg b/static/headbg.jpg Binary files differnew file mode 100644 index 0000000..5491c6e --- /dev/null +++ b/static/headbg.jpg diff --git a/static/humanities.png b/static/humanities.png Binary files differnew file mode 100644 index 0000000..34736c1 --- /dev/null +++ b/static/humanities.png diff --git a/static/index.html b/static/index.html new file mode 100644 index 0000000..97ebf42 --- /dev/null +++ b/static/index.html @@ -0,0 +1,204 @@ +<html> +<meta http-equiv="Content-Type" content="text/html;charset=utf8"> +<center> +<table> + +<tr> +<td width=50% style="background:#F1FAFF; border:2px solid #C6E4F2; border-top:0; padding:0 23px .8em 23px"> +<img alt="" src="/static/phys_science.png" width="60" border="0" /><span style="font-size:105%; font-weight:bold"><a href="/wiki/Ciencia" title="Ciencia">Ciencia</a>: <a href="/wiki/Astronom%C3%ADa" title="Astronomía">Astronomía</a>, <a href="/wiki/F%C3%ADsica" title=Física>Física</a> y <a href="/wiki/Qu%C3%ADmica>Química">Química</a></span> +<br /> +<a href="/wiki/D%C3%ADa" title="Día">Día</a> +· <a href="/wiki/Estrella" title="Estrella">Estrella</a> +· <a href="/wiki/Galaxia" title="Galaxia">Galaxia</a> +· <a href="/wiki/Luna" title="Luna">Luna</a> +· <a href="/wiki/Planeta" title="Planeta">Planeta</a> +· <a href="/wiki/Sol" title="Sol">Sol</a> +· <a href="/wiki/Teor%C3%ADa del Big Bang" title="Teoría del Big Bang">Teoría del Big Bang</a> +· <a href="/wiki/Universo" title="Universo">Universo</a> +<br /> +<a href="/wiki/Calor" title="Calor">Calor</a> +· <a href="/wiki/Color" title="Color">Color</a> +· <a href="/wiki/Energ%C3%ADa" title="Energía">Energía</a> +· <a href="/wiki/Fuerza" title="Fuerza">Fuerza</a> +· <a href="/wiki/Luz" title="Luz">Luz</a> +· <a href="/wiki/Movimiento" title="Movimiento">Movimiento</a> +· <a href="/wiki/Sonido" title="Sonido">Sonido</a> +· <a href="/wiki/Tiempo" title="Tiempo">Tiempo</a> +<br /> +<a href="/wiki/Agua" title="Agua">Agua</a> +· <a href="/wiki/%C3%81tomo" title="Átomo">Átomo</a> +· <a href="/wiki/Elemento qu%C3%ADmico" title="Elemento químico">Elemento químico</a> +· <a href="/wiki/Fuego" title="Fuego">Fuego</a> +· <a href="/wiki/Materia" title="Materia">Materia</a> +· <a href="/wiki/Medici%C3%B3n" title="Medición">Medición</a> +· <a href="/wiki/Metal" title="Metal">Metal</a> +</td> + +<td style="background:#F1FAFF; border:2px solid #C6E4F2; border-top:0; padding:0 23px .8em 23px"><p><img alt="" src="/static/biology.png" width="60" border="0" /><span style="font-size:105%; font-weight:bold"><a href="/wiki/Ciencia" title="Ciencia">Ciencia</a>: <a href="/wiki/Biolog%C3%ADa" name=Biología>Biología</a> y <a href="/wiki/Medicina" name="Medicina">Medicina</a></span> +<br /> +<a href="/wiki/Animalia" title="Animalia">Animalia</a> +· <a href="/wiki/Bacteria" title="Bacteria">Bacteria</a> +· <a href="/wiki/C%C3%A9lula" title="Célula">Célula</a> +· <a href="/wiki/Fungi" title="Fungi">Fungi</a> +· <a href="/wiki/Plantae" title="Plantae">Plantae</a> +· <a href="/wiki/Ser vivo" title="Ser vivo">Ser vivo</a> +· <a href="/wiki/Virus" title="Virus">Virus</a> +<br /> +<a href="/wiki/Anatom%C3%ADa" title="Anatomía">Anatomía</a> +· <a href="/wiki/Cerebro" title="Cerebro">Cerebro</a> +· <a href="/wiki/Muerte" title="Muerte">Muerte</a> +· <a href="/wiki/Salud" title="Salud">Salud</a> +· <a href="/wiki/Homo sapiens" title="Seres humanos">Seres humanos</a> +· <a href="/wiki/Vida" title="Vida">Vida</a> +<br /> +<a href="/wiki/Agricultura" title="Agricultura">Agricultura</a> +· <a href="/wiki/Ecolog%C3%ADa" title="Ecología">Ecología</a> +· <a href="/wiki/Naturaleza" title="Naturaleza">Naturaleza</a> +</td> +</tr> + +<tr> +<td width=50% style="background:#F1FAFF; border:2px solid #C6E4F2; border-top:0; padding:0 23px .8em 23px"> +<p> +<img alt="" src="/static/socialscience.png" width="60" border="0" /> +<span style="font-size:105%; font-weight:bold"><a href="/wiki/Ciencias Sociales" title="Ciencias Sociales">Ciencias Sociales</a></span> +<br /> +<a href="/wiki/Antropolog%C3%ADa" name="Antropología">Antropología</a> +· <a href="/wiki/Arqueolog%C3%ADa" name="Arqueología">Arqueología</a> +· <a href="/wiki/Comunidad" title="Comunidad">Comunidad</a> +· <a href="/wiki/Raza" title="Raza">Raza</a> +· <a href="/wiki/Sociolog%C3%ADa" title="Sociología">Sociología</a> +· <a href="/wiki/Tradici%C3%B3n" name="Tradición">Tradición</a> +<br /> +<a href="/wiki/Ciudad" title="Ciudad">Ciudad</a> +· <a href="/wiki/Delito" title="Delito">Delito</a> +· <a href="/wiki/Derecho" title="Derecho">Derecho</a> +· <a href="/wiki/Gobierno" title="Gobierno">Gobierno</a> +· <a href="/wiki/Guerra" title="Guerra">Guerra</a> +· <a href="/wiki/Pa%C3%ADs" title="País">País</a> +· <a href="/wiki/Pol%C3%ADtica" title="Política">Política</a> +<br /> +<a href="/wiki/Dinero" title="Dinero">Dinero</a> +· <a href="/wiki/Econom%C3%ADa" title="Economía">Economía</a> +· <a href="/wiki/Negocio" title="Negocio">Negocio</a> +· <a href="/wiki/Publicidad" title="Publicidad">Publicidad</a> +<br /> +<a href="/wiki/Amor" title="Amor">Amor</a> +· <a href="/wiki/Emoci%C3%B3n" title="Emoción">Emoción</a> +· <a href="/wiki/Mente %28psicolog%C3%ADa%29" title="Mente">Mente</a> +· <a href="/wiki/Psicolog%C3%ADa" title="Psicología">Psicología</a> +· <a href="/wiki/Sue%C3%B1o" title="Sueño">Sueño</a> +</td> + +<td style="background:#F1FAFF; border:2px solid #C6E4F2; border-top:0; padding:0 23px .8em 23px"> +<p> +<img alt="" src="/static/society.png" width="60" border="0" /> +<span style="font-size:105%; font-weight:bold"><a href="/wiki/Cultura" title="Cultura">Cultura</a> y <a href="/wiki/Sociedad" title="Sociedad">Sociedad</span> +<br /> +<a href="/wiki/Alimento" title="Alimento">Alimento</a> +· <a href="/wiki/Casa" title="Casa">Casa</a> +· <a href="/wiki/Educaci%C3%B3n" title="Educación">Educación</a> +· <a href="/wiki/Familia" title="Familia">Familia</a> +· <a href="/wiki/Indumentaria" title="Ropa">Ropa</a> +<br /> +<a href="/wiki/Deporte" title="Deporte">Deporte</a> +· <a href="/wiki/Humor" title="Humor">Humor</a> +· <a href="/wiki/Juego" title="Juego">Juego</a> +</td> +</tr> + +<tr> +<td width=50% style="background:#F1FAFF; border:2px solid #C6E4F2; border-top:0; padding:0 23px .8em 23px"> +<p><img alt="" src="/static/humanities.png" width="60" border="0" /><span style="font-size:105%; font-weight:bold"><a href="/wiki/Humanidades" title="Humanidades">Humanidades</span> +<br /> +<a href="/wiki/Alfabeto" title="Alfabeto">Alfabeto</a> +· <a href="/wiki/Comunicaci%C3%B3n" title="Comunicación">Comunicación</a> +· <a href="/wiki/Informaci%C3%B3n" title="Información">Información</a> +· <a href="/wiki/Lenguaje" title="Lenguaje">Lenguaje</a> +· <a href="/wiki/Ling%C3%BC%C3%ADstica" title="Lingüística">Lingüística</a> +· <a href="/wiki/Medio de comunicación" title="Medio de comunicación">Medio de comunicación</a> +<br /> +<a href="/wiki/Civilizaci%C3%B3n" title="Civilización">Civilización</a> +· <a href="/wiki/Filosof%C3%ADa" title="Filosofía">Filosofía</a> +· <a href="/wiki/Historia" title="Historia">Historia</a> +· <a href="/wiki/Historia universal" title="Historia universal">Historia universal</a> +· <a href="/wiki/Mitolog%C3%ADa" title="Mitología">Mitología</a> +· <a href="/wiki/Religi%C3%B3n" title="Religión">Religión</a> +<br /> +<a href="/wiki/Arte" title="Arte">Arte</a> +· <a href="/wiki/Arquitectura" title="Arquitectura">Arquitectura</a> +· <a href="/wiki/Arte Visual" title="Dibujo">Dibujo</a> +· <a href="/wiki/Escultura" title="Escultura">Escultura</a> +· <a href="/wiki/Pintura art%C3%ADstica" title="Pintura artística">Pintura artística</a> +<br /> +<a href="/wiki/Cine" title="Cine">Cine</a> +· <a href="/wiki/Danza" title="Danza">Danza</a> +· <a href="/wiki/Literatura" title="Literatura">Literatura</a> +· <a href="/wiki/M%C3%BAsica" title="Música">Música</a> +· <a href="/wiki/Poes%C3%ADa" title="Poesía">Poesía</a> +· <a href="/wiki/Teatro" title="Teatro">Teatro</a> +</td> + +<td style="background:#F1FAFF; border:2px solid #C6E4F2; border-top:0; padding:0 23px .8em 23px"><p><img alt="" src="/static/math.png" width="60" order="0" /><span style="font-size:105%; font-weight:bold"><a href="/wiki/Matem%C3%A1tica" name="Matemática">Matemática</a> y <a href="/wiki/L%C3%B3gica" name=Lógica>Lógica</A></span> +<br /> +<a href="/wiki/%C3%81lgebra" name="Álgebra">Álgebra</a> +· <a href="/wiki/Estad%C3%ADstica" title="Estadística">Estadística</a> +· <a href="/wiki/Geometr%C3%ADa" title="Geometría">Geometría</a> +· <a href="/wiki/N%C3%BAmero" title="Número">Número</a> +</td> +</tr> + +<tr> +<td width=50% style="background:#F1FAFF; border:2px solid #C6E4F2; border-top:0; padding:0 23px .8em 23px"> +<img alt="" src="/static/technology.png" width="60" border="0" /> +<span style="font-size:105%; font-weight:bold"><a href="/wiki/Tecnolog%C3%ADa">Tecnología</a></span> +<br /> +<a href="/wiki/Computadora" title="Computadora">Computadora</a> +· <a href="/wiki/Electricidad" title="Electricidad">Electricidad</a> +· <a href="/wiki/Electr%C3%B3nica" title="Electrónica">Electrónica</a> +· <a href="/wiki/Internet" title="Internet">Internet</a> +· <a href="/wiki/Radio %28medio de comunicaci%C3%B3n%29" title="Radio">Radio</a> +· <a href="/wiki/Telecomunicaci%C3%B3n" title="Telecomunicación">Telecomunicación</a> +· <a href="/wiki/Televisi%C3%B3n" title="Televisión">Televisión</a> +<br /> +<a href="/wiki/Aeronave" title="Aeronave">Aeronave</a> +· <a href="/wiki/Autom%C3%B3vil" title="Automóvil">Automóvil</a> +· <a href="/wiki/Barco" title="Barco">Barco</a> +· <a href="/wiki/Transporte" title="Transporte">Transporte</a> +· <a href="/wiki/Tren" title="Tren">Tren</a> +<br /> +<a href="/wiki/Arma" title="Arma">Arma</a> +· <a href="/wiki/Combustible" title="Combustible">Combustible</a> +· <a href="/wiki/Herramienta" title="Herramienta">Herramienta</a> +· <a href="/wiki/Ingenier%C3%ADa" title="Ingeniería">Ingeniería</a> +</td> + +<td style="background:#F1FAFF; border:2px solid #C6E4F2; border-top:0; padding:0 23px .8em 23px"> +<p> +<img alt="" src="/static/earth.png" width="60" border="0" /> +<span style="font-size:105%; font-weight:bold"><a href="/wiki/Tierra" title="Tierra">Tierra</a> y <a href="/wiki/Geografía" title="Geografía">Geografía</a></span> +<br /> +<a href="/wiki/Clima" title="Clima">Clima</a> +· <a href="/wiki/Continente" title="Continente">Continente</a> +· <a href="/wiki/Desastre natural" title="Desastre natural">Desastre natural</a> +· <a href="/wiki/Geolog%C3%ADa" title="Geología">Geología</a> +· <a href="/wiki/Meteorolog%C3%ADa" title="Meteorología">Meteorología</a> +· <a href="/wiki/Mineral" title="Mineral">Mineral</a> +· <a href="/wiki/Oc%C3%A9ano" title="Océano">Océano</a> +<br /> +<a href="/wiki/Africa" title="Africa">Africa</a> +· <a href="/wiki/Am%C3%A9rica del Norte" title="América del Norte">América del Norte</a> +· <a href="/wiki/Am%C3%A9rica del Sur" title="América del Sur">América del Sur</a> +· <a href="/wiki/Ant%C3%A1rtida" title="Antártida">Antártida</a> +· <a href="/wiki/Asia" title="Asia">Asia</a> +· <a href="/wiki/Continente australiano" title="Continente australiano">Continente australiano</a> +· <a href="/wiki/Europa" title="Europa">Europa</a> +· <a href="/wiki/Ocean%C3%ADa" title="Oceanía">Oceanía</a> +</td> +</tr> + + + +</table> +</center> +</html> diff --git a/static/math.png b/static/math.png Binary files differnew file mode 100644 index 0000000..0b81508 --- /dev/null +++ b/static/math.png diff --git a/js/monobook.css b/static/monobook.css index 3b0149a..3b0149a 100644 --- a/js/monobook.css +++ b/static/monobook.css diff --git a/static/phys_science.png b/static/phys_science.png Binary files differnew file mode 100644 index 0000000..e2c0c7e --- /dev/null +++ b/static/phys_science.png diff --git a/static/socialscience.png b/static/socialscience.png Binary files differnew file mode 100644 index 0000000..a989732 --- /dev/null +++ b/static/socialscience.png diff --git a/static/society.png b/static/society.png Binary files differnew file mode 100644 index 0000000..e8ffbd1 --- /dev/null +++ b/static/society.png diff --git a/static/technology.png b/static/technology.png Binary files differnew file mode 100644 index 0000000..4613eeb --- /dev/null +++ b/static/technology.png |