bug-gnubg
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Add analysis to database in CLI mode.


From: Philippe Michel
Subject: Re: Add analysis to database in CLI mode.
Date: Sun, 24 Jan 2021 22:16:55 +0100

On Sat, Jan 23, 2021 at 04:16:02PM +0000, Phineas Greene wrote:

> [...] I want to add the analysis to an SQLite database. It's very easy 
> to do in the GUI, you just click "Add to DB". I cannot, however, find 
> a command to do this in CLI mode. Is there a command, and if not, are 
> there any workarounds I can use?

The command to add the current match to the database is "relational add 
match".

There are a few other commands starting with relational:

Usage: relational <subcommand>
Available subcommands:
add             Add to the external relational database
erase           Remove from the external relational database
select          Query the relational database
setup           Setup database parameters
show            Show information from the relational database
test            Test the external relational database

If you want to do anything more advanced than adding matches this is 
likely to be too limited and you should probably consider querying the 
database directly.

A possibly useful command for batch imports is "relational setup", but 
its inline help is not very helpful:

relational setup - Setup database parameters
Usage: relational setup [<key>=<value> ...] 

You have to look at the configuration file, $HOME/.gnubg/gnubgautorc on 
Unix, somewhere equivalent on Windows, to find what these keys are:

relational setup storegamestats=yes
relational setup dbtype=SQLite
relational setup SQLite-database=gnubg
relational setup SQLite-username=
relational setup SQLite-password=
relational setup SQLite-hostname=
relational setup PythonMySQL-database=gnubg
relational setup PythonMySQL-username=
relational setup PythonMySQL-password=
relational setup PythonMySQL-hostname=localhost:3306
relational setup PythonPostgre-database=gnubg
relational setup PythonPostgre-username=
relational setup PythonPostgre-password=
relational setup PythonPostgre-hostname=localhost:5432



reply via email to

[Prev in Thread] Current Thread [Next in Thread]