//PrettyPrinter Print function which prints all the information from all the modules
PrettyPrinter Print function which prints all the information from all the modules
// PrettyPrinter Print function which prints all the information from all the modules
func PrettyPrinter(MovieName string, year string) {
	RtRating := RtScraper(MovieName, year)
	ImdbRatings := GetImdbRatings(MovieName)
	IntRtRatings, err := strconv.Atoi(RtRating)
	if IntRtRatings == -1 && len(ImdbRatings.Title) == 0 {
		fmt.Println("The Movie Does not seem to exist!")
		fmt.Println("Tip: If you are using spaces in your film name, enclose the movie name in double quotes!")
	} else {
		fmt.Println(chalk.Magenta, "Movie Name: "+ImdbRatings.Title)
		fmt.Println(chalk.Magenta, "Director: "+ImdbRatings.Director)
		fmt.Println(chalk.Magenta, "Cast: "+ImdbRatings.Actors)
		fmt.Println(chalk.Magenta, "Year: "+ImdbRatings.Year)
		fmt.Println(chalk.Magenta, "Released: "+ImdbRatings.Released)
		fmt.Println(chalk.Magenta, "Rated: "+ImdbRatings.Rated)
		fmt.Println(chalk.Magenta, "Genre: "+ImdbRatings.Genre)
		fmt.Println(chalk.Magenta, "Poster: "+ImdbRatings.Poster)
		fmt.Println(chalk.Magenta, "Metascore Rated: "+ImdbRatings.Metascore)
		fmt.Println(chalk.Magenta, "Awards: "+ImdbRatings.Awards)
		fmt.Println(chalk.Magenta, "Plot: "+ImdbRatings.Plot)
		fmt.Println(" Ratings from IMDB and Rotten Tomatoes---")
		fmt.Println(chalk.Magenta, chalk.Underline.TextStyle("IMDB Rating: "+ImdbRatings.ImdbRating))
		if IntRtRatings == -1 && err == nil {
			fmt.Println(chalk.Red, "There seems to be a problem with rt, try with the year argument!")
		} else if IntRtRatings > 60 && err == nil {
			fmt.Println(chalk.Red, chalk.Underline.TextStyle("Rotten Tomatoes Rating: "+RtRating+"% (Certified Fresh!)"))
		} else {
			fmt.Println(chalk.Green, chalk.Underline.TextStyle("Rotten Tomatoes Rating: "+RtRating+"% (Rotten!)"))
		}
	}
}
func PrettyPrinter ( MovieName string , year string ) { RtRating := RtScraper ( MovieName , year ) ImdbRatings := GetImdbRatings ( MovieName ) IntRtRatings , err := strconv . Atoi ( RtRating ) if IntRtRatings == - 1 && len ( ImdbRatings . Title ) == 0 { fmt . Println ( " " ) fmt . Println ( " " ) } else { fmt . Println ( chalk . Magenta , " " + ImdbRatings . Title ) fmt . Println ( chalk . Magenta , " " + ImdbRatings . Director ) fmt . Println ( chalk . Magenta , " " + ImdbRatings . Actors ) fmt . Println ( chalk . Magenta , " " + ImdbRatings . Year ) fmt . Println ( chalk . Magenta , " " + ImdbRatings . Released ) fmt . Println ( chalk . Magenta , " " + ImdbRatings . Rated ) fmt . Println ( chalk . Magenta , " " + ImdbRatings . Genre ) fmt . Println ( chalk . Magenta , " " + ImdbRatings . Poster ) fmt . Println ( chalk . Magenta , " " + ImdbRatings . Metascore ) fmt . Println ( chalk . Magenta , " " + ImdbRatings . Awards ) fmt . Println ( chalk . Magenta , " " + ImdbRatings . Plot ) fmt . Println ( " " ) fmt . Println ( chalk . Magenta , chalk . Underline . TextStyle ( " " + ImdbRatings . ImdbRating ) ) if IntRtRatings == - 1 && err == nil { fmt . Println ( chalk . Red , " " ) } else if IntRtRatings > 60 && err == nil { fmt . Println ( chalk . Red , chalk . Underline . TextStyle ( " " + RtRating + " " ) ) } else { fmt . Println ( chalk . Green , chalk . Underline . TextStyle ( " " + RtRating + " " ) ) } } }
PrettyPrinter Print function which prints all the information from all the modules
PrettyPrinter Print function which prints all the information from all the modules