Pywikipedia

I'm looking for some feedback on how to improve Dab solver. -- Dispenser
WPW (web pywikipedia) framework is a minimal reimplementation of pywikipedia. It is designed to load fast with a smaller memory footprint with as few libraries as possible. Despite its incompleteness I preferable it for testing as it eliminates the 5 second initialization delay of pywikipedia.

Programs

The programs below have been port as to test of frameworks capability. Only a few changes are necessary to deal HTML limitations and lack of interactivity. Programs run in a similar manner to their command line counterparts. If the program is significantly changed or enhanced from its command line counterpart it is prefixed with “web” in front.

./? -page:

Most the scripts use pagegenerators.py library allow for multiple page arguments such as from sources: backlinks, categories, Title prefixing, and external link.

commonfixes.py

Applies link, HTML, and template fixes similar to AWB's General fixes, only enabled the Englished Wikipedia. Used by webchecklinks, webreflinks, and PDFbot to standardize wikisyntax. Bookmarklet: commonfixes

noreferences.py

Adds a <references /> to the References section if missing and <ref> exists; if the section does not exists it intelligently adds it.

pdfbot.py

Add file sizes to external link wrapped with the formatting template {{PDFlink}}. Source code

reflinks.py

Fills in the title for bare reference links in the form of <ref>http://en.wikipedia.org/</ref> and converts into <ref>[http://en.wikipedia.org/ Wikipedia, the free encyclopedia<!-- bot generated title -->]</ref> using the title from an HTML page or PDF. DumZiBoT run this script to add titles to many references and the script writing the bot owner and writing has posted some of the frequently asked question about his script.

standardize_notes.py

Update and fixes reference using the footnotes system. Developed by User:SEWilco.

NOTE: This script is not capable of handling the <ref></ref> syntax. It just handles the {{ref}} syntax, which is still used, but is DEPRECATED on the English Wikipedia.

table2wiki.py

Convert many HTML-tables into MediaWiki tables (wikitables).

Examples: [1], [2]

Features

  • Quick porting between command line and web application
  • Fast startup times (< 1 sec)
  • Limited Multi-language (excluded localized namespaces)
  • MediaWiki like human and machine interfaces

General query parameters

Edit token

If the string &wpEditToken= is supplied with a valid edit token for your account the save button will be enabled. This can be used in conjuction with the parameter &autoclick= to autosave pages.

Porting

  1. Add to top of the script #!/usr/bin/python2.5
  2. Change the permissions to -rwxr-xr-w
  3. Change the initializing code from
if __name__ == "__main__":
	try:
		main()
	finally:
		wikipedia.stop()
to
if __name__ == "__main__" and wikipedia.handleUrlAndHeader():
	try:
		wikipedia.startContent()
		main()
	finally:
		wikipedia.endContent()
		wikipedia.stopme()
Interaction