Package pywikipedia :: Module table2wiki
[show private | hide private]
[frames | no frames]

Module pywikipedia.table2wiki

Nifty script to convert HTML-tables to Wikipedia's syntax.


-file:filename
      will read any [[wikipedia link]] and use these articles

-sql:XYZ
      reads a local SQL cur dump, available at http://download.wikimedia.org/.
      Searches for pages with HTML tables, and tries to convert them on the live
      wiki. Example:
      python table2wiki.py -sql:20040711_cur_table.sql.sql -lang:de

SQL-Query

SELECT CONCAT('[[', cur_title, ']]')
       FROM cur
       WHERE (cur_text LIKE '%<table%'
         OR cur_text LIKE '%<TABLE%')
         AND cur_title REGEXP "^[A-N]"
         AND cur_namespace=0
       ORDER BY cur_title
       LIMIT 500


FEATURES
Save against missing </td>
Corrects attributes of tags

KNOWN BUGS
Broken HTML-tables will most likely result in broken wiki-tables!
Please check every article you change.

Classes
Table2WikiRobot  
TableSqlDumpGenerator  

Function Summary
  main()

Imported modules:
pywikipedia.config, pywikipedia.pagegenerators, re, sys, time, pywikipedia.wikipedia
Imported variables:
__version__, msg_multiple_warnings, msg_no_warnings, msg_one_warning
Generated by Epydoc 2.1 on Sun Jul 03 17:07:33 2005 http://epydoc.sf.net