Hey PC readers:
Welcome back to my blog. So, for the first two weeks of the Fall sem in Open source, we were assigned with a release called 0.1 for our first Open source commits and project repos. We were asked to create a tool for release 0.1, specifically a CLI / command line interface tool which will go through a list of URLs and define if the URL is good or not, if it is working or not.
So my tool will display " Good" in green, if it is working. And if not working, then it will show "bad" in red color. Third display option is of URL which are of unknown status, they will be displayed as"Unknown" in grey. All of these displays will be accompanied by the request status code, like 200, 400 , 404 , or any other status code; with the URL itself. So cool, right? This was one of the additional feature that I chose to use the color, from a list of additional feature list to choose from.
I also added the additional feature of checking the version of the tool. Personally, I always juggle between -v, -V, or --version(dont judge, haha), so I enabled all of these to check the version of my tool.
I was very excited by the choice given by the Prof. Humphrey to choose any programming language to make this tool. That was fun, it will give us the chance to work on the language which we want to work in future. I highly appreciate this kind of freedom to choose and work on your own things.
I saw many of the members in the slack were using fetch to fetch the URLs, so I wanted to try something new, so I used Axios in my project to fetch the requests. I also wanted to experience new with colors, hence I used colors instead of chalks(which I checked out with many of my peers, thank you). So, anyone can review my code by cloning my repo and using the command "npm install -g https://github.com/chawlapalak/Url-Inspector " if it is in master, if it is still in develop branch and getting reviewed by my main reviewer who is assigned for reviewing i.e. Muskan Shinh - @shinh18 (github) then you would need to follow these steps:
Step 1: git clone "path" you can copy from my repo
step 2: git checkout develop
step 3: npm install -g ./
step 4: url-inspector -f test.txt
Here is a snippet of my tool running with the command:
So, feel free to drop by my repo and review it, all feedbacks are appreciated.
https://github.com/chawlapalak/Url-Inspector
Thank you for reading it. :D See you in my next blog.
No comments:
Post a Comment