Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
branch: master
Fetching contributors…

Cannot retrieve contributors at this time

68 lines (37 sloc) 2.452 kB

PowerResearch Server System

About

PowerResearch Server System allows you to provide clients witha system to quickly and easily search several sources at on time

License

PRSS is licensed under the IROI Public Software License, copyright 2012 I'm Running Out of Ideas, LLC.

Configuration

Configuration is held in the srserver.yaml file found in the installation directory. Configuration has several keys, 'moddir' for the directory holding modules, 'host' for the name of the host to bind to, 'authtype' to turn on/off authentication, and 'logfile' for where the system should store the log.

Authentication

If you enable the authentication system by setting 'authtype' to 'upass', you will need to run the authmanager tool provided to create user/password combinations, if you set it to 'key' use authmanager to manage keys.

Search Providers

Adding a search provider is relatively easy, if you know what you are doing. If the search provider is already written, just stick it into the moddir in your configuration file. Otherwise, you will have to write it.

Writing a Search Provider

Creating

First thing, the provider does is create a key in the %providers hash with the name of the provider. from that pint in the hash, it produces a data structure similar to the following:

    $providers{name}->{version} = version;
    $providers{name}->{search} = sub{...};
    $providers{name}->{display} = sub{...};
    $providers{name}->{formats} = qw/formats_available/;
    $providers{name}->{special} = sub{...};
    $providers{name}->{specialinfo} = (...);
    #add a module loaded message to the log with LOG

Routines

Search

This routine will take one argument, this being the search term. From their it will search the source, and provide results as a YAML stream.

Display

Display takes one argument, and based on such outputs template for the format in the Template format. Should provide text, HTML, and csv-bib as a general rule.

Special

Special takes one or more arguments, using these will perform a custom action, which can be anything.

Version

This variable simply defines the version.

Formats

Formats is a list off all formats provided by the system

SpecialInfo

SpecialInfo contains a YAML stream containing the commands, and information about the arguments to the special subroutine.

Jump to Line
Something went wrong with that request. Please try again.