public GenerateSvgCommand( IApplicationService applicationService, IKeyboardDataService keyboardDataService, ISvgGenerationService svgGenerationService) { _keyboardDataService = keyboardDataService; _svgGenerationService = svgGenerationService; CommandLineApplication command = ApplicationContext.CommandLineApplication .Command("gen-svg", config => { config.Description = "Generate an SVG file from an XML input file."; config.OnExecute(() => Execute()); }); _inputPathArgument = command.Argument("<input-path>", "The path to the keyboard layout data file."); _outputPathArgument = command.Argument("<output-path>", "The path to the generated SVG file."); _visualSwitchCutoutsOption = command.Option( "--visual-switch-cutouts", "Write switch cutouts with thicker path strokes.", CommandOptionType.NoValue); _keycapOverlayOption = command.Option( "--keycap-overlays", "Write keycap overlays to the generated SVG file.", CommandOptionType.NoValue); _keycapLegendsOption = command.Option( "--keycap-legends", "Write keycap legends to the generated SVG file.", CommandOptionType.NoValue); _squashOption = command.Option( "--squash", "Squash all layers into a single SVG file.", CommandOptionType.NoValue); }
public GenerateKeyBearingsCommand( IApplicationService applicationService, IKeyboardDataService keyboardDataService, ILoggerFactory loggerFactory) { _logger = loggerFactory.CreateLogger(nameof(GenerateKeyBearingsCommand)); _keyboardDataService = keyboardDataService; CommandLineApplication command = ApplicationContext.CommandLineApplication .Command("gen-key-bearings", config => { config.Description = "Print the key geometry from an XML input file."; config.OnExecute(() => Execute()); }); _inputPathArgument = command.Argument("<input-path>", "The path to the keyboard layout data file."); _outputPathArgument = command.Argument("<output-path>", "The path to the generated JSON geometry data file."); _debugSvg = command.Option( "--debug-svg", "Optional file path to write a SVG file for visual confirmation", CommandOptionType.SingleValue); }