Cheshire3 Commands Reference¶
Introduction¶
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.
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.
session and server variable will be created automatically, as will a db 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 Session, Server and 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 Server configuration file. Defaults to the default Server configuration included in the distribution.
- --interactive¶
Drop into interactive console after running script. If no script is provided, interactive mode is the default.
cheshire3-init¶
Initialize a Cheshire3 Database with some generic configurations.
- DIRECTORY
name of directory in which to init the Database. Defaults to the current working directory.
- -h, --help¶
show help message and exit
- -s <PATH>, --server-config <PATH>¶
Path to Server configuration file. Defaults to the default Server configuration included in the distribution.
- -d <DATABASE>, --database <DATABASE>¶
Identifier of the Database to init. Default to db_<database-directory-name>.
- -t <TITLE>, --title <TITLE>¶
Title for the Cheshire3 Database to init. This wil be inserted into the <docs> section of the generated configuration, and the CQL Protocol Map configuration.
- -c <DESCRIPTION>, --description <DESCRIPTION>¶
Description of the Database to init. This wil be inserted into the <docs> section of the generated configuration, and the CQL Protocol Map configuration.
cheshire3-register¶
Register a Cheshire3 Database config file with the Cheshire3 Server.
- CONFIGFILE
Path to configuration file for a Database to register with the Cheshire3 Server. Default: config.xml in the current working directory.
- --help¶
show help message and exit
cheshire3-load¶
Load data into a Cheshire3 Database.
- data
Data to load into the Database.
- -h, --help¶
show help message and exit
- -s <PATH>, --server-config <PATH>¶
Path to Server configuration file. Defaults to the default Server configuration included in the distribution.
- -l <CACHE>, --cache-level <CACHE>¶
Level of in memory caching to use when reading documents in. For details, see Loading Data
- -f <FORMAT>, --format <FORMAT>¶
Format of the data parameter. For details, see Loading Data
- -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 Database.
- query
Query to execute on the Database.
- -h, --help¶
show help message and exit
- --server-config <PATH>¶
Path to Server configuration file. Defaults to the default Server configuration included in the distribution.
- -f <FORMAT>, --format <FORMAT>¶
Format/language of query. default: CQL
- -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 Databases. via SRU.
- -h, --help¶
show help message and exit
- -s <PATH>, --server-config <PATH>¶
Path to Server configuration file. Defaults to the default 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