UNPKG

wikibase-cli

Version:

A command-line interface to Wikibase

15 lines (13 loc) 658 B
#!/usr/bin/env node import program from 'commander' import { commandWithTemplateCustomHelp } from '#lib/command_with_template_custom_help' import { execEditCommand } from '#lib/edit/edit_command' import { parseGuid } from '#lib/parse_command_utils' import { polymorphicCommandArgsParser } from '#lib/polymorphic_command_args_parser' const inlineArgsParser = ([ guid, property, oldValue, newValue ]) => { guid = parseGuid(guid) return [ { guid, property, oldValue, newValue } ] } program.customArgsParser = polymorphicCommandArgsParser({ inlineArgsParser }) program.customHelpOption = commandWithTemplateCustomHelp execEditCommand('qualifier', 'update')