Skip to content

Instantly share code, notes, and snippets.

@neuberoliveira
Created February 18, 2019 14:38
Show Gist options
  • Save neuberoliveira/611adad3c5867ef6475a2ae3d811a7db to your computer and use it in GitHub Desktop.
Save neuberoliveira/611adad3c5867ef6475a2ae3d811a7db to your computer and use it in GitHub Desktop.
Random GitMoji
#!/usr/bin/python
import sys
from random import randint
emojiList = [
":art:",
":zap:",
":fire:",
":bug:",
":ambulance:",
":sparkles:",
":memo:",
":rocket:",
":lipstick:",
":tada:",
":white_check_mark:",
":lock:",
":apple:",
":penguin:",
":checkered_flag:",
":robot:",
":green_apple:",
":bookmark:",
":rotating_light:",
":construction:",
":green_heart:",
":arrow_down:",
":arrow_up:",
":pushpin:",
":construction_worker:",
":chart_with_upwards_trend:",
":recycle:",
":whale:",
":heavy_plus_sign:",
":heavy_minus_sign:",
":wrench:",
":globe_with_meridians:",
":pencil2:",
":hankey:",
":rewind:",
":twisted_rightwards_arrows:",
":package:",
":alien:",
":truck:",
":page_facing_up:",
":boom:",
":bento:",
":ok_hand:",
":wheelchair:",
":bulb:",
":beers:",
":speech_balloon:",
":card_file_box:",
":loud_sound:",
":mute:",
":busts_in_silhouette:",
":children_crossing:",
":building_construction:",
":iphone:",
":clown_face:",
":egg:",
":see_no_evil:",
":camera_flash:",
":alembic:",
":mag:",
":wheel_of_dharma:",
":label:",
]
listSize = len(emojiList)-1
messageLen = 1
message = []
if(len(sys.argv)>1):
messageLen = int(sys.argv[1])
for i in range(0, messageLen):
index = randint(0, listSize)
message.append(emojiList[index])
print " ".join(message)
@neuberoliveira
Copy link
Author

neuberoliveira commented Feb 18, 2019

Usage random-emoji [size]

size is how many gitmojis will be created default 1

random-emoji 2
:apple: :globe_with_meridians:
random-emoji 3
:rotating_light: :bulb: :building_construction:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment