My first CLI Application
Well, I did it. I finished building my first CLI Application. For my first project iI wanted to collect data that was important to me. I choose to create an app that allows user to view artists from Sister Polygon Records(SPR). Sister Polygon is a Washington, DC based company that prints records for mostly local punk acts! I choose them because SPR was started by my good friends and several of my friends bands have had records pressed by them.
My application presents the lists of artists that SPR has worked with and allows the user to choose an artist through and index and view their bios and members. From there you can either return to the index or exit that app.
I created this application by scraping data using the ruby gem nokogiri. Once scraped I created an artist class and and scraper page to parse out my information. My first scrape took the name of all the artists from the artist page.
From there I created a method to print all artists and iterated over the method with ```each_with_index``` in order to present a list of artists with an associated number. My second scrape collected the artist bio and member information from each instance of an artist. I then created a rerun method to allow the user to return to list of index and have the program accept the user input again.
Once I made sure my application ran and didn’t break with different inputs I went to add a little pizzaz with ascii art. I created two different text files that housed the ascii art and called on the file.
The end result with the ascii art was a cute little cd graphic and a one line cassette tape!
Looking back on it I think I could have made the application more user friendly by including tty-prompt instead of a numbered index but I will definitely experiment more next time and I’m extremely proud of my first solo project!
Scraped using Nokogiri
Gems I required : Nokogiri, Colorize, Pry