Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a --random flag to render any random page #105

Closed
wants to merge 1 commit into from

Conversation

mycroft
Copy link

@mycroft mycroft commented Dec 30, 2024

Basic random page rendering.

I know that is a pretty stupid PR/feature, but I'm using it daily to discover new stuff. Feel free to reject it is not acceptable.

Thanks!

Copy link
Member

@spageektti spageektti left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi. Thanks for your contribution! If others agree, we could implement this in other clients as well.

@acuteenvy
Copy link
Member

Thanks, but this is pretty easily achievable using tldr --list and other tools.
Try tldr --list-all | shuf -n1 | xargs tldr.

I'll wait for some other maintainers, but I honestly think things like that are better handled using shell pipelines and other commands.

@sbrl
Copy link
Member

sbrl commented Dec 30, 2024

I don't see why its a problem to implement this here so long as it isn't incompatible with the client spec.

Different clients having special features isn't a problem I don't think.

I do also see @acuteenvy's point here. In this particular case you can do this with an external shell script. The question is whether there would be a benefit to integrate the feature into the main client vs asking people to rely on shell scripts. There's a fine balance to be had here.

What use-cases to you see for --random, @mycroft?

@mycroft
Copy link
Author

mycroft commented Dec 31, 2024

Thanks for the feedback.

I've the feeling this PR is meeting some resistance, even by rustfmt or clippy, for this feature which, as everyone will agree, is not going to revolutionize the way this tool work.

Therefore I'll close it. Thanks for your attention and happy new year nevertheless!

@mycroft mycroft closed this Dec 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants