twindle-co / twindle

Twindle - an open source project for beginners. Converting twitter threads to pdf, epub, and mobi format to be read by Kindle.
https://www.twindle.co
MIT License
134 stars 133 forks source link

HackerNews Fetching based on Parameter #894

Closed Proful closed 3 years ago

Proful commented 3 years ago

node . -h 25301437 -n 5 -d 3

-n 5 >> How many top-level comment to fetch -d 3 >> How many depths (or nested comment) to go for each comment

Mira-Alf commented 3 years ago

The -n argument is used as numTweets in cli.js and yargs command line argument I have it specified to default to 10 tweets. I am not sure how to reuse the same argument for hackernews as for HN it should default to 5 and also validation of arguments becomes a little tricky. Currently you can run the hackernews test as follows: node . -h <<hackernews id>> -t <<numTopLevelComments>> -d <<depthOfNestedComments>>

If someone else wants to take a look at cli.js to reuse the same -n argument that would be great.

tr0mbl3y commented 3 years ago

we can make it consistent by making default numTweets/numTopLevelComments = 10 this way we could reuse n. if you agree i will take a look.