Friday, 15 March 2019

Node package for CLI app to go through a list of and choose actions for each item

I am looking for a node package similar to inquirer or enquirer.​The CLI application will retrieve a list of URLs and then display the URLs to the user. I want the user to be able to use the arrow keys to scroll up or down the list of URLs and then pick what to do with each URL (Save to Instapaper, Save to Pinboard, etc.).​Inquirer has a very nifty "list-scrolling" feature which is great. Unfortunately I think it is only suited for one "action" at a time. It could display the list of URLs, and then show the console to "Discard". The user would then select each URL they want to save to Instapaper. Then the list would refresh and they could select the ones to save to Pinboard. I don't see an obvious way to scroll through the URLs and pick a different action for each one.​Enquirer has a nice option for Scale choices (kind of like a "rate this on a scale from 1 to 5) and I thought I could use that to make #1 Instapaper, #2 Pinboard, etc. The scrolling through a list of 100 URLs isn't very good in Enquirer though.​Is there another package that I am missing? Any thoughts on how I could implement something like this? (Or maybe there's already a similar CLI app)

Submitted March 15, 2019 at 06:53PM by IamFuriousGeorge

No comments:

Post a Comment