DEV Community

Michael Brackett
Michael Brackett

Posted on

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.

Top comments (0)