This page describes the Cheshire3 command line utilities, their intended purpose, and options.
Examples of their use can be found in the Command-line UI Tutorial </tutorial/commands>
.
cheshire3
Cheshire3 interactive interpreter.
This wraps the main Python interpreter to ensure that Cheshire3 architecture is initialized. It can be used to execute a custom script
or just drop you into the interactive console.
:pysession
and :pyserver
variable will be created automatically, as will a :pydb
object if you ran the script from inside a Cheshire3 database directory, or provided a database identifier using the cheshire3 --database
option. These variables will correspond to instances of :py~cheshire3.baseObjects.Session
, :py~cheshire3.baseObjects.Server
and :py~cheshire3.baseObjects.Database
respectively.
script
Run the commands in the script inside the current cheshire3 environment. If script is not provided it will drop you into an interactive console (very similar the the native Python interpreter.) You can also tell it to drop into interactive mode after executing your script using the --interactive
option.
-h, --help
show help message and exit
-s <PATH>, --server-config <PATH>
Path to :py~cheshire3.baseObjects.Server
configuration file. Defaults to the default :py~cheshire.baseObjects.Server
configuration included in the distribution.
-d <DATABASE>, --database <DATABASE>
Identifier of the :py~cheshire3.baseObjects.Database
--interactive
Drop into interactive console after running script
. If no script
is provided, interactive mode is the default.
cheshire3-init
Initialize a Cheshire3 :py~cheshire3.baseObjects.Database
with some generic configurations.
DIRECTORY
name of directory in which to init the :py~cheshire3.baseObjects.Database
. Defaults to the current working directory.
-h, --help
show help message and exit
-s <PATH>, --server-config <PATH>
Path to :py~cheshire3.baseObjects.Server
configuration file. Defaults to the default :py~cheshire.baseObjects.Server
configuration included in the distribution.
-d <DATABASE>, --database <DATABASE>
Identifier of the :py~cheshire3.baseObjects.Database
to init. Default to db<database-directory-name>.
-t <TITLE>, --title <TITLE>
Title for the Cheshire3 :py~cheshire3.baseObjects.Database
to init. This wil be inserted into the config-docs
section of the generated configuration, and the CQL Protocol Map configuration <config/protocolMap>
.
-c <DESCRIPTION>, --description <DESCRIPTION>
Description of the :py~cheshire3.baseObjects.Database
to init. This wil be inserted into the config-docs
section of the generated configuration, and the CQL Protocol Map configuration <config/protocolMap>
.
-p <PORT>, --port <PORT>
Port on which :py~cheshire3.baseObjects.Database
will be served via SRU (Search and Retrieve via URL)
.
cheshire3-register
Register a Cheshire3 :py~cheshire3.baseObjects.Database
config file with the Cheshire3 :py~cheshire3.baseObjects.Server
.
CONFIGFILE
Path to configuration file for a :py~cheshire3.baseObjects.Database
to register with the Cheshire3 :py~cheshire3.baseObjects.Server
. Default: config.xml
in the current working directory.
--help
show help message and exit
--server-config <PATH>
Path to :py~cheshire3.baseObjects.Server
configuration file. Defaults to the default :py~cheshire.baseObjects.Server
configuration included in the distribution.
cheshire3-load
Load data into a Cheshire3 :py~cheshire3.baseObjects.Database
.
data
Data to load into the :py~cheshire3.baseObjects.Database
.
-h, --help
show help message and exit
-s <PATH>, --server-config <PATH>
Path to :py~cheshire3.baseObjects.Server
configuration file. Defaults to the default :py~cheshire.baseObjects.Server
configuration included in the distribution.
-d <DATABASE>, --database <DATABASE>
Identifier of the :py~cheshire3.baseObjects.Database
-l <CACHE>, --cache-level <CACHE>
Level of in memory caching to use when reading documents in. For details, see tutorial-python-loadingdata
-f <FORMAT>, --format <FORMAT>
Format of the data parameter. For details, see tutorial-python-loadingdata
-t <TAGNAME>, --tagname <TAGNAME>
The name of the tag which starts (and ends!) a record. This is useful for extracting sections of documents and ignoring the rest of the XML in the file.
-c <CODEC>, --codec <CODEC>
The name of the codec in which the data is encoded. Commonly ascii
or utf-8
.
cheshire3-search
Search a Cheshire3 :py~cheshire3.baseObjects.Database
.
query
Query to execute on the :py~cheshire3.baseObjects.Database
.
-h, --help
show help message and exit
--server-config <PATH>
Path to :py~cheshire3.baseObjects.Server
configuration file. Defaults to the default :py~cheshire.baseObjects.Server
configuration included in the distribution.
-d <DATABASE>, --database <DATABASE>
Identifier of the :py~cheshire3.baseObjects.Database
-f <FORMAT>, --format <FORMAT>
Format/language of query. default: CQL (Contextual Query Language)
-m <MAXIMUM>, --maximum-records <MAXIMUM>
Maximum number of hits to display
-s <START>, --start-record <START>
Point in the resultSet to start from (enables result paging) first record in results = 1 (not 0)
cheshire3-serve
Start a demo server to expose Cheshire3 :py~cheshire3.baseObjects.Database
s. via SRU (Search and Retrieve via URL)
.
-h, --help
show help message and exit
-s <PATH>, --server-config <PATH>
Path to :py~cheshire3.baseObjects.Server
configuration file. Defaults to the default :py~cheshire.baseObjects.Server
configuration included in the distribution.
--hostname <HOSTNAME>
Name of host to listen on. Default is derived by inspection of local system
-p <PORT>, --port <PORT>
Number of port to listen on. Default: 8000