#!/usr/bin/python # -*- coding: UTF-8 -*- # 2018-02-16 # CB trying to create a little program # that fills a terminal console with text import sys import os import random import time import subprocess os.system('clear') # terminal colors # https://i.stack.imgur.com/KTSQa.png colors = ['\033[95m', '\033[94m', '\033[91m', '\033[93m', '\033[92m', '\033[0m', '\033[1m' # bold, '\033[213m', '\033[202m', '\033[11m', '\033[9m', '\033[52m', '\033[226', '\033[8m' #'\033[4m' # underline ] gobbledegook = '' alpha=['a','b','c','d','e','f','g','h','i','j','k','l','n','o','p','q','r','s','t','u','v','w','x','y','z', ' ', '1','2','3','▄','█','!','¡','?','¿','...',',''(',')','&',' ',' ',' ',' '] for x in range (0, random.randint(1,25)): gobbledegook = random.choice(alpha) + gobbledegook # list of words/phrases words = ["hello world ", " RESIST ", " R E S I S T ", " FUCK TRUMP!", " dismantle the patriarchy ", " CODE like a GIRL ", " B L A C K L I V E S M A T T E R ", "0101001010100110101001101010100110", "000020020", "8*B#&^BD^*V*^%&@^^^&&@", "15625UD%@6!&^@", gobbledegook, gobbledegook, gobbledegook, gobbledegook, gobbledegook ] # list of commands to run, use the results as input for printing # list of characters to choose from. everything will be created using these text = ['0', '1', '-', '|', '[', ']', '^^^^^', '@', '?', '#', '█', '▀', '▀', '▀', '█', '█', '█', ',', '░', '░', '░', '░', '░', '.', '=', '©', '¶', '$', '€', 'Ò', 'ø', '‰', random.choice(words), random.choice(words), random.choice(words), random.choice(words), random.choice(words), random.choice(words) ] # a random selection of items from the text list rantext = random.choice(text) # generate a random length combination of the possible text items rantext = '' for x in range (0, random.randint(1,10)): rantext = random.choice(text) + rantext # randomly choose one of the text options textchoice = random.choice(text) fillstylechoices = ['one','random'] fillstyle = random.choice(fillstylechoices) if fillstyle == "one": fill = textchoice upperRange = 9000 elif fillstyle == "random": fill = rantext upperRange = 900 # choices for end of each text block endchoices = ['',' ',''] # choose an end type endchoice = random.choice(endchoices) # choose whether each item is on a new line newlinechoices = ['yes','no'] newlinechoice = random.choice(newlinechoices) # choose whether to use 1 color or many colortypes = ['one','many'] colortype = random.choice(colortypes) if colortype == "one": # choose a single random color to use color = random.choice(colors) for x in range(0, upperRange): # SET THE COLOR FOR EACH CHARACTER if colortype == "one": # use a single color sys.stdout.write(color) else: # use many colors randomly sys.stdout.write(random.choice(colors)) if newlinechoice == "yes": sys.stdout.write("") if newlinechoice == "no": sys.stdout.flush() # PRINT THE CHARACTER sys.stdout.write(fill) if newlinechoice == "yes": sys.stdout.write("") if newlinechoice == "no": sys.stdout.flush() # PRINT AN ENDING THING (space, no space, etc.) for x in range(random.randint(1,30)): sys.stdout.write(endchoice) if newlinechoice == "yes": sys.stdout.write("") elif newlinechoice == "no": sys.stdout.flush() #os.system("ls /Users/chris/Library/Application\ Support/SuperCollider/downloaded-quarks/Dirt-Samples kj