LudwigSavant

Death Grips 2.0

Sep 21st, 2016
169
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 30.78 KB | None | 0 0
  1. import sys
  2. import os
  3. import re
  4. import random
  5.  
  6. #here you can find the lyrics: https://mega.nz/#F!TB8ExSaI!oRxkQGkiWulHyk4KVof8kw
  7.  
  8. #the functions and other stuff writen as comments are just things I wanted to deactivade but keep in case I regret doing so
  9. #most of them I don't need  anymore, but I don't feel like deleting them now
  10.  
  11. bottomless_pit = {
  12.     "Giving Bad People Good Ideas"          : "lyrics/giving_bad_people_good_ideas.txt",
  13.     "Hot Head"                              : "lyrics/hot_head.txt",
  14.     "Spikes"                                : "lyrics/spikes.txt",
  15.     "Warping"                               : "lyrics/warping.txt",
  16.     "Eh"                                    : "lyrics/eh.txt" ,
  17.     "Bubbles Buried In This Jungle"         : "lyrics/bubles_buried_in_this_jungle.txt" ,
  18.     "Trash"                                 : "lyrics/trash.txt",
  19.     "Houdini"                               : "lyrics/houdini.txt" ,
  20.     "BB Poison"                             : "lyrics/bb_poison.txt",
  21.     "Three Bedrooms in a Good Neighborhood" : "lyrics/three_bedrooms_in_a_good_neighborhood.txt",
  22.     "Ring A Bell"                           : "lyrics/ring_a_bell.txt" ,
  23.     "Bottomless Pit"                        : "lyrics/bottomless_pit.txt"
  24.     }
  25.    
  26. the_money_store = {
  27.     "Get Got"             : "lyrics/get_got.txt",
  28.     "The Fever (Aye Aye)" : "lyrics/the_fever.txt",
  29.     "Lost Boys"           : "lyrics/lost_boys.txt",
  30.     "Blackjack"           : "lyrics/blackjack.txt",
  31.     "Hustle Bones"        : "lyrics/hustle_bones.txt",
  32.     "I've Seen Footage"   : "lyrics/ive_seen_footage.txt",
  33.     "Double Helix"        : "lyrics/double_helix.txt",
  34.     "System Blower"       : "lyrics/system_blower.txt",
  35.     "The Cage"            : "lyrics/the_cage.txt",
  36.     "Punk Weight"         : "lyrics/punk_weight.txt",
  37.     "Fuck That"           : "lyrics/fuck_that.txt",
  38.     "Bitch Please"        : "lyrics/bitch_please.txt",
  39.     "Hacker"              : "lyrics/hacker.txt"
  40.     }
  41.    
  42. niggas_on_the_moon = {
  43.     "Up My Sleeves"     : "lyrics/up_my_sleeves.txt",
  44.     "Billy Not Really"  : "lyrics/billy_not_really.txt",
  45.     "Black Quarterback" : "lyrics/black_quarterback.txt",
  46.     "Say Hey Kid"       : "lyrics/say_hey_kid.txt",
  47.     "Have a Sad Cum BB" : "lyrics/have_a_sad_cum.txt",
  48.     "Fuck Me Out"       : "lyrics/fuck_me_out.txt",
  49.     "Voila"             : "lyrics/voila.txt",
  50.     "Big Dipper"        : "lyrics/big_dipper.txt"
  51.  
  52.     }
  53.  
  54. jenny_death = {
  55.     "I Break Mirros With My Face In The United States" : "lyrics/i_break_mirros_with_my_face_in_the_united_states.txt",
  56.     "Inanimate Sensation"                              : "lyrics/inanimate_sensation.txt",
  57.     "Turned Off"                                       : "lyrics/turned_off.txt",
  58.     "Why A Bitch Gotta Lie"                            : "lyrics/why_a_bitch_gotta_lie.txt",
  59.     "Pss Pss"                                          : "lyrics/pss_pss.txt",
  60.     "The Powers That B"                                : "lyrics/the_powers_that_b.txt",
  61.     "Beyond Alive"                                     : "lyrics/beyond_alive.txt",
  62.     "Centuries Of Damn"                                : "lyrics/centuries_of_damn.txt",
  63.     "On GP"                                            : "lyrics/on_gp.txt",
  64.     "Death Grips 2.0"                                  : "lyrics/death_grips_2.0.txt"
  65.     }
  66.    
  67. no_love_deep_web = {
  68.     "Come Up And Get Me"            : "lyrics/come_up_and_get_me.txt",
  69.     "Lil Boy"                       : "lyrics/lil_boy.txt",
  70.     "No Love"                       : "lyrics/no_love.txt",
  71.     "Black Dice"                    : "lyrics/black_dice.txt",
  72.     "Wolrd Of Dogs"                 : "lyrics/world_of_dogs.txt",
  73.     "Lock Your Doors"               : "lyrics/lock_your_doors.txt",
  74.     "Whammy"                        : "lyrics/whammy.txt",
  75.     "Hunger Games"                  : "lyrics/hunger_games.txt",
  76.     "Deep Web"                      : "lyrics/deep_web.txt",
  77.     "Stockton"                      : "lyrics/stockton.txt",
  78.     "Pop"                           : "lyrics/pop.txt",
  79.     "Bass Rattle Stars Out The Sky" : "lyrics/bass_rattle_stars_out_the_sky.txt",
  80.     "Artificial Death In The West"  : "lyrics/artificial_death_in_the_west.txt"
  81.     }
  82.    
  83. government_plates = {
  84.     "You might think he loves you for your money but I know what he really loves you for it's your brand new leopard skin pillbox hat" : "lyrics/you_might_think_he_loves_you_for_your_money_but_i_know_what_he_really_loves_you_for_its_your_brand_new_leopard_skin_pillbox_hat.txt",
  85.     "Anne Bonny"                                                                                                                       : "lyrics/anne_bonny.txt",
  86.     "Two Heavens"                                                                                                                      : "lyrics/two_heavens.txt",
  87.     "This Is Violence Now (Don't Get Me Wrong)"                                                                                        : "lyrics/this_is_violence_now.txt",
  88.     "Birds"                                                                                                                            : "lyrics/birds.txt",
  89.     "Feels Like A Wheel"                                                                                                               : "lyrics/feels_like_a_wheel.txt",
  90.     "I'm Overflow"                                                                                                                     : "lyrics/im_overflow.txt",
  91.     "Big House"                                                                                                                        : "lyrics/big_house.txt",
  92.     "Government Plates"                                                                                                                : "lyrics/government_plates.txt",
  93.     "Bootleg (Don't Need Your Help)"                                                                                                   : "lyrics/bootleg.txt",
  94.     "Whatever I Want (Fuck Who's Watching)"                                                                                            : "lyrics/whatever_i_want.txt"
  95.     }
  96.    
  97. exmilitary = {
  98.     "Beware"                        : "lyrics/beware.txt",
  99.     "Guillotine"                    : "lyrics/guillotine.txt",
  100.     "Spread Eagles Cross The Block" : "lyrics/spread_eagles_cross_the_block.txt",
  101.     "Lord Of The Game"              : "lyrics/lord_of_the_game.txt",
  102.     "Takyon"                        : "lyrics/takyon.txt",
  103.     "Cut Throat"                    : "lyrics/cut_throat.txt",
  104.     "Klink"                         : "lyrics/klink.txt",
  105.     "Culture Schock"                : "lyrics/culture_schock.txt",
  106.     "5D"                            : "lyrics/5d.txt",
  107.     "Thru The Walls"                : "lyrics/thru_the_walls.txt",
  108.     "Known For It"                  : "lyrics/known_for_it.txt",
  109.     "I Want It I Need It"           : "lyrics/i_want_it_i_need_it.txt",
  110.     "Blood Creepin"                 : "lyrics/blood_creepin.txt"
  111.     }
  112.    
  113. albums = {
  114.     "Bottomless Pit"     : bottomless_pit,
  115.     "The Money Store"    : the_money_store,
  116.     "Jenny Death"        : jenny_death,
  117.     "Niggas On The Moon" : niggas_on_the_moon,
  118.     "Exmilitary"         : exmilitary,
  119.     "Government Plates"  : government_plates,
  120.     "No Love Deep Web"   : no_love_deep_web
  121.     }
  122.    
  123. def uprint(*objects, sep = " ", end = "\n", file = sys.stdout): #function to substitute the print one since it wasn't able to print some characters when using cmd
  124.     enc = file.encoding
  125.     if enc == "UTF-8":
  126.         print(*objects, sep = sep, end = end, file = file)
  127.     else:
  128.         f = lambda obj: str(obj).encode(enc, errors = "ignore").decode(enc)
  129.         print(*map(f, objects), sep = sep, end = end, file = file)
  130.            
  131. def print_albums():
  132.     print("\n")
  133.     print("   =========================================================================")
  134.     print("\n   > DISCOGRAPHY")
  135.     print("\n   =========================================================================")
  136.     for album in albums:
  137.         print("\n", end = "")
  138.         print ("   > ", album.upper(), end = "\n")
  139.     print("\n   =========================================================================")
  140.    
  141. def print_tracks(album):
  142.     for song in album:
  143.         print("\n", end = "")
  144.         print("   > ", song.upper(), end = "\n")
  145.        
  146. def print_lyrics(track):
  147.     print("   =========================================================================")
  148.     print("\n")
  149.     with open(track, "r") as f:
  150.         for line in f:
  151.             #line = line.encode("utf-8")
  152.             uprint("  ", line.upper())
  153.     print("\n")
  154.     print("   =========================================================================")
  155.            
  156. def search_in_lyrics(): #explained in random_lyrics and random_quote
  157.     #trying = False
  158.     find_or_not = False
  159.     print("\n")
  160.     #lyrics_input = ""
  161.     lyrics_input = input("   SEARCH FOR: ")
  162.     #print(lyrics_input)
  163.     lyrics_input = lyrics_input.lower()
  164.     #print(lyrics_input)
  165.     input_splited = lyrics_input.split()
  166.     #lyrics_input = lyrics_input.split()
  167.     words_inputed = len(lyrics_input)
  168.     words_matched = 0
  169.     found_in = []
  170.     #print(lyrics_input)
  171.     #print("\n", end = "")
  172.     number_of_lines = 0
  173.     for album_name, album_dictionary in albums.items():
  174.         for track, filename in album_dictionary.items():
  175.                 with open(filename) as f:
  176.                     if len(input_splited) != 1:
  177.                         #print("it's here")
  178.                         for line in f:
  179.                             #line2 = line.split(",")
  180.                             #line = " ".join(line2)
  181.                             if lyrics_input in line.lower():
  182.                                 find_or_not = True
  183.                                 #break
  184.                                 #if find_or_not == True:
  185.                                 print("\n   =========================================================================")
  186.                                 print("\n   ALBUM: ", album_name.upper(), end = "")
  187.                                 print("\n\n   TITLE: ", track.upper())
  188.                                 #print("", end = "")
  189.                                 print_lyrics(filename)
  190.                                 #print(lyrics_input)
  191.                                 #lyrics_input = ""
  192.                                 break
  193.                     else:
  194.                         #print("it's here")
  195.                         #print("else")
  196.                         for line in f:
  197.                             line = line.replace(",", "")
  198.                             line = line.replace("-", " ")
  199.                             line = line.replace("!", "")
  200.                             line = line.replace(".", "")
  201.                             line = line.replace("...", "")
  202.                             line = line.replace("\"", " ")
  203.                             line = line.replace("?", " ")
  204.                             line2 = line.split()
  205.                             #line = line.replace(",", "")
  206.                             #line = line.split()
  207.                             #line = line.replace(",", "")
  208.                             #line = line.strip()
  209.                             #print(line)
  210.                             #line2 = line.split(",")
  211.                             #uprint(line2)
  212.                             #line = "".join(line2)
  213.                             #line = line.lower()
  214.                             #line2 = line.split()
  215.                             #line = " ".join(line2)
  216.                             #uprint(line2)
  217.                             #for word in line:
  218.                                 #if word == lyrics_input:
  219.                                     #find_or_not = True
  220.                                     #break
  221.                            
  222.                             #if lyrics_input in line:#.split():#.split(","):
  223.                                 #find_or_not = True
  224.                                 #break
  225.                             #for word in line2:#.split():
  226.                                 #if word == lyrics_input:
  227.                                     #find_or_not = True
  228.                                     #break
  229.                                    
  230.                             #line = line.split()
  231.                            
  232.                             #if lyrics_input in line2:
  233.                                 #find_or_not = True
  234.                                 #print("here")
  235.                                 #break
  236.                             #uprint(line2)
  237.                             for word in line2:
  238.                                 #print("here")
  239.                                 word = word.lower()
  240.                                 #word1 = word.replace(",", "")
  241.                                 #word2 = word.replace("-", "")
  242.                                 #word3 = word.replace("!", "")
  243.                                    
  244.                                 #if lyrics_input == word:#1 == lyrics_input or word2 == lyrics_input or word3 == lyrics_input:#print(word)
  245.                                 if word == lyrics_input:
  246.                                     #found_in.append(track)
  247.                                     #print(track)
  248.                                     find_or_not = True
  249.                                     #break
  250.                                 #if find_or_not == True:
  251.                                     #continue
  252.                            
  253.             #if trying == False:
  254.                                     if find_or_not == True:
  255.                                         print("\n   =========================================================================")
  256.                                         print("\n   ALBUM: ", album_name.upper(), end = "")
  257.                                         print("\n\n   TITLE: ", track.upper())
  258.                                         print("\n")
  259.                                         print_lyrics(filename)
  260.                                         #print(lyrics_input)
  261.                                         lyrics_input = ""
  262.                                         break
  263.                                                                        
  264.                                     #if find_or_not == True:
  265.                                         #print_lyrics2(filename, found_in, track, album_name)
  266.                                
  267.     if find_or_not == False:
  268.         #print(lyrics_input)
  269.         lyrics_input = ""
  270.         #print("it's here")
  271.         print("\n", end = "")
  272.         print("   COULDN'T FIND ANYTHING\n")
  273.         print("   =========================================================================")
  274.         #break
  275.     #print(albums[album_name].items())
  276.    
  277. def search_by_title(): #I think this one's obvious
  278.     title = input("   TITLE: ").lower()
  279.     print("\n")
  280.     find_or_not = False
  281.     for album_name, album_dictionary in albums.items():
  282.         #print(album_name)
  283.        
  284.         for track in albums[album_name]:
  285.             #print(track)
  286.             if title.lower() == track.lower():
  287.                     print("\n", end = "")
  288.                     print("   =========================================================================\n")
  289.                     print("   TRACK: ", title.upper())
  290.                     print("\n    ALBUM: ",album_name.upper())
  291.                     print("\n", end = "")
  292.                     track_name = albums[album_name][track]
  293.                     print_lyrics(track_name)
  294.                     track_name = ""
  295.                     find_or_not = True
  296.     if find_or_not == False:
  297.         print("   TRACK NOT FOUND")
  298.         print("\n", end = "")
  299.        
  300. #print(len(albums))
  301.  
  302. times = 0
  303.        
  304. def random_quote():
  305.     album_key = random.choice(list(albums.keys())) #takes a random album name (key) from the dictionary "albums"
  306.     #print(album_key)
  307.     album = albums[album_key] #assigns the dictionary of the actual album to the variable "album"
  308.     #print(album)
  309.     track_key = random.choice(list(albums[album_key])) #takes the name of the track (key) out of the album's dictionary and asigns it to "track_key"
  310.     #print(track_key)
  311.     track = album[track_key] #asigns the value of the key (the actualy txt file) to "track"
  312.    
  313.    
  314.     with open(track, "r") as f: #counts how many lines there are to later use it to choose a random number
  315.         lines = sum(1 for _ in f) #sum of lines
  316.         #print(lines)
  317.        
  318.     random_line = random.randrange(lines) #chooses a random number between 0 and the numbmer of lines
  319.     #print(random_line)
  320.    
  321.     with open(track, "r") as f: #reads each line and, if the line's number is equal to the one generated above, prints it
  322.         for i, line in enumerate(f):
  323.             if i == random_line:
  324.                 print("\n   =========================================================================")
  325.                 print("\n", end = "")
  326.                 uprint("   ", line.upper(), end = "")
  327.                 print("\n   =========================================================================")
  328.            
  329. input_count = ""
  330.  
  331.            
  332. def count():
  333.     print("\n   =========================================================================")
  334.     global input_count
  335.     global times
  336.     input_count = input("\n   SEARCH FOR: ")
  337.     input_count = input_count.lower()
  338.     input_splited = input_count.split(" ")
  339.     #print(len(input_splited))
  340.     print("\n", end = "")
  341.     for album_name, album_dictionary in albums.items(): #basicaly the same thing done in the search_in_lyrics and random_lyrics
  342.             for track, filename in album_dictionary.items():
  343.                     with open(filename) as f:
  344.                         if len(input_splited) != 1:
  345.                             #print("if len(input_splited) < 2:")
  346.                             for line in f:
  347.                                 line = line.lower()
  348.                                 line2 = line.split(",")
  349.                                 line = " ".join(line2)
  350.                                 line2 = line.split("-")
  351.                                 line = " ".join(line2)
  352.                                 line2 = line.split("!")
  353.                                 line = " ".join(line2)
  354.                                 if input_count in line:
  355.                                     #print("if input_count in line.lower():")
  356.                                     times += 1
  357.                         else:
  358.                             #print("else")
  359.                             for line in f:
  360.                                 #line = line.replace(",", "")
  361.                                 line = line.replace(",", "")
  362.                                 line = line.replace("-", " ")
  363.                                 line = line.replace("!", "")
  364.                                 line = line.replace(".", "")
  365.                                 line = line.replace("...", "")
  366.                                 line = line.replace("\"", " ")
  367.                                 line2 = line.split()
  368.                                 #line = " ".join(line2)
  369.                                 #uprint(line2)
  370.                                 #line = line.split()
  371.                                 #line2 = line.split()
  372.                                 #line = " ".join(line2)
  373.                                 #line2 = line.split(",")
  374.                                 #line = "".join(line2)
  375.                                 #line = line.split()
  376.                                 #print(line)
  377.                                 #for word in line:
  378.                                     #if word == input_count:
  379.                                         #times += 1
  380.                                        
  381.                                 #if input_count in line:#.split() or input_count in line.split(","):
  382.                                     #times += 1
  383.                                 for word in line2:
  384.                                     word = word.lower()
  385.                                     #uprint(word, end = " "),
  386.                                     #word1 = word.replace(",", "").split()
  387.                                     #word1 = " ".join(word1)
  388.                                     #word2 = word1.replace("-", "").split()
  389.                                     #word2 = " ".join(word2)
  390.                                     #word3 = word2.replace("!", "").split()
  391.                                     #word3 = " ".join(word3)
  392.                                     #word4 = word3.replace(".", "").split()
  393.                                    
  394.                                     if word == input_count:#1 == input_count and word2 == input_count and word3 == input_count and word4 == input_count:
  395.                                         #print("\n")
  396.                                         #uprint(line)
  397.                                         times += 1
  398.                                         #break
  399.                                
  400.     return times
  401.  
  402.  
  403. def print_lyrics2(filename, found_in, track, album_name):
  404.  
  405.     #if len(found_in) == 0:
  406.         #print(lyrics_input)
  407.         #lyrics_input = ""
  408.         #print("it's here")
  409.         #print("\n", end = "")
  410.         #print("\n   COULDN'T FIND ANYTHING\n")
  411.         #print("===============================================================================")
  412.     print(len(found_in))
  413.    
  414.     if len(found_in) == 1:
  415.         print("\n   =========================================================================")
  416.         print("\n   ALBUM: ", album_name.upper(), end = "")
  417.         print("\n\n   TITLE: ", track.upper())
  418.         print("\n")
  419.         #print_lyrics(filename)
  420.         print(lyrics_input)
  421.         lyrics_input = ""
  422.    
  423.     if len(found_in) > 0:
  424.         pass
  425.        
  426.    
  427. def random_lyrics():
  428.     print("\n   =========================================================================")
  429.     number_of_lines = random.randrange(10,100) #to keep the lyrics from getting too big
  430.     #print(number_of_lines)
  431.     current_line = 0 # in case it isn't obvious, what I'm doing in this function is going through every lyrics in every album and reading line by line
  432.                     #if the line's number (current_line) is equal to the random one generated (random_word_index), I print it.
  433.    
  434.     name_length = random.randrange(1,6) # just so the track's title doesn't get too big
  435.     generated_name_list = [] #I put the words in this list, then turn it into a string (generated_name)
  436.     current_track_name_length = 0 #just to keep track of the size of the title
  437.    
  438.     album_name_length = random.randrange(1,6) #same thing going on here, but for the album name
  439.     generated_album_name_list = []
  440.     current_album_name_length = 0
  441.    
  442.     for album_name, album_dictionary in albums.items(): #go through the albumS dictionary, getting every album dictionary
  443.         for track, filename in album_dictionary.items():#go through every track, getting the title
  444.             track_name_splited = track.split() #split the title to, later, maybe take a word from it
  445.             track_name_splited_length = len(track_name_splited) #gets the length to use in the for loop bellow
  446.             random_word_index = random.randrange(0, track_name_splited_length) #index of the word I'm gonna take
  447.             #print(track_name_splited)
  448.            
  449.             for index, word in enumerate(track_name_splited): #go through the title, taking the an index and a word
  450.                 #print(index, word)
  451.                 if index == random_word_index and len(generated_name_list) < name_length: #if the index is the one I want, I take it's word
  452.                     generated_name_list.append(word)#put the word in the list
  453.            
  454.     generated_name = " ".join(generated_name_list) #now i turn the list into a string
  455.    
  456.     print("\n   TITLE: ", generated_name.upper()) #prints it
  457.    
  458.    
  459.     for album_name, album_dictionary in albums.items(): #same thing for the album so I'm not gonna go though it again
  460.        
  461.         album_name_splited = album_name.split()
  462.         album_name_splited_length = len(album_name_splited)
  463.         random_word_index = random.randrange(0, album_name_splited_length)
  464.        
  465.         for index, word in enumerate(album_name_splited):
  466.             if index == random_word_index and len(generated_album_name_list) < album_name_length:
  467.                 generated_album_name_list.append(word)
  468.    
  469.     generated_album_name = " ".join(generated_album_name_list)
  470.     print("\n   ALBUM: ", generated_album_name.upper())
  471.     print("\n   =========================================================================")
  472.    
  473.    
  474.     while int(current_line) < number_of_lines: #to make sure the total of lines is the one randomly chosen in the begining
  475.    
  476.         album_key = random.choice(list(albums.keys())) #takes a random album name (key) from the dictionary "albums"
  477.         #print(album_key)
  478.         album = albums[album_key] #assigns the dictionary of the actual album to the variable "album"
  479.         #print(album)
  480.         track_key = random.choice(list(albums[album_key])) #takes the name of the track (key) out of the album's dictionary and asigns it to "track_key"
  481.         #print(track_key)
  482.         track = album[track_key] #asigns the value of the key (the actualy txt file) to "track"
  483.        
  484.        
  485.         with open(track, "r") as f: #counts how many lines there are to later use it to choose a random number
  486.             lines = sum(1 for _ in f) #sum of lines
  487.             #print(lines)
  488.            
  489.         random_line = random.randrange(lines) #chooses a random number between 0 and the numbmer of lines
  490.         #print(random_line)
  491.        
  492.         with open(track, "r") as f: #reads each line and, if the line's number is equal to the one generated above, prints it
  493.             for i, line in enumerate(f):
  494.                 line = line.upper()
  495.                 line = line.splitlines()
  496.                 #print(line)
  497.                 if i == random_line:
  498.                     for something in line:
  499.                         if len(something) > 0: #if the "something" isn't nothing (which means it was a \n), I print it and a "\n". But if it was nothing, I just ignore
  500.                             print("\n", end = "")
  501.                             uprint("  ", something, end = "\n")
  502.                         else:
  503.                             pass #I have two options: ignore it, or print a \n. If I did print it, it would look kinda weird, unless I wrote some code to check
  504.                                  #if after it, there was something like [instrumental] and other variations from. I could just make it check if the next line
  505.                                  #starts with a [, if it does, print a \n. But I don't think that's necessaire.
  506.         current_line += 1
  507.        
  508.     print("\n   =========================================================================")
  509.    
  510. def main_menu():
  511.     global times
  512.     still_in = True
  513.     while still_in == True:
  514.         print("\n   1 - SEARCH BY TITLE\n")
  515.         print("   2 - SEARCH BY LYRICS LINE\n")
  516.         print("   3 - DISCOGRAPHY\n")
  517.         print("   4 - RANDOM QUOTE\n")
  518.         print("   5 - COUNT HOW MANY TIMES MC RIDE SAID SOMETHING\n")
  519.         print("   6 - GENERATE RANDOM LYRICS\n")
  520.         print("   7 - EXIT\n")
  521.        
  522.         option = input("   >   ")
  523.         option = option.lower()
  524.        
  525.         if option == "1" or option == "search by title" or option == "title":
  526.             print("\n")
  527.             search_by_title()
  528.            
  529.         elif option == "2" or option == "search by line" or option == "line":
  530.             search_in_lyrics()
  531.        
  532.         elif option == "3" or option == "discography" or option == "albums":
  533.             try_again = True
  534.             while try_again == True:
  535.                 print_albums()
  536.                 print("\n")
  537.                 print("   1 - TRACKLIST\n")
  538.                 print("   2 - GO BACK\n")
  539.                
  540.                 option2 = input("\n   > ")
  541.                 option2 = option2.lower()
  542.                
  543.                
  544.                 if option2 == "1" or option2 == "tracklist":
  545.                     find_or_not = False
  546.                     option3 = input("\n\n   ALBUM: ")
  547.                     print("\n", end = "")
  548.                     option3 = option3.lower()
  549.                    
  550.                     for album, track in albums.items():
  551.                             if option3 == album.lower():
  552.                                 find_or_not = True
  553.                                 print("   =========================================================================")
  554.                                 #print("\n", end = "")
  555.                                 print("\n >  %s TRACKLIST " % album.upper())
  556.                                 print("\n   =========================================================================")
  557.                                 print_tracks(track)
  558.                     if find_or_not == False:
  559.                    
  560.                         print("\n   ALBUM NOT FOUND\n")
  561.                 elif option2 == "2" or option2 == "go back" or option2 == "quit" or option2 == "exit":
  562.                     print("\n")
  563.                     break
  564.                 else:
  565.                     print("\n   THAT DOESN'T EVEN EXIST\n")
  566.                    
  567.         elif option == "4" or option == "random" or option == "random quote":
  568.            
  569.             random_quote()
  570.                    
  571.         elif option == "5" or option == "how many times" or option == "count" or option == "count how many times" or option == "count times":
  572.             count()
  573.             if times > 0:
  574.                 if times == 1:
  575.                     print("   MC RIDE SAID ", end = "\"")
  576.                     print(input_count.upper(), end = "\"")
  577.                     print(" EXACTLY", times, "TIME", end  = "\n")
  578.                     print("\n   =========================================================================")
  579.                 else:
  580.                     print("   MC RIDE SAID ", end = "\"")
  581.                     print(input_count.upper(), end = "\"")
  582.                     print(" EXACTLY", times, "TIMES", end  = "\n")
  583.                     print("\n   =========================================================================")
  584.                
  585.             else:
  586.                 print("   MC RIDE NEVER SAID THAT", end = "\n")
  587.                 print("\n   =========================================================================")
  588.             times = 0
  589.            
  590.         elif option == "6" or option == "random" or option == "random track" or option == "random lyrics" or option == "lyrics":
  591.             random_lyrics()
  592.                    
  593.         elif option == "7" or option == "quit" or option == "exit":
  594.             still_in = False
  595.             break
  596.        
  597.         elif option == "dude nice": #starting from here it's just stupid inside jokes that the people who were supposed to see probably didn't even download the program
  598.             print("\n")
  599.             print("   =========================================================================")
  600.             print("\n", end = "")
  601.             print("   ok thanks", end = "")
  602.             print("\n")
  603.             print("   =========================================================================")
  604.            
  605.         elif option == "taxation":
  606.             print("\n")
  607.             print("   =========================================================================")
  608.             print("\n", end = "")
  609.             print("   IS THEFT!!!11", end = "")
  610.             print("\n")
  611.             print("   =========================================================================")
  612.            
  613.         elif option == "is taxation theft" or option == "is taxation theft?":
  614.             print("\n")
  615.             print("   =========================================================================")
  616.             print("\n", end = "")
  617.             print("   Hell yeah dude", end = "")
  618.             print("\n")
  619.             print("   =========================================================================")
  620.            
  621.         elif option == "taxation is theft":
  622.             print("\n")
  623.             print("   =========================================================================")
  624.             print("\n", end = "")
  625.             print("   You're god damn right it is!", end = "")
  626.             print("\n")
  627.             print("   =========================================================================")
  628.            
  629.         elif option == "ok" or option == "ok nice":
  630.             print("\n")
  631.             print("   =========================================================================")
  632.             print("\n", end = "")
  633.             print("   ok thanks", end = "")
  634.             print("\n")
  635.             print("   =========================================================================")
  636.        
  637.         elif option == "dude ok" or option == "nice ok":
  638.             print("\n")
  639.             print("   =========================================================================")
  640.             print("\n", end = "")
  641.             print("   ok nice", end = "")
  642.             print("\n")
  643.             print("   =========================================================================")
  644.            
  645.         elif option == "nice":
  646.             print("\n")
  647.             print("   =========================================================================")
  648.             print("\n", end = "")
  649.             print("   ok", end = "")
  650.             print("\n")
  651.             print("   =========================================================================")
  652.        
  653.         elif option == "imposto":
  654.             print("\n")
  655.             print("   =========================================================================")
  656.             print("\n", end = "")
  657.             print("   ROUBO", end = "")
  658.             print("\n")
  659.             print("   =========================================================================")
  660.        
  661.         elif option == "birds" or option == "fuck you" or option == "fuck u":
  662.             print("\n")
  663.             print("   =========================================================================")
  664.             print("\n", end = "")
  665.             print("   FUCK YOU", end = "")
  666.             print("\n")
  667.             print("   =========================================================================")
  668.            
  669.         elif option == "björk":
  670.             print("\n")
  671.             print("   =========================================================================")
  672.             print("\n", end = "")
  673.             print("    <3 <3 <3 <3 <3 <3 <3 <3 <3 <3 <3 BJÖRK <3 <3 <3 <3 <3 <3 <3 <3 <3 <3 <3", end = "")
  674.             print("\n")
  675.             print("   =========================================================================")
  676.            
  677.         elif option == "hoffman" or option == "matthew hoffman" or option == "hoff" or option == "matty" or option == "matty hoff" or option == "matty hoffman":
  678.             print("\n")
  679.             print("   =========================================================================")
  680.             print("\n", end = "")
  681.             print("    <3 <3 <3 <3 <3 <3 <3 <3 <3 <3 <3 MATTY <3 <3 <3 <3 <3 <3 <3 <3 <3 <3 <3", end = "")
  682.             print("\n")
  683.             print("   =========================================================================")
  684.        
  685.         elif option == "bjork":
  686.             print("\n")
  687.             print("   =========================================================================")
  688.             print("\n", end = "")
  689.             print("   IT'S BJÖRK YOU FUCKING IDIOT", end = "")
  690.             print("\n")
  691.             print("   =========================================================================")
  692.        
  693.         else:
  694.             print("\n")
  695.             print("\n   =========================================================================")
  696.             print("\n   I DIDN'T GET THAT.\n\n   TRY AGAIN.")
  697.             print("\n   =========================================================================")
  698.  
  699.  
  700. def test():
  701.     global times
  702.     with open(bottomless_pit["Eh"]) as f:
  703.         #for line in f:
  704.            
  705.             #line = line.replace(",", "")
  706.             #line = line.split()
  707.            
  708.             #for word in line:
  709.                 #word = word.lower()
  710.                 #if word.replace(",", "") == "reflection":
  711.                     #print("\n")
  712.                     #uprint(line)
  713.                     #break
  714.         for line in f:
  715.             #line = line.replace(",", "")
  716.             line = line.replace(",", "")
  717.             line = line.replace("-", "")
  718.             line = line.replace("!", "")
  719.             line = line.replace(".", "")
  720.             line = line.replace("...", "")
  721.             line = line.replace("\"", " ")
  722.             line2 = line.split()
  723.             #line = " ".join(line2)
  724.             #uprint(line2)
  725.             #line = line.split()
  726.             #line2 = line.split()
  727.             #line = " ".join(line2)
  728.             #line2 = line.split(",")
  729.             #line = "".join(line2)
  730.             #line = line.split()
  731.             #print(line)
  732.             #for word in line:
  733.                 #if word == input_count:
  734.                     #times += 1
  735.                    
  736.             #if input_count in line:#.split() or input_count in line.split(","):
  737.                 #times += 1
  738.             for word in line2:
  739.                 word = word.lower()
  740.                 uprint(word, end = " "),
  741.                 #word1 = word.replace(",", "").split()
  742.                 #word1 = " ".join(word1)
  743.                 #word2 = word1.replace("-", "").split()
  744.                 #word2 = " ".join(word2)
  745.                 #word3 = word2.replace("!", "").split()
  746.                 #word3 = " ".join(word3)
  747.                 #word4 = word3.replace(".", "").split()
  748.                
  749.                 if word == "reflection":#1 == input_count and word2 == input_count and word3 == input_count and word4 == input_count:
  750.                     print("\n\n\nit's here\n\n\n")
  751.                     #print("\n")
  752.                     #uprint(line)
  753.                     times += 1
  754.                    
  755.                     #break
  756.     print(times)       
  757.                
  758.                
  759. print("\n")
  760. print("   =========================================================================")
  761. print("\n                               DEATH GRIPS 2.0")
  762. print("\n   =========================================================================")
  763. main_menu()
Add Comment
Please, Sign In to add comment