opentrep-dbmgr - Man Page

Interactive command-line utility to manage the SQL database (SQLite3 or MySQL)

Synopsis

opentrep-dbmgr [--prefix] [-v|--version] [-h|--help] [-p|--porfile <POR-file-path>] [-d|--xapiandb <Xapian-travel-database-path>] [-t|--sqldbtype <SQL-database-type>] [-s|--sqldbconx <SQL-database-connection-string>] [-l|--log <path-to-output-log-file>]

Description

opentrep-dbmgr is a small program to manage the relational (SQL) database. For now, only SQLite3 and MariaDB/MySQL databases are supported. The file with the list of the OPTD-maintained POR (points of reference) may be parsed, and the corresponding content inserted into the SQL database. At the prompt, launch the 'help' or 'tutorial' command to heva more details.

opentrep-dbmgr accepts the following options:

--prefix
Show the Opentrep installation prefix.

-v, --version
Print the currently installed version of Opentrep on the standard output.

-h, --help
Produce that message and show usage.

-p, --porfile <POR-file-path>
Path (directory and file name) of the file of POR (points of reference). Usually, the file is optd_por_public.csv, for which the latest version may be found in the OpenTravelData project on GitHub: https://github.com/opentraveldata/opentraveldata/tree/master/opentraveldata

-d, --xapiandb <Xapian-travel-database-path>
Path (directory) to the Xapian travel database. The indexer creates, or overwrites it when it already exists, the Xapian database. It materialises as a collection of data files within a directory usually named 'traveldb'.

-t, --sqldbtype <SQL-database-type>
SQL database type, e.g., nosql (no SQL database), sqlite, mysql

-s, --sqldbconx <SQL-database-connection-string>
SQL database connection string, e.g., ~/tmp/opentrep/sqlite_travel.db (for SQLite3), 'db=trep_trep user=trep password=trep' (for MySQL)

-l, --log <path-to-output-log-file>
Path (absolute or relative) of the output log file.

See the output of the `opentrep-dbmgr --help' command for default options.

Once the program is launched, just type the 'help' command to get the full list of all the possible commands and their parameters. Note that that program features the auto-completion of commands.

Examples

With SQLite3
opentrep-dbmgr -t sqlite -s /tmp/opentrep/sqlite_travel.db

With MySQL
opentrep-dbmgr -t mysql -s 'db=trep_trep user=trep password=trep'

See Also

opentrep-indexer(1), opentrep-searcher(1), opentrep-config(1), opentrep-library(3)

Support

Please report any bugs to http://github.com/trep/opentrep/issues

Referenced By

opentrep-config(1), opentrep-indexer(1), opentrep-library(3), opentrep-searcher(1), pyopentrep(1).

Version 0.07.15 OpenTREP