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

Colorize status code output #9

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Colorize status code output #9

wants to merge 1 commit into from

Conversation

hako
Copy link

@hako hako commented Oct 27, 2017

This PR colorizes status codes outputted by riplink, makes it way better to identify dead links.

  • Green - 200
  • Red - 400-500

@coveralls
Copy link

Coverage Status

Coverage remained the same at 85.859% when pulling 301bf1e on hako:colorize into ca3b3db on mschwager:master.

@mschwager
Copy link
Owner

Hey @hako, thanks for opening this PR!

If you're output is being overwhelmed by HTTP 200's can't you simply drop the -verbose flag and have riplink only print errors? I'm hesitant to accept this because I'm not familiar with its portability. Will this work with all, or most, Linux and OSX shells? What about Windows?

I appreciate you opening this - having colored output is often much easier on the eyes than a typical dark and dreary shell :) but I'd also like to keep riplink as portable as possible!

@hako
Copy link
Author

hako commented Nov 8, 2017

@mschwager The -colorize flag respects this use case, I guess I didn't think of it that way. Regarding portability, I can add support for colorisation for other OS's. Perhaps using a portable terminal color library would be the best way to solve this. What do you think?

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.

None yet

3 participants