#!/usr/bin/env python

config = Configuration()

###
### CONFIGURE THIS SERVER STARTING HERE
###

# This identifying name is used throughout Pagecast
config.name = "Pagecast Test Service"

# standard stuff -- machine, port, and path to submission script
config.machine= "localhost"
config.port=80
config.uri="/python/pagecast-skel.py"

# this defines the "key" associated with the actual URL submission
config.FormQuery="q"

# set this to None if an email parameter is not required by the site
config.EmailQuery = "email"

# any other strange parameters to be passed to the remote script
config.Params = { "ad" : "1" }

# a list of strings found in the resulting HTML when the submission worked.
config.Success = ["success"]

# ditto but for when the submission failed
config.Fail = ["fail"]

# if this is defined, the logs will print the entire raw HTML that the search
# engine returns for each hit.
config.PrintAll = None

###
### NO USER-SERVICEABLE PARTS BELOW
###

import generic, serverbase

# make sure we are using a unique name
config.name = serverbase.FindUniqueName(ServerRegister, config.name)

### Assumes ServerRegister dict in local namespace
### also assumes : class Configuration: pass

ServerRegister[config.name] = serverbase.ThreadBase(G, config.name, generic.GenericHTTP(G, config.name, config))
