From b41807b42b5f9d63c820e0c7b592d16250973fe9 Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Sun, 7 Dec 2025 21:06:15 +0100 Subject: Add convert-screen-db subcommand to dcpomatic2_cli. This can convert a XML cinemas file to SQLite3. --- src/lib/encode_cli.cc | 30 +++++++++++++++++++++++------- 1 file changed, 23 insertions(+), 7 deletions(-) (limited to 'src/lib/encode_cli.cc') diff --git a/src/lib/encode_cli.cc b/src/lib/encode_cli.cc index 8bf1a4a26..80136d5ed 100644 --- a/src/lib/encode_cli.cc +++ b/src/lib/encode_cli.cc @@ -21,6 +21,7 @@ #include "ansi.h" #include "audio_content.h" +#include "cinema_list.h" #include "config.h" #include "cross.h" #include "dcpomatic_log.h" @@ -71,13 +72,14 @@ help(function out) out(fmt::format("Syntax: {} [OPTION] [COMMAND] []\n", program_name)); out("\nCommands:\n\n"); - out(" make-dcp make DCP from the given film; default if no other command is specified\n"); - out(variant::insert_dcpomatic(" list-servers display a list of encoding servers that {} can use (until Ctrl-C)\n")); - out(" dump show a summary of the film's settings\n"); + out(" make-dcp make DCP from the given film; default if no other command is specified\n"); + out(variant::insert_dcpomatic(" list-servers display a list of encoding servers that {} can use (until Ctrl-C)\n")); + out(" dump show a summary of the film's settings\n"); + out(" convert-screen-db convert a given XML screen database to SQLite\n"); #ifdef DCPOMATIC_GROK - out(" config-params list the parameters that can be set with `config`\n"); - out(" config set a DCP-o-matic configuration value\n"); - out(" list-gpus list available GPUs\n"); + out(" config-params list the parameters that can be set with `config`\n"); + out(" config set a DCP-o-matic configuration value\n"); + out(" list-gpus list available GPUs\n"); #endif out("\nOptions:\n\n"); @@ -103,6 +105,7 @@ help(function out) out("\ne.g.\n"); out(fmt::format("\n {} -t 4 make-dcp my_great_movie\n", program_name)); out(fmt::format("\n {} config grok-licence 12345ABCD\n", program_name)); + out(fmt::format("\n {} convert-screen-db database.xml database.sqlite3", program_name)); out("\n"); } @@ -388,7 +391,8 @@ encode_cli(int argc, char* argv[], function out, function out, function ", program_name); + } + return {}; + } + if (config) { State::override_path = *config; } -- cgit v1.2.3