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.

Heroku

This site is built on Heroku

Join the ranks of developers at Salesforce, Airbase, DEV, and more who deploy their mission critical applications on Heroku. Sign up today and launch your first app!

Get Started

Top comments (0)

👋 Kindness is contagious

Discover a treasure trove of wisdom within this insightful piece, highly respected in the nurturing DEV Community enviroment. Developers, whether novice or expert, are encouraged to participate and add to our shared knowledge basin.

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

On DEV, sharing ideas smoothens our journey and strengthens our community ties. Learn something useful? Offering a quick thanks to the author is deeply appreciated.

Okay