Make extension optional in --export command.

Added add_extension function
Added ExportTemplate::byName
Use ExportTemplate::byName in main
This commit is contained in:
Twan van Laarhoven
2020-04-21 00:23:42 +02:00
parent 59d59e97fd
commit e8e7e10fa0
5 changed files with 25 additions and 3 deletions
+1 -1
View File
@@ -258,7 +258,7 @@ int MSE::OnRun() {
throw Error(_("No input set file specified for --export"));
}
String export_template = args[1];
ExportTemplateP exp = package_manager.open<ExportTemplate>(export_template);
ExportTemplateP exp = ExportTemplate::byName(export_template);
SetP set = import_set(args[2]);
String out = args.size() >= 4 ? args[3] : _("");
ScriptValueP result = export_set(set, set->cards, exp, out);