X

Track changes made to this page

If you find this page useful and would like to be notified of changes made to this page, start by inputting your email below.



Privacy policy
Close this window

powered by ChangeDetection

Wellwiki Page Generation Scripts

Page Generation

Wellwiki uses three primary scripts in order to generate new pages. All of these scripts are located within ~/installers/wikimanager/

pre_deployment.sql

The first script updates the violation counts for wells in the well table of wellsdb_dev. It can be run from mysql by logging in as root, selecting wellsdb_dev as the table of choice, and running source ~/installers/wikimanager/pre_deployment.sql

The script takes about 1 minute to fully execute.

CreateEntitySources.py

This is a python2 script that will read through all wiki pages located in the wikiManagerPages table within the wikidb database that have "NEEDS_UPDATE" set to 1.

Each entry within the wikiManagerPages table will be queried for in the wellsdb_dev database, which then outputs newly generated pages to ~/PycharmProjects/WikiManager/WikiSources

Here is some sample SQL to flag all Pennsylvania pages for update:

UPDATE `wikiManagerPages` SET `NEEDS_UPDATE`='1' WHERE `PAGE_NAME` LIKE '37%

wikiManagerPages should be updated periodically, especially prior to conducting updates such as this. The script to do this is currently unable to be located


commit_new_pages.py

This python2 file takes a source directory as an argument, and begins adding all wiki pages within that source directory to the actual wikimedia database, making them available for viewing here.

Usage: python commit_new_pages.py ~/PycharmProjects/WikiManager/WikiSources