UNPKG

wikibase-cli

Version:

A command-line interface to Wikibase

15 lines (13 loc) 608 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 { polymorphicCommandArgsParser } from '#lib/polymorphic_command_args_parser' const inlineArgsParser = ([ id, property, value ]) => { const data = { id, property, value } if (program.rank) data.rank = program.rank return [ data ] } program.customArgsParser = polymorphicCommandArgsParser({ inlineArgsParser }) program.customHelpOption = commandWithTemplateCustomHelp execEditCommand('claim', 'add')