node-cli-google icon indicating copy to clipboard operation
node-cli-google copied to clipboard

paginate results

Open ghost opened this issue 9 years ago • 5 comments

it would be great to have more choices but that would give a very long output, perhaps paginating the results.

cool project btw :+1:

ghost avatar Jan 10 '16 11:01 ghost

Hey, thanks for your poking about pagination. This is on my way also. The pgination can also be parametrized during the first step of searching with a -p argument, maybe.

Thanks again and waiting for contribution, too.

hwclass avatar Jan 10 '16 11:01 hwclass

@hwclass I don't quite understand how you got 10 results by default.

ghost avatar Jan 12 '16 12:01 ghost

Hi @vkeusebio again, the line "requestUrl = util.format(requestUrl, searchObj.tld, searchObj.lang, querystring.escape(userArgs), 0, searchObj.totalResultSetNum)" is the builder for the request URL. You can play over there. The totalResultSetNum property presents the result number per query. But still thinking of how to integrate a pagination as well. You can also contribute for this issue.

hwclass avatar Jan 12 '16 17:01 hwclass

@hwclass I'm trying to parse next/previous input to navigate through search results but it looks like list-selector-cli doesn't accept any other types of input side from numbers, can I propose to use inquirer instead?

ghost avatar Jan 12 '16 21:01 ghost

@vkeusebio you can go through the way by using the cli tool, inquirer of course. but i need to say to fetch the current master again after my latest update that has contained the moving of the main file (index.js) into the lib directory and etc. thanks and waiting for your contribution. :+1:

hwclass avatar Jan 13 '16 00:01 hwclass