Commit 256414c7 authored by Grzegorz Adam Hankiewicz's avatar Grzegorz Adam Hankiewicz
Browse files

Stores original file, including DOS line endings.

parent 3efcda53
#########################################################################################
# #
# Hi, it's Kpopalypse here - thanks for checking out my Patreon and helping Kpopalypse #
# in his eternal quest to be the k-pop blogger with maximum determination! #
# #
# This is the source code for the Kpopalyspe fan comment generator. It runs in version #
# 3.7.1 of Python and the version on itch.io was compiled using Pyinstaller. #
# #
# I'm really not very good at this programming thing, so this code is probably a bit #
# sub-optimal, plus there are probably many additions that dedicated caonimas could #
# make to this program if they felt so inclined. These comments will talk you through #
# each step of the code if you're a know-nothing about programming like me. Enjoy and #
# don't forget to visit kpopalypse.com for all your caonima needs! # #
# #
#########################################################################################
#########################################################################################
#
# This command imports the necessary modules.
# The module "sys" is required for sys sys.exit() command, which kills the program.
# The module "os" is required to resize the output window, because the default was
# kinda tiny and a bit crap, really.
#
import sys, os
#
# This is the code that resizes the window to 159 columns X 40 rows.
#
os.system('mode con: cols=159 lines=40')
#
# The program runs as a series of modules, each module is first defined by the "def"
# statement.
#
#########################################################################################
#
#
def multiples():
print ('Are you stanning a group or a solo performer?')
print ('Press g for group, or s for a solo performer.')
print ('Press ENTER after your selection.')
#
# The program asks for keyboard input and makes the result a variable called "selectoneofmany".
#
selectoneormany = input()
#
# The result determines what grammar is used, and also where the program goes next.
# If you're stanning a group then the module that runs next is called boygirlgroup(), or
# if it's a solo performer the program goes to boygirlsolo().
#
if selectoneormany == ('g'):
global isare
global gender
global gendercap
isare = ('are')
gender = ('their')
gendercap = ('Their')
boygirlgroup()
elif selectoneormany == ('s'):
isare = ('is')
boygirlsolo()
#
# If you're a complete twit who can't type, this "else" statement catches your invalid input,
# And returns you to the top of the module called multiples().
#
else:
print ('Please enter a valid selection.')
print ('')
multiples()
#
#
#########################################################################################
#
#
#
# If you select a group but only select one group member, the program will sense that you are
# trolling and ask you to reflect. If you say yes the program runs again from the start,
# otherwise you are "cancelled and dismissed" and the program terminates.
#
def reflection():
print ('Stop trying to break things!')
print ('Will you reflect and return with a more mature image? (y/n)')
reflect = input()
if reflect == ('y'):
program()
else:
sys.exit()
#
#
#########################################################################################
#
#
#
# The program asks the gender of the solo performer. This is needed for grammar purposes.
#
def boygirlsolo():
print ('Is the performer male or female?')
print ('Press m for male, or f for female.')
print ('Press ENTER after your selection.')
maleorfemale = input()
global gender
global gendercap
if maleorfemale == ('m'):
gender = ('his')
gendercap = ('His')
elif maleorfemale == ('f'):
gender = ('her')
gendercap = ('Her')
#
# If you try and write something fancy like "attack helicopter" you will be told that
# there are only two genders, and then this section of the program restarts.
# If this is offensive to your gender identity, replace the below lines with this:
#
# else:
# gender = ('ze')
# gendercap = ('Ze')
#
else:
print ('THERE ARE ONLY TWO GENDERS!!!!!!!11!1!1111oneoneeleven')
print ('Please enter a valid selection.')
print ('')
boygirlsolo()
#
# Once the gender is determined, then the module solo() runs.
#
solo()
#
#
#########################################################################################
#
#
def boygirlgroup():
#
# This section is similar to the gender selection above except here a third gender IS
# allowed because of the posibility of co-ed groups.
#
print ('What gender is the group?')
print ('Press m for male, f for female or c for co-ed.')
print ('Press ENTER after your selection.')
maleorfemale = input()
global gender
global gendercap
if maleorfemale == ('m'):
gender = ('his')
gendercap = ('His')
elif maleorfemale == ('f'):
gender = ('her')
gendercap = ('Her')
elif maleorfemale == ('c'):
gender = ('their')
gendercap = ('Their')
else:
print ('THERE ARE ONLY TWO GENDERS!!!!!!!11!1!1111oneoneeleven')
print ('Please enter a valid selection.')
print ('')
boygirlgroup()
#
# Once we've settled the gender war, the module grouproutine() runs for groups.
#
grouproutine()
#
#
#########################################################################################
#
#
#
# The solo() section asks for the name of the performer and throws it into every single
# space in the final text where a name is needed.
#
def solo():
print ('Enter the name of your solo performer.')
#
# Each variable has to be defined as "global" before it is actually assigned. This is
# because the variables won't work between different modules ("the global scope") unless
# I do this, the are in the "local scope" instead, which means the values are forgotten
# once that particular module finishes running. That's not what I want, so I declare
# each variable as global. Yes, a pain in the ass.
#
global m1
global m4
global m2
global m5
global m3
global m7
global m6
global m8
global m9
global m10
global group
#
# This code makes every member the same name as the first member.
#
m1 = input()
m2 = m1
m3 = m1
m4 = m1
m5 = m1
m6 = m1
m7 = m1
m8 = m1
m9 = m1
m10 = m1
group = m1
#
# The adjectives module is then run.
#
adjectives()
#
#
#########################################################################################
#
#
def grouproutine():
while True:
#
# This whole "while True" business is kinda lame, but the idea of it is that it puts
# everything below it in a loop, which means I can then use "break" statements to
# exit that loop if I want, this is convenient from a program flow perspective.
#
print ('Enter the name of the group.')
global group
group = input()
print ('Enter the name of any group member.')
global m1
global m4
global m2
global m5
global m3
global m7
global m6
global m8
global m9
global m10
m1 = input()
print ('Enter the name of another group member.')
m2 = input()
#
# This is the bit where if you don't have more than one member in your group the
# program thinks you're being a massive fuckwad and puts you in reflection.
#
if m2 == (''):
print ('I thought you said this was a group, not a solo performer!')
reflection()
print ('Enter the name of another group member.')
print ('If there are no more members, just press ENTER.')
#
# The rest of this section is all the same - it's assigning different variables to the different
# group members you input. If you have less than ten members, the program just recycles members
# you used earlier, in order. Note that while the program can store a maximum of ten members,
# only nine members are used in the final text. This is because I forgot how many members were
# in SF9 (because I was too much of a dumb fuck to realise what the 9 in SF9 meant) so I just
# guessed that there might have been ten and wrote the code around that, then couldn't be fucked
# changing it once I realised. If you press Enter without giving a name, the program breaks out
# of the loop established earlier so it can move onto the next thing.
#
m3 = input()
if m3 == (''):
m3 = m1
m4 = m2
m5 = m1
m6 = m2
m7 = m1
m8 = m2
m9 = m1
m10 = m2
break
print ('Enter the name of another group member.')
print ('If there are no more members, just press ENTER.')
m4 = input()
if m4 == (''):
m4 = m1
m5 = m2
m6 = m3
m7 = m1
m8 = m2
m9 = m3
m10 = m1
break
print ('Enter the name of another group member.')
print ('If there are no more members, just press ENTER.')
m5 = input()
if m5 == (''):
m5 = m1
m6 = m2
m7 = m3
m8 = m4
m9 = m1
m10 = m2
break
print ('Enter the name of another group member.')
print ('If there are no more members, just press ENTER.')
m6 = input()
if m6 == (''):
m6 = m1
m7 = m2
m8 = m3
m9 = m4
m10 = m5
break
print ('Enter the name of another group member.')
print ('If there are no more members, just press ENTER.')
m7 = input()
if m7 == (''):
m7 = m1
m8 = m2
m9 = m3
m10 = m4
break
print ('Enter the name of another group member.')
print ('If there are no more members, just press ENTER.')
m8 = input()
if m8 == (''):
m8 = m1
m9 = m2
m10 = m3
break
print ('Enter the name of another group member.')
print ('If there are no more members, just press ENTER.')
m9 = input()
if m9 == (''):
m9 = m1
m10 = m2
break
print ('Enter the name of another group member.')
print ('If there are no more members, just press ENTER.')
m10 = input()
if m10 == (''):
m10 = m1
break
print ("Okay, that's enough members. Nobody cares about the other ones.")
break
#
# Once the program breaks, the adjectives routine is run, which means that our "solo"
# and "group" program flows now meet up here.
#
adjectives()
#
#
#########################################################################################
#
#
#
# This code asks some basic questions and substitutes them for certain adjectives in the
# original fan email. If you want it to read exactly like the original, the three
# adjectives are "deep", "beautiful" and "incredible". Of course "deep" doesn't really
# match food in any way, but I thought the results were funnier when I used food as the
# element to describe. The program will accept any input here, or even none at all.
#
def adjectives():
print ('')
print ('In one word only, describe the taste of your favourite food.')
global adj1
adj1 = input()
print ('In one word only, describe the appearance of someone you are physically attracted to.')
global adj2
adj2 = input()
print ('In one word only, describe the feeling of a (good) orgasm.')
global adj3
adj3 = input()
#
# The printout is the program's payoff.
#
printout()
#
#
#########################################################################################
#
#
#
# It should be fairly obvious how this works - the variable names defined earlier are called and
# replace certain key words in the original text.
#
def printout():
print ('')
print ('Your crazy k-pop fan comment copypasta is below. Please feel free to copy and paste, use anywhere - especially on www.asianjunkie.com!')
print ('')
print ('-------------------------------------------------------------------')
print ('')
print ('I see that everyone is following the pack.')
print ('Someone has an opinion and all of a sudden it is fact.')
print (group + (' ') + isare + (' absolutely unique in the industry. ') + gendercap + (' chemistry is ') + adj2 + (', ') + gender + (' vocals are distinctive and so well arranged!'))
print (('I was more impressed that ') + m1 + (' started this ') + adj2 + (' arrangement off and the progression through ') + m2 + (', ') + m3 + (' and ') + m4 + (' with that rich tone of ') + m5 + (' was beautifully'))
print (('orchestrated into the chorus into a ') + adj2 + (' blend of vocals with ') + m6 + (' breaking through ') + gender + (' ') + adj2 + (' range! We have ') + m7 + (' singing through at key moments!'))
print (('Then comes the ') + adj1 + (' and ') + adj2 + (' voices of ') + m8 + (' and ') + m9 + ('.'))
print ('')
print (('The song is a very delicious recipe of vocals that draws you in and highlights the individuality of each member!'))
print (group + (' always ') + isare + (' uniquely talented and outstanding.'))
print (('Listen to it with more knowledge and pay attention to the tones and blends of some of the most ') + adj2 + (' vocals in the industry. They are ') + adj3 + (' artists and'))
print (('this was a song highlighting ') + gender + (' uniqueness.'))
print ('')
print (("Just because someone wrote this review doesn't make it true. It is an opinion and an opinion that lacks knowledge of these artists and music!"))
print ('')
print (group + (" will always stand out. Wait and see what's coming next!"))
print ('')
print (('Beautiful work ') + group + ('. Congratulations !'))
print ('')
print ('-------------------------------------------------------------------')
print ('')
#
# If I don't have a "run this again" prompt, the program immediately exits after creating the
# printout, which means that you don't get time to read any of it.
#
print ('Run the program again? (y/n)')
yesno = input()
if yesno == 'y':
program()
else:
sys.exit()
#
#
#########################################################################################
#
#
#
# This routine marks the start of the program, and then moves to the multiples module,
# which was the first one programmed.
#
def program():
print ('')
print ('-------------------------------------------------------------------')
print ('|| ||')
print ('|| K-pop fan comment generator, by Kpopalypse ||')
print ('|| ||')
print ('-------------------------------------------------------------------')
print ('')
multiples()
#
#
#########################################################################################
#
#
#
# Now that all the routines are defined, the following line kicks off the program itself.
# Because every module either exits the program or sends the program to the start of
# another module once it finishes, it doesn't matter that the routines are not in
# any strict order - the point of writing the program this way is to have the ability
# to jump between routines at will.
#
program()
#
#
#########################################################################################
#########################################################################################
# #
# That's it, caonima! Hopefully this was vaguely interesting for you! #
# Kpopalypse will return with more content! Stay determined! #
# #
#########################################################################################
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment