Last active
February 7, 2024 14:31
-
-
Save fukaz55/9563d5edd048f48fff3dbceeca740299 to your computer and use it in GitHub Desktop.
ロピアの店内で流れている「あいうえ あいらぶ~ らぶらぶ らりるれ らぶらぶ♪」の曲の替え歌を自動生成するpythonスクリプト
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# ロピアの替え歌を作るスクリプト | |
import random | |
def main(): | |
hiragana_list = ( | |
"あいうえお", "かきくけこ", "さしすせそ", "たちつてと", "なにぬねの", "はひふへほ", "まみむめも", "らりるれろ" | |
"がぎぐげご", "ざじずぜぞ", "だぢづでど", "ばびぶべぼ", "ぱぴぷぺぽ" | |
) | |
list_size = len(hiragana_list) | |
aiue_it = random.randint(0, list_size - 1) | |
aiue = hiragana_list[aiue_it][0:4] | |
ai = aiue[0:2] | |
love_it = -1 | |
while love_it < 0 or love_it == aiue_it: | |
love_it = random.randint(0, list_size - 1) | |
love = hiragana_list[love_it][0:1] + hiragana_list[random.randint(0, list_size - 1)][2:3] | |
rarirure = "" | |
while rarirure == "" or aiue == rarirure: | |
rarirure = hiragana_list[love_it][0:4] | |
lopia = "ろぴあ" | |
naninune = "" | |
while naninune == "" or aiue == naninune or naninune == rarirure: | |
naninune = hiragana_list[random.randint(0, list_size - 1)][0:4] | |
nikoniko = hiragana_list[random.randint(0, list_size - 1)][1:2] + hiragana_list[random.randint(0, list_size - 1)][3:4] | |
nikoniko = nikoniko + nikoniko | |
hahihuhe = "" | |
while hahihuhe == "" or aiue == hahihuhe or naninune == hahihuhe or rarirure == hahihuhe: | |
str = hiragana_list[random.randint(0, list_size - 1)] | |
hahihuhe = str[0:4] | |
ho = str[4:5] | |
print(aiue + " " + ai + love + "~♪") | |
print(love + love + rarirure + " " + love + love + "♪") | |
print(rarirure + " " + lopia + "は " + love + love + lopia + "♪") | |
print(naninune + " " + nikoniko + "~♪") | |
print(hahihuhe + " " + ho + "っ" + ho + "っ" + ho + "っ♪") | |
print(rarirure + " " + lopia + "は " + love + love + lopia + "♪") | |
if __name__ == "__main__": | |
main() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment