DEV Community

Michael Brackett
Michael Brackett

Posted on

1 1

OSD600 Lab3

This week I added two new features to my CLI program.

  1. JSON output support
  2. Good/Bad output support

With the newly added -j argument you the program will compile all the links into a JSON object and print it at the end on the command line.

The new -g/-b arguments allow you to specify to only print good (status 200-299) or bad (status 400-599)

A cool feature I added is that you can combine these two new arguments into something like

python link-check.py -j -g -f urls.txt

Which will only output good urls that are in a JSON object.

In addition this is the first time I have used the 'git merge' command instead of creating pull requests for my projects. It went pretty smoothly but I accidentally created a branch from my completed json branch. This caused MAJOR issues when trying to merge everything to master, I had to deal with a lot of conflict issues. But alas, I fixed them all and got it all pushed in the end with a little bit of 'git revert' magic.

You can view the new and improved version of Link-Check at
https://github.com/MLJBrackett/link-check
ps. You can also check out all the gifs I added to the README.md for the new arguments

You can checkout my issues at

  1. JSON Support: https://github.com/MLJBrackett/link-check/issues/5
  2. -g,-b Support: https://github.com/MLJBrackett/link-check/issues/6

And finally, check out the merges that I made at

  1. JSON Support: https://github.com/MLJBrackett/link-check/commit/29b2563496f220add824f658454bd5d04aa8bf8d
  2. -g,-b Support: https://github.com/MLJBrackett/link-check/commit/2e506df858ecd9d9eebd75209ec407687e8feada

Lesson learned: Don't branch off a feature branch if the new branch doesn't use the new feature.

Imagine monitoring actually built for developers

Billboard image

Join Vercel, CrowdStrike, and thousands of other teams that trust Checkly to streamline monitor creation and configuration with Monitoring as Code.

Start Monitoring

Top comments (0)

👋 Kindness is contagious

Engage with a sea of insights in this enlightening article, highly esteemed within the encouraging DEV Community. Programmers of every skill level are invited to participate and enrich our shared knowledge.

A simple "thank you" can uplift someone's spirits. Express your appreciation in the comments section!

On DEV, sharing knowledge smooths our journey and strengthens our community bonds. Found this useful? A brief thank you to the author can mean a lot.

Okay