diff options
| author | Carl Hetherington <cth@carlh.net> | 2023-02-18 00:15:30 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2023-05-13 08:54:58 +0200 |
| commit | 3a1ddb9e182be28a22c5bbc85c06ee6629b72fe6 (patch) | |
| tree | 5294bf4b097d12e0fb69affb307def8e897d76ee /src/tools/dcpomatic_map.cc | |
| parent | bab59a964fe7fe6dabf1fb3df95ed5d7ec8df88a (diff) | |
Add dcpomatic2_map tool (#2445).
Diffstat (limited to 'src/tools/dcpomatic_map.cc')
| -rw-r--r-- | src/tools/dcpomatic_map.cc | 49 |
1 files changed, 49 insertions, 0 deletions
diff --git a/src/tools/dcpomatic_map.cc b/src/tools/dcpomatic_map.cc new file mode 100644 index 000000000..2817fdd75 --- /dev/null +++ b/src/tools/dcpomatic_map.cc @@ -0,0 +1,49 @@ +/* + Copyright (C) 2023 Carl Hetherington <cth@carlh.net> + + This file is part of DCP-o-matic. + + DCP-o-matic is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + DCP-o-matic is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with DCP-o-matic. If not, see <http://www.gnu.org/licenses/>. + +*/ + + +/** @file src/tools/dcpomatic_map.cc + * @brief Command-line program to assemble new DCPs from CPLs and assets. + */ + + +#include "lib/cross.h" +#include "lib/map_cli.h" +#include "lib/util.h" +#include <iostream> + + +int +main(int argc, char* argv[]) +{ + ArgFixer fixer(argc, argv); + + dcpomatic_setup_path_encoding(); + dcpomatic_setup(); + + auto error = map_cli(fixer.argc(), fixer.argv(), [](std::string s) { std::cout << s << "\n"; }); + if (error) { + std::cerr << *error << "\n"; + exit (EXIT_FAILURE); + } + + return 0; +} + |
