import {cac} from 'https://unpkg.com/cac/mod.ts'; import {execute} from './script.ts'; const cli = cac('convert-scrapbox-json'); cli.command('convert [pagename] [accessToken]', 'page name of each scrapbox page') .action((pagename, accessToken) => { if (typeof accessToken !== 'string') throw Error('Specify an Gyazo access token'); execute(pagename, accessToken); }); cli.help(); cli.version('0.0.0'); cli.parse();