Just some recent changes
This commit is contained in:
parent
ce32bc223b
commit
9247e2f2e2
|
@ -16,5 +16,5 @@ alias beats_raw='echo "x = (`date +%s` + 3600) % 86400; scale=3; x / 86.4" | bc'
|
||||||
alias beats='printf "@\e[0;36m`beats_raw`\e[m\n"'
|
alias beats='printf "@\e[0;36m`beats_raw`\e[m\n"'
|
||||||
alias pp='python -mjson.tool'
|
alias pp='python -mjson.tool'
|
||||||
alias ttbp='~endorphant/bin/ttbp'
|
alias ttbp='~endorphant/bin/ttbp'
|
||||||
alias vuln='find /home/ \! -type l -perm -o=w 2> /dev/null'
|
alias vuln='find /home/ \! -type l -perm -o=w ! -iwholename '*.git*' 2> /dev/null'
|
||||||
alias vulnc='vuln | sed "s/\/home\/\([^/]*\)\/.*/\1/g" | sort | uniq -c | sort -nr'
|
alias vulnc='vuln | sed "s/\/home\/\([^/]*\)\/.*/\1/g" | sort | uniq -c | sort -nr'
|
||||||
|
|
|
@ -187,7 +187,7 @@ def figlet(channel, text):
|
||||||
lines = subprocess.Popen(["figlet", "-w140"] + text.split(' '), shell=False, stdout=subprocess.PIPE).stdout.read()
|
lines = subprocess.Popen(["figlet", "-w140"] + text.split(' '), shell=False, stdout=subprocess.PIPE).stdout.read()
|
||||||
for line in lines.split('\n'):
|
for line in lines.split('\n'):
|
||||||
ircsock.send("PRIVMSG " + channel + " :" + line + "\n")
|
ircsock.send("PRIVMSG " + channel + " :" + line + "\n")
|
||||||
time.sleep(0.3) #to avoid channel throttle due to spamming
|
time.sleep(0.4) #to avoid channel throttle due to spamming
|
||||||
|
|
||||||
def toilet(channel, text):
|
def toilet(channel, text):
|
||||||
if not text:
|
if not text:
|
||||||
|
@ -196,7 +196,7 @@ def toilet(channel, text):
|
||||||
lines = subprocess.Popen(["toilet", "-w140", "--irc"] + text.split(' '), shell=False, stdout=subprocess.PIPE).stdout.read()
|
lines = subprocess.Popen(["toilet", "-w140", "--irc"] + text.split(' '), shell=False, stdout=subprocess.PIPE).stdout.read()
|
||||||
for line in lines.split('\n'):
|
for line in lines.split('\n'):
|
||||||
ircsock.send("PRIVMSG " + channel + " :" + line + "\n")
|
ircsock.send("PRIVMSG " + channel + " :" + line + "\n")
|
||||||
time.sleep(0.3) #to avoid channel throttle due to spamming
|
time.sleep(0.4) #to avoid channel throttle due to spamming
|
||||||
|
|
||||||
def get_acronym(channel, text):
|
def get_acronym(channel, text):
|
||||||
if not text:
|
if not text:
|
||||||
|
@ -223,6 +223,13 @@ def get_whosaid(channel, text):
|
||||||
msg += ' and %s said it %d times' % (result['data'][1][0], result['data'][1][1])
|
msg += ' and %s said it %d times' % (result['data'][1][0], result['data'][1][1])
|
||||||
ircsock.send("PRIVMSG " + channel + " :" + msg + ".\n")
|
ircsock.send("PRIVMSG " + channel + " :" + msg + ".\n")
|
||||||
|
|
||||||
|
def get_notice(user, channel):
|
||||||
|
ircsock.send("CNOTICE " + user + " " + channel + " :Notice me sempai!\n")
|
||||||
|
|
||||||
|
def get_water(user, channel, msg, botnick):
|
||||||
|
if msg.find(botnick) == 0:
|
||||||
|
ircsock.send("PRIVMSG " + channel + " :Fight me, " + user + "!\n")
|
||||||
|
|
||||||
def mug_off(channel):
|
def mug_off(channel):
|
||||||
ircsock.send("PRIVMSG " + channel + " :u want some of this, m8?\n")
|
ircsock.send("PRIVMSG " + channel + " :u want some of this, m8?\n")
|
||||||
|
|
||||||
|
@ -317,6 +324,13 @@ def listen(botnick):
|
||||||
if ircmsg.find(":!whosaid") != -1:
|
if ircmsg.find(":!whosaid") != -1:
|
||||||
get_whosaid(channel, messageText[9:])
|
get_whosaid(channel, messageText[9:])
|
||||||
|
|
||||||
|
if ircmsg.find(":!notice") != -1:
|
||||||
|
get_notice(user, channel)
|
||||||
|
|
||||||
|
if ircmsg.find(":!water") != -1:
|
||||||
|
get_water(user, channel, messageText[7:], botnick)
|
||||||
|
|
||||||
|
|
||||||
if ircmsg.find(":!rollcall") != -1:
|
if ircmsg.find(":!rollcall") != -1:
|
||||||
rollcall(channel)
|
rollcall(channel)
|
||||||
|
|
||||||
|
|
|
@ -40,7 +40,8 @@ and continue asking for word replacement until it runs out of words to replace.
|
||||||
* Allow story writers the ability to specify that a single answer should be used multiple times in a story
|
* Allow story writers the ability to specify that a single answer should be used multiple times in a story
|
||||||
* Maybe specified like {{#a noun#}} or {{#a noun#4}}
|
* Maybe specified like {{#a noun#}} or {{#a noun#4}}
|
||||||
* Create word-munging options that can be specified for a word to modify given user input
|
* Create word-munging options that can be specified for a word to modify given user input
|
||||||
* Capital - convert "foo" to "Foo"
|
* title - convert "foo" to "Foo"
|
||||||
* AllCaps - convert "bar" to "BAR"
|
* upper - convert "bar" to "BAR"
|
||||||
* Numeric - convert "3" to "three"
|
* lower - convert "bAz" to "baz"
|
||||||
* Ordinal - convert "3" to "third"
|
* numeric - convert "3" to "three"
|
||||||
|
* ordinal - convert "3" to "third"
|
||||||
|
|
|
@ -1,12 +1,16 @@
|
||||||
#!/usr/bin/python
|
#!/usr/bin/python
|
||||||
|
|
||||||
|
import collections
|
||||||
import glob
|
import glob
|
||||||
|
import inflect
|
||||||
import random
|
import random
|
||||||
import re
|
import re
|
||||||
|
|
||||||
|
p = inflect.engine()
|
||||||
file_pattern = "/home/*/madlibs/*.madlib"
|
file_pattern = "/home/*/madlibs/*.madlib"
|
||||||
file_regex = re.compile(r'^/home/(.*?)/.*/([^/]*)\.madlib$')
|
file_regex = re.compile(r'^/home/(.*?)/.*/([^/]*)\.madlib$')
|
||||||
word_regex = re.compile(r'{{(.*?)}}')
|
word_regex = re.compile(r'{{(.*?)(#.*?)?(\|.*)?}}')
|
||||||
|
word_replace_regex = re.compile(r'^(.*)#(\d*)$')
|
||||||
|
|
||||||
# Take a file path and return a tuple with the title and original path
|
# Take a file path and return a tuple with the title and original path
|
||||||
def munge_story(file_name):
|
def munge_story(file_name):
|
||||||
|
@ -25,7 +29,16 @@ def find_stories(limit=999, shuffle=False):
|
||||||
|
|
||||||
# Count the number of replacable words in the story
|
# Count the number of replacable words in the story
|
||||||
def count_words(story):
|
def count_words(story):
|
||||||
return len(word_regex.findall(story))
|
# words that have a '#' part and match should only be counted once
|
||||||
|
count = 0
|
||||||
|
repeats = []
|
||||||
|
for match in re.finditer(word_regex, story):
|
||||||
|
if match.group(2) is None: #the '#' part
|
||||||
|
count += 1
|
||||||
|
elif match.group(1) + match.group(2) not in repeats:
|
||||||
|
count += 1
|
||||||
|
repeats.append(match.group(1) + match.group(2))
|
||||||
|
return count
|
||||||
|
|
||||||
# Count the number of replacable words in the story when given a file path
|
# Count the number of replacable words in the story when given a file path
|
||||||
def count_words_file(storyPath):
|
def count_words_file(storyPath):
|
||||||
|
@ -45,10 +58,38 @@ def find_next_word(story, rand=False):
|
||||||
|
|
||||||
return (match.group(0), match.group(1))
|
return (match.group(0), match.group(1))
|
||||||
|
|
||||||
# Replace a word and return the entire story body
|
# Using a query phrase, replace a word and return the entire story body
|
||||||
def replace_word(story, query, word):
|
def replace_word(story, query, word):
|
||||||
return story.replace(query, word, 1)
|
rquery = word_regex.search(query)
|
||||||
#return re.sub(query, word, story, 1)
|
# '{{foo#bar|baz|bang}}' => ('foo', '#bar', '|baz|bang')
|
||||||
|
pipes = [p.lower() for p in (rquery.group(3) if rquery.group(3) is not None else '').strip('|').split('|')]
|
||||||
|
munged_word = process_pipes(word, pipes)
|
||||||
|
story = story.replace(query, munged_word, 1)
|
||||||
|
|
||||||
|
if rquery.group(2) is not None: #if there is a '#' part we replace all instances
|
||||||
|
print "Looking for {{" + rquery.group(1) + rquery.group(2) + ".*?}}"
|
||||||
|
others = re.findall(r'{{' + rquery.group(1) + rquery.group(2) + '.*?}}', story)
|
||||||
|
if len(others) > 0:
|
||||||
|
story = replace_word(story, others[0], word) #iteratively replace the next instance
|
||||||
|
|
||||||
|
return story
|
||||||
|
|
||||||
|
|
||||||
|
# Modify user input based on certain modifying pipes
|
||||||
|
def process_pipes(word, pipes):
|
||||||
|
for pipe in pipes:
|
||||||
|
try:
|
||||||
|
word = {
|
||||||
|
'upper': lambda word: word.upper(),
|
||||||
|
'lower': lambda word: word.lower(),
|
||||||
|
'title': lambda word: word.title(),
|
||||||
|
'numeric': lambda word: p.number_to_words(word),
|
||||||
|
'ordinal': lambda word: p.ordinal(word),
|
||||||
|
collections.defaultdict: lambda word: word
|
||||||
|
}[pipe](word)
|
||||||
|
except Exception:
|
||||||
|
pass # just keep going if an error occurs processing a pipe
|
||||||
|
return word
|
||||||
|
|
||||||
# A helper function that will split the story up into chat-printable lengths
|
# A helper function that will split the story up into chat-printable lengths
|
||||||
def yield_lines(line, max_size):
|
def yield_lines(line, max_size):
|
||||||
|
|
Binary file not shown.
|
@ -59,7 +59,7 @@ def resetGlobals(channel=""):
|
||||||
story[channel] = ""
|
story[channel] = ""
|
||||||
nextword[channel] = {}
|
nextword[channel] = {}
|
||||||
|
|
||||||
def get_stories(channel):
|
def get_stories(channel, botnick):
|
||||||
global state
|
global state
|
||||||
global stories
|
global stories
|
||||||
state[channel] = State.thinking
|
state[channel] = State.thinking
|
||||||
|
@ -73,11 +73,11 @@ def get_stories(channel):
|
||||||
for idx, story in enumerate(stories[channel]):
|
for idx, story in enumerate(stories[channel]):
|
||||||
sendmsg(channel, "[{}] {} ({} words)".format(idx, story[0], story[2]))
|
sendmsg(channel, "[{}] {} ({} words)".format(idx, story[0], story[2]))
|
||||||
time.sleep(0.5 * THROTTLE_FACTOR)
|
time.sleep(0.5 * THROTTLE_FACTOR)
|
||||||
sendmsg(channel, "Please select a story by index:")
|
sendmsg(channel, "Please select a story by index by saying '{}: <number>':".format(botnick))
|
||||||
state[channel] = State.story_selection
|
state[channel] = State.story_selection
|
||||||
|
|
||||||
# Handle user input when the bot is directly addressed
|
# Handle user input when the bot is directly addressed
|
||||||
def handle_bot_msg(channel, msg):
|
def handle_bot_msg(channel, msg, botnick):
|
||||||
global state
|
global state
|
||||||
global stories
|
global stories
|
||||||
|
|
||||||
|
@ -92,9 +92,9 @@ def handle_bot_msg(channel, msg):
|
||||||
if saved_state != State.idle and msg == "!quit":
|
if saved_state != State.idle and msg == "!quit":
|
||||||
quit_game(channel)
|
quit_game(channel)
|
||||||
elif saved_state == State.idle and msg == "startgame":
|
elif saved_state == State.idle and msg == "startgame":
|
||||||
get_stories(channel)
|
get_stories(channel, botnick)
|
||||||
elif saved_state == State.story_selection:
|
elif saved_state == State.story_selection:
|
||||||
handle_story_selection(channel, msg)
|
handle_story_selection(channel, msg, botnick)
|
||||||
elif saved_state == State.word_input:
|
elif saved_state == State.word_input:
|
||||||
handle_story_step(channel, msg)
|
handle_story_step(channel, msg)
|
||||||
else:
|
else:
|
||||||
|
@ -106,7 +106,7 @@ def quit_game(channel):
|
||||||
sendmsg(channel, "Ok, quitting the current game.")
|
sendmsg(channel, "Ok, quitting the current game.")
|
||||||
|
|
||||||
# Handle user input when we are in story selection mode
|
# Handle user input when we are in story selection mode
|
||||||
def handle_story_selection(channel, msg):
|
def handle_story_selection(channel, msg, botnick):
|
||||||
global stories
|
global stories
|
||||||
global state
|
global state
|
||||||
try:
|
try:
|
||||||
|
@ -120,19 +120,19 @@ def handle_story_selection(channel, msg):
|
||||||
with open(stories[channel][imsg][1], "r") as storyFile:
|
with open(stories[channel][imsg][1], "r") as storyFile:
|
||||||
story[channel] = storyFile.read()
|
story[channel] = storyFile.read()
|
||||||
stories[channel] = {} # Clear out the saved selectable stories in memory
|
stories[channel] = {} # Clear out the saved selectable stories in memory
|
||||||
story_start(channel)
|
story_start(channel, botnick)
|
||||||
except ValueError:
|
except ValueError:
|
||||||
sendmsg(channel, "Invalid selection. Try again!")
|
sendmsg(channel, "Invalid selection. Try again!")
|
||||||
state[channel] = State.story_selection
|
state[channel] = State.story_selection
|
||||||
|
|
||||||
# Handle when a story is being started
|
# Handle when a story is being started
|
||||||
def story_start(channel):
|
def story_start(channel, botnick):
|
||||||
global story
|
global story
|
||||||
global state
|
global state
|
||||||
global nextword
|
global nextword
|
||||||
|
|
||||||
state[channel] = State.thinking
|
state[channel] = State.thinking
|
||||||
sendmsg(channel, "Alright! Let's get started!")
|
sendmsg(channel, "Alright! Let's get started! Say '{}: <word>' to give me words.".format(botnick))
|
||||||
nextword[channel] = madlib.find_next_word(story[channel], True)
|
nextword[channel] = madlib.find_next_word(story[channel], True)
|
||||||
time.sleep(0.5 * THROTTLE_FACTOR)
|
time.sleep(0.5 * THROTTLE_FACTOR)
|
||||||
sendmsg(channel, "Give me {}:".format(nextword[channel][1]))
|
sendmsg(channel, "Give me {}:".format(nextword[channel][1]))
|
||||||
|
@ -169,7 +169,7 @@ def finish_story(channel):
|
||||||
sendmsg(channel, '=' * MAX_LINE)
|
sendmsg(channel, '=' * MAX_LINE)
|
||||||
for line in story[channel].splitlines():
|
for line in story[channel].splitlines():
|
||||||
for part in madlib.yield_lines(line, MAX_LINE):
|
for part in madlib.yield_lines(line, MAX_LINE):
|
||||||
time.sleep(0.4 * THROTTLE_FACTOR)
|
time.sleep(0.6 * THROTTLE_FACTOR)
|
||||||
sendmsg(channel, part)
|
sendmsg(channel, part)
|
||||||
padlen = (MAX_LINE - 9)/2
|
padlen = (MAX_LINE - 9)/2
|
||||||
mod = (MAX_LINE - 9) % 2
|
mod = (MAX_LINE - 9) % 2
|
||||||
|
@ -186,10 +186,19 @@ def sendmsg(chan , msg):
|
||||||
ircsock.send("PRIVMSG {} :{}\n".format(chan, msg))
|
ircsock.send("PRIVMSG {} :{}\n".format(chan, msg))
|
||||||
|
|
||||||
def joinchan(chan):
|
def joinchan(chan):
|
||||||
|
global state
|
||||||
|
state[chan] = State.idle
|
||||||
ircsock.send("JOIN {}\n".format(chan))
|
ircsock.send("JOIN {}\n".format(chan))
|
||||||
|
|
||||||
def rollcall(channel, botnick):
|
def rollcall(channel, botnick):
|
||||||
sendmsg(channel, "Do you like MadLibs? Start a collaborative story by saying '{}: startgame'".format(botnick))
|
global state
|
||||||
|
if channel not in state:
|
||||||
|
state[channel] = State.idle
|
||||||
|
|
||||||
|
if state[channel] == State.idle:
|
||||||
|
sendmsg(channel, "Do you like MadLibs? Start a collaborative story by saying '{}: startgame'".format(botnick))
|
||||||
|
else:
|
||||||
|
sendmsg(channel, "A game is already in progress. Say '{}: <word>' to provide me with the next word or '{}: !quit' to stop the current game".format(botnick, botnick))
|
||||||
|
|
||||||
def connect(server, channel, botnick):
|
def connect(server, channel, botnick):
|
||||||
ircsock.connect((server, 6667))
|
ircsock.connect((server, 6667))
|
||||||
|
@ -222,7 +231,7 @@ def listen(botnick):
|
||||||
rollcall(channel, botnick)
|
rollcall(channel, botnick)
|
||||||
elif message.startswith(botnick) == True:
|
elif message.startswith(botnick) == True:
|
||||||
botmsg = botmsgre.match(message).group(1)
|
botmsg = botmsgre.match(message).group(1)
|
||||||
handle_bot_msg(channel, botmsg)
|
handle_bot_msg(channel, botmsg, botnick)
|
||||||
|
|
||||||
sys.stdout.flush()
|
sys.stdout.flush()
|
||||||
time.sleep(1 * THROTTLE_FACTOR)
|
time.sleep(1 * THROTTLE_FACTOR)
|
||||||
|
|
|
@ -11,7 +11,7 @@ fuzz_amount = 3
|
||||||
def make_puzzle(obfuscate=True):
|
def make_puzzle(obfuscate=True):
|
||||||
answer = 0
|
answer = 0
|
||||||
bonus = 0
|
bonus = 0
|
||||||
puzzle = random.choice(["Prove you're not a robot: ", "Are you a robot?: ", "Anti-bot check: ", "Counter-cndorphant measures: ", "Cosnok countermeasures: ", "Anti-tildethief precautions: "])
|
puzzle = random.choice(["Prove you're not a robot: ", "Are you a robot?: ", "Anti-bot check: ", "Counter-cnd0rphant measures: ", "Cosn0k countermeasures: ", "Anti-tilde7hief precautions: "])
|
||||||
puzzle += random.choice(["What is", "How many is", "What do you get from", "What do you get with", "What is the value of", "Can you answer", "Can you tell me"])
|
puzzle += random.choice(["What is", "How many is", "What do you get from", "What do you get with", "What is the value of", "Can you answer", "Can you tell me"])
|
||||||
puzzle += " "
|
puzzle += " "
|
||||||
roll = random.randrange(0,18)
|
roll = random.randrange(0,18)
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
if [[ ! `pidof -sx madlibbot.py` ]]; then
|
if [[ ! `pidof -sx madlibbot.py` ]]; then
|
||||||
nohup ./madlibbot/madlibbot.py -s 127.0.0.1 -n madlibbot -c \#madlibs >> madliblog 2>> madliblog &
|
nohup ./madlibbot/madlibbot.py -s 127.0.0.1 -n madlibbot -c \#bots >> madliblog 2>> madliblog &
|
||||||
echo "Starting madlibbot"
|
echo "Starting madlibbot"
|
||||||
else
|
else
|
||||||
echo "madlibbot has already been started"
|
echo "madlibbot has already been started"
|
||||||
|
|
|
@ -1,13 +1,13 @@
|
||||||
krowbar&^%2211&^%1528995967
|
krowbar&^%2354&^%1537371836
|
||||||
karlen&^%498&^%1527613440
|
karlen&^%498&^%1527613440
|
||||||
endorphant&^%682&^%1444775660
|
endorphant&^%682&^%1444775660
|
||||||
jumblesale&^%24&^%1426171214
|
jumblesale&^%24&^%1426171214
|
||||||
marcus&^%2571&^%1528142058
|
marcus&^%2574&^%1530026564
|
||||||
papa&^%181&^%1474509971
|
papa&^%181&^%1474509971
|
||||||
epicmorphism&^%5&^%1421937744
|
epicmorphism&^%5&^%1421937744
|
||||||
audy&^%83&^%1504564254
|
audy&^%83&^%1504564254
|
||||||
kc&^%28&^%1480730333
|
kc&^%28&^%1480730333
|
||||||
vilmibm&^%15&^%1520970953
|
vilmibm&^%17&^%1535654280
|
||||||
cmr&^%2244&^%1485978592
|
cmr&^%2244&^%1485978592
|
||||||
imt&^%519&^%1424087616
|
imt&^%519&^%1424087616
|
||||||
cndorphant&^%788&^%1424094192
|
cndorphant&^%788&^%1424094192
|
||||||
|
@ -39,27 +39,27 @@ synergian&^%22&^%1458152889
|
||||||
dheeraj&^%5&^%1456489270
|
dheeraj&^%5&^%1456489270
|
||||||
demobot&^%6&^%1454439605
|
demobot&^%6&^%1454439605
|
||||||
premysl&^%65&^%1461768606
|
premysl&^%65&^%1461768606
|
||||||
minerobbe&^%268&^%1529052078
|
minerobbe&^%269&^%1530328006
|
||||||
xkeeper&^%14&^%1461967961
|
xkeeper&^%199&^%1536855625
|
||||||
cosnok&^%807&^%1508878859
|
cosnok&^%807&^%1508878859
|
||||||
escobar&^%1&^%1475431401
|
escobar&^%1&^%1475431401
|
||||||
amicabot&^%30&^%1481225205
|
amicabot&^%30&^%1481225205
|
||||||
caff&^%1022&^%1528745010
|
caff&^%1023&^%1532662853
|
||||||
kadin&^%5&^%1479870008
|
kadin&^%8&^%1537306549
|
||||||
desvox&^%5&^%1481632697
|
desvox&^%25&^%1537178981
|
||||||
mankins&^%3&^%1480211581
|
mankins&^%3&^%1480211581
|
||||||
cinch&^%2&^%1480454755
|
cinch&^%2&^%1480454755
|
||||||
caffbot&^%968&^%1528745018
|
caffbot&^%969&^%1532662872
|
||||||
evilbot&^%4&^%1480693919
|
evilbot&^%4&^%1480693919
|
||||||
tybaltcat&^%7&^%1481076625
|
tybaltcat&^%7&^%1481076625
|
||||||
minerbot&^%146&^%1520382015
|
minerbot&^%146&^%1520382015
|
||||||
mio&^%339&^%1506434277
|
mio&^%347&^%1529720473
|
||||||
archangel&^%464&^%1524447604
|
archangel&^%476&^%1537304671
|
||||||
tehfraga&^%263&^%1527511198
|
tehfraga&^%537&^%1537326808
|
||||||
sushi&^%10&^%1493253212
|
sushi&^%10&^%1493253212
|
||||||
troido&^%285&^%1529052063
|
troido&^%287&^%1533042798
|
||||||
gamebot&^%160&^%1529052049
|
gamebot&^%178&^%1533042867
|
||||||
nilaky&^%1152&^%1529028413
|
nilaky&^%1339&^%1537312079
|
||||||
bucket&^%103&^%1507931139
|
bucket&^%103&^%1507931139
|
||||||
lolbot&^%1&^%1502568407
|
lolbot&^%1&^%1502568407
|
||||||
m455&^%12&^%1512076715
|
m455&^%12&^%1512076715
|
||||||
|
@ -72,32 +72,32 @@ pinhook&^%8&^%1509744722
|
||||||
emfor&^%3&^%1509671353
|
emfor&^%3&^%1509671353
|
||||||
k2l8m11n2&^%11&^%1510932395
|
k2l8m11n2&^%11&^%1510932395
|
||||||
sacredpix&^%3&^%1522082931
|
sacredpix&^%3&^%1522082931
|
||||||
deltawitc&^%2018&^%1529022699
|
deltawitc&^%3045&^%1537372902
|
||||||
login&^%1147&^%1529054074
|
login&^%2076&^%1537359686
|
||||||
kelpiebot&^%3&^%1513101957
|
kelpiebot&^%3&^%1513101957
|
||||||
unreal&^%1&^%1514940020
|
unreal&^%2&^%1534387108
|
||||||
tildethie&^%3000&^%1521573658
|
tildethie&^%5040&^%1537374440
|
||||||
kinsey&^%26&^%1520446672
|
kinsey&^%26&^%1520446672
|
||||||
testgameb&^%2&^%1517405361
|
testgameb&^%2&^%1517405361
|
||||||
erin&^%2&^%1517681999
|
erin&^%2&^%1517681999
|
||||||
wuz&^%3&^%1518125300
|
wuz&^%3&^%1518125300
|
||||||
hashdang&^%4&^%1518666906
|
hashdang&^%4&^%1518666906
|
||||||
ubergeek&^%63&^%1526043601
|
ubergeek&^%63&^%1530410162
|
||||||
silver&^%9&^%1519333029
|
silver&^%9&^%1519333029
|
||||||
equa&^%47&^%1528124305
|
equa&^%53&^%1534373756
|
||||||
audiodude&^%2&^%1519453927
|
audiodude&^%2&^%1519453927
|
||||||
jumblesal&^%1&^%1519746512
|
jumblesal&^%1&^%1519746512
|
||||||
whimsy&^%45&^%1527777458
|
whimsy&^%47&^%1529678733
|
||||||
wangofett&^%100&^%1528482540
|
wangofett&^%179&^%1537310239
|
||||||
saturn597&^%3&^%1521429369
|
saturn597&^%3&^%1521429369
|
||||||
cwmccabe&^%2&^%1521598124
|
cwmccabe&^%2&^%1521598124
|
||||||
lucidiot&^%28&^%1526201925
|
lucidiot&^%28&^%1526201925
|
||||||
tracer&^%1&^%1521744878
|
tracer&^%1&^%1521744878
|
||||||
jan6&^%571&^%1529054825
|
jan6&^%1052&^%1536870225
|
||||||
jan&^%10&^%1522319160
|
jan&^%10&^%1522319160
|
||||||
etathetae&^%3&^%1522937843
|
etathetae&^%3&^%1522937843
|
||||||
eeeeeta&^%31&^%1527704747
|
eeeeeta&^%51&^%1535563434
|
||||||
cmccabe&^%66&^%1528506935
|
cmccabe&^%79&^%1529698164
|
||||||
jan6_test&^%7&^%1523252589
|
jan6_test&^%7&^%1523252589
|
||||||
jan6_&^%8&^%1523641589
|
jan6_&^%8&^%1523641589
|
||||||
carbon&^%9&^%1524135505
|
carbon&^%9&^%1524135505
|
||||||
|
@ -105,13 +105,31 @@ ne1&^%7&^%1524024485
|
||||||
Halian&^%32&^%1528360263
|
Halian&^%32&^%1528360263
|
||||||
lunasspec&^%4&^%1524164784
|
lunasspec&^%4&^%1524164784
|
||||||
bowlercap&^%3&^%1524165068
|
bowlercap&^%3&^%1524165068
|
||||||
littlebig&^%36&^%1529000570
|
littlebig&^%46&^%1535927253
|
||||||
severak&^%6&^%1528901245
|
severak&^%16&^%1533802439
|
||||||
ralph&^%4&^%1526980620
|
ralph&^%4&^%1526980620
|
||||||
benjaminw&^%80&^%1529074458
|
benjaminw&^%503&^%1537371492
|
||||||
von&^%120&^%1529074049
|
von&^%392&^%1537371528
|
||||||
ensis&^%164&^%1529072988
|
ensis&^%1507&^%1537370624
|
||||||
simon&^%26&^%1527937489
|
simon&^%26&^%1527937489
|
||||||
benharri&^%62&^%1529075403
|
benharri&^%1397&^%1536689051
|
||||||
cpb&^%3&^%1528930564
|
cpb&^%3&^%1528930564
|
||||||
calmbit&^%4&^%1529073811
|
calmbit&^%146&^%1537237248
|
||||||
|
wisebot&^%4466&^%1537376483
|
||||||
|
paannd_a&^%2&^%1529617165
|
||||||
|
nincollin&^%6&^%1531186900
|
||||||
|
x4464&^%1&^%1532028546
|
||||||
|
pounce&^%19&^%1532133325
|
||||||
|
von_&^%5&^%1532502104
|
||||||
|
livix&^%7&^%1533603142
|
||||||
|
ben&^%3&^%1533767627
|
||||||
|
npa&^%78&^%1536235183
|
||||||
|
ezo&^%6&^%1533883842
|
||||||
|
aliasless&^%30&^%1537198276
|
||||||
|
kirch&^%41&^%1535571833
|
||||||
|
root&^%2&^%1535558514
|
||||||
|
byte&^%5&^%1536416308
|
||||||
|
qbe&^%6&^%1537112151
|
||||||
|
informati&^%3&^%1536733938
|
||||||
|
h00fi&^%1&^%1537050053
|
||||||
|
fantoro&^%4&^%1537106482
|
||||||
|
|
|
@ -40,3 +40,8 @@
|
||||||
1522267660&^%jan&^%What is the last film you saw?
|
1522267660&^%jan&^%What is the last film you saw?
|
||||||
1522846620&^%krowbar&^%Have you ever had to wear a uniform to school?
|
1522846620&^%krowbar&^%Have you ever had to wear a uniform to school?
|
||||||
1523121085&^%jan6&^%no topics in the tropic
|
1523121085&^%jan6&^%no topics in the tropic
|
||||||
|
1534250166&^%krowbar&^%hello world
|
||||||
|
1534294757&^%deltawitc&^%All hail DeltaWitch the Bot Queen
|
||||||
|
1534300117&^%unreal&^%All hail DeltaWitch the Bot Queen and Unreal the Bot Monarch
|
||||||
|
1534300975&^%unreal&^%All hail DeltaWitch the Bot Queen and Unreal, Sovran of Bots
|
||||||
|
1534301504&^%deltawitc&^%All hail DeltaWitch the Bot Queen, and Unreal, Sovran of Bots
|
||||||
|
|
|
@ -250,3 +250,9 @@
|
||||||
1526577609&^%archangel&^%When you were in grade school, what did you want to be when you grew up? Why?
|
1526577609&^%archangel&^%When you were in grade school, what did you want to be when you grew up? Why?
|
||||||
1526842324&^%vilmibm&^%welcome, wave of new users <3
|
1526842324&^%vilmibm&^%welcome, wave of new users <3
|
||||||
1528317036&^%vilmibm&^%what are the feels?
|
1528317036&^%vilmibm&^%what are the feels?
|
||||||
|
1529602271&^%vilmibm&^%welcome to the town! we're glad you're here. | some other channels that you can /join: #projects (discuss cool stuff other townies have made), #bots (experiment or play with bots), #dumpsterfire (talk about heavy shit)
|
||||||
|
1533541086&^%vilmibm&^%<3
|
||||||
|
1533794911&^%vilmibm&^%if you'd like to be included in the package of memories we're sending to abraxas's family, please get your posts into the BBJ thread by 2018-08-09 19:00 UTC. <3
|
||||||
|
1534119128&^%vilmibm&^%<3 | for more about this chat, see https://tilde.town/wiki/irc.html or run `wiki get irc`
|
||||||
|
1534311634&^%vilmibm&^%welcome! to learn more about this chat, check out https://tilde.town/wiki/irc.html or run `wiki get irc`
|
||||||
|
1535572794&^%vilmibm&^%weechat has been updated! quit and run `chat` to get the new version if you want | to learn more about this chat, check out https://tilde.town/wiki/irc.html or run `wiki get irc`
|
||||||
|
|
|
@ -1,4 +1 @@
|
||||||
krowbar&^%6&^%2
|
vilmibm&^%0&^%2
|
||||||
jan&^%0&^%1vilmibm&^%0&^%1etathetae&^%1&^%0
|
|
||||||
etathetae&^%0&^%2
|
|
||||||
jan6&^%0&^%1vilmibm&^%0&^%1vilmibm&^%0&^%1vilmibm&^%0&^%1vilmibm&^%0&^%1vilmibm&^%0&^%1vilmibm&^%0&^%1archangel&^%0&^%1vilmibm&^%0&^%1vilmibm&^%0&^%1
|
|
||||||
|
|
|
@ -197,6 +197,7 @@ there
|
||||||
doing
|
doing
|
||||||
even
|
even
|
||||||
does
|
does
|
||||||
|
doesn
|
||||||
theres
|
theres
|
||||||
theyve
|
theyve
|
||||||
were
|
were
|
||||||
|
|
|
@ -6,7 +6,7 @@ DATE=`date -d yesterday +%b\ %Y`
|
||||||
OUT=/home/krowbar/logs/chatcloud${MONTH}.json
|
OUT=/home/krowbar/logs/chatcloud${MONTH}.json
|
||||||
DIR=/home/krowbar/public_html/data
|
DIR=/home/krowbar/public_html/data
|
||||||
PAGE=/home/krowbar/public_html/chatcloud/index.html
|
PAGE=/home/krowbar/public_html/chatcloud/index.html
|
||||||
LINE=7
|
LINE=16
|
||||||
|
|
||||||
/usr/bin/python /home/krowbar/Code/python/chatcloud2.py -timeend $END -timestart $START -outfile $OUT
|
/usr/bin/python /home/krowbar/Code/python/chatcloud2.py -timeend $END -timestart $START -outfile $OUT
|
||||||
ln -s $OUT $DIR
|
ln -s $OUT $DIR
|
||||||
|
|
|
@ -23,7 +23,7 @@ charset="utf-8"></script>-->
|
||||||
d = new Date(0);
|
d = new Date(0);
|
||||||
d.setUTCSeconds((Number(time) + threeDays) % oneWeek - threeDays);
|
d.setUTCSeconds((Number(time) + threeDays) % oneWeek - threeDays);
|
||||||
<!--data.push([user, d.toISOString().slice(11,16), d, d]);-->
|
<!--data.push([user, d.toISOString().slice(11,16), d, d]);-->
|
||||||
data.push([user, d, d]);
|
data.push([user, d, d]); <!-- User, Start, End, score -->
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
@ -54,13 +54,17 @@ charset="utf-8"></script>-->
|
||||||
|
|
||||||
function drawChart() {
|
function drawChart() {
|
||||||
var container = document.getElementById('timeline');
|
var container = document.getElementById('timeline');
|
||||||
|
console.log('container', container);
|
||||||
var chart = new google.visualization.Timeline(container);
|
var chart = new google.visualization.Timeline(container);
|
||||||
|
console.log('chart', chart);
|
||||||
var dataTable = new google.visualization.DataTable();
|
var dataTable = new google.visualization.DataTable();
|
||||||
|
console.log('dataTable', dataTable);
|
||||||
|
|
||||||
dataTable.addColumn({ type: 'string', id: 'User' });
|
dataTable.addColumn({ type: 'string', id: 'User' });
|
||||||
<!--dataTable.addColumn({ type: 'string', id: 'tooltip' });-->
|
<!--dataTable.addColumn({ type: 'string', id: 'tooltip' });-->
|
||||||
dataTable.addColumn({ type: 'date', id: 'Start' });
|
dataTable.addColumn({ type: 'date', id: 'Start' });
|
||||||
dataTable.addColumn({ type: 'date', id: 'End' });
|
dataTable.addColumn({ type: 'date', id: 'End' });
|
||||||
|
<!--dataTable.addColumn({ type: 'number', id: 'Score' });-->
|
||||||
dataTable.addRows(data);
|
dataTable.addRows(data);
|
||||||
|
|
||||||
chart.draw(dataTable);
|
chart.draw(dataTable);
|
||||||
|
|
|
@ -24,3 +24,8 @@ PRESENTATION
|
||||||
- See a timeline with colored strands of when they spoke and were mentioned
|
- See a timeline with colored strands of when they spoke and were mentioned
|
||||||
* Something that looks like the Github commit history
|
* Something that looks like the Github commit history
|
||||||
* Use D3 for coolness
|
* Use D3 for coolness
|
||||||
|
|
||||||
|
TODO
|
||||||
|
* Add a "sort by" dropdown
|
||||||
|
- name
|
||||||
|
- most active
|
||||||
|
|
|
@ -1,9 +1,21 @@
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<title>Tilde.town Chat Cloud</title>
|
||||||
|
<style>
|
||||||
|
body {
|
||||||
|
background-color: wheat;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
</head>
|
||||||
<meta charset="utf-8">
|
<meta charset="utf-8">
|
||||||
<body>
|
<body>
|
||||||
<div>
|
<div>
|
||||||
<select id="series">
|
<select id="series">
|
||||||
<option value="">Today</option>
|
<option value="">Today</option>
|
||||||
|
<option value="_2018_08">Aug 2018</option>
|
||||||
|
<option value="_2018_07">Jul 2018</option>
|
||||||
|
<option value="_2018_06">Jun 2018</option>
|
||||||
<option value="_2018_05">May 2018</option>
|
<option value="_2018_05">May 2018</option>
|
||||||
<option value="_2018_04">Apr 2018</option>
|
<option value="_2018_04">Apr 2018</option>
|
||||||
<option value="_2018_03">Mar 2018</option>
|
<option value="_2018_03">Mar 2018</option>
|
||||||
|
@ -61,6 +73,7 @@
|
||||||
onclick="getWords('/~krowbar/data/chatcloud' + document.getElementById('series').value + '.json',
|
onclick="getWords('/~krowbar/data/chatcloud' + document.getElementById('series').value + '.json',
|
||||||
document.getElementById('howMuch').value)"
|
document.getElementById('howMuch').value)"
|
||||||
>Generate Cloud</button>
|
>Generate Cloud</button>
|
||||||
|
<input type="checkbox" id="flat">Flat</input>
|
||||||
</div>
|
</div>
|
||||||
<div id="cloud"></div>
|
<div id="cloud"></div>
|
||||||
<script type="text/javascript" src="https://code.jquery.com/jquery-2.1.4.min.js"></script>
|
<script type="text/javascript" src="https://code.jquery.com/jquery-2.1.4.min.js"></script>
|
||||||
|
@ -105,7 +118,7 @@ jQuery.getJSON(source, function(json) {
|
||||||
.size([1200, 800])
|
.size([1200, 800])
|
||||||
.words(jsonWords)
|
.words(jsonWords)
|
||||||
.padding(3)
|
.padding(3)
|
||||||
.rotate(function() { return ~~(Math.random() * 2) * 90; })
|
.rotate(function() { return ~~(Math.random() * 2) * 90 * !document.getElementById('flat').checked; })
|
||||||
.font("Impact")
|
.font("Impact")
|
||||||
.fontSize(function(d) { return Math.sqrt(d.size) * 50 / maxSize + 6; })
|
.fontSize(function(d) { return Math.sqrt(d.size) * 50 / maxSize + 6; })
|
||||||
.on("end", draw);
|
.on("end", draw);
|
||||||
|
@ -136,4 +149,6 @@ draw = function(words) {
|
||||||
}
|
}
|
||||||
|
|
||||||
})();</script>
|
})();</script>
|
||||||
|
<a href="https://github.com/RussellChamp/tilde-projects/tree/master/Code/python">(see source)</a>
|
||||||
</body>
|
</body>
|
||||||
|
</html>
|
||||||
|
|
|
@ -1,6 +1,11 @@
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<title>Tilder Disk Usage</title>
|
<title>Tilder Disk Usage</title>
|
||||||
|
<style>
|
||||||
|
body {
|
||||||
|
background-color: wheat;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
</head>
|
</head>
|
||||||
<script type="text/javascript" src="https://code.jquery.com/jquery-2.1.4.min.js"></script>
|
<script type="text/javascript" src="https://code.jquery.com/jquery-2.1.4.min.js"></script>
|
||||||
<script type="text/javascript" src="https://www.google.com/jsapi"></script>
|
<script type="text/javascript" src="https://www.google.com/jsapi"></script>
|
||||||
|
@ -26,7 +31,8 @@
|
||||||
title: 'Tilder Disk Usage',
|
title: 'Tilder Disk Usage',
|
||||||
subtitle: 'in kb',
|
subtitle: 'in kb',
|
||||||
pieHole: 0.4,
|
pieHole: 0.4,
|
||||||
sliceVisibilityThreshold: 0.005
|
sliceVisibilityThreshold: 0.005,
|
||||||
|
backgroundColor: 'wheat'
|
||||||
};
|
};
|
||||||
var lineoptions = {
|
var lineoptions = {
|
||||||
title: 'Tilder Disk Usage',
|
title: 'Tilder Disk Usage',
|
||||||
|
@ -34,7 +40,8 @@
|
||||||
vAxis: {
|
vAxis: {
|
||||||
0: {title: 'kb'},
|
0: {title: 'kb'},
|
||||||
logScale: true
|
logScale: true
|
||||||
}
|
},
|
||||||
|
backgroundColor: 'wheat'
|
||||||
};
|
};
|
||||||
|
|
||||||
jQuery.getJSON("/~krowbar/data/du_log.json", function(json) {
|
jQuery.getJSON("/~krowbar/data/du_log.json", function(json) {
|
||||||
|
@ -116,4 +123,7 @@
|
||||||
<div id="donutchart" style="width: 700px; height: 400px;"></div>
|
<div id="donutchart" style="width: 700px; height: 400px;"></div>
|
||||||
<input id="onlyInteresting" type="checkbox" onClick="drawCharts()">Only Interesting Data</input>
|
<input id="onlyInteresting" type="checkbox" onClick="drawCharts()">Only Interesting Data</input>
|
||||||
<div id="linechart" style="width: 120%; height: 130%; margin-left: -10%"></div>
|
<div id="linechart" style="width: 120%; height: 130%; margin-left: -10%"></div>
|
||||||
|
<div>
|
||||||
|
<a href="https://github.com/RussellChamp/tilde-projects/tree/master/Code/bash">(see source)</a>
|
||||||
|
</div>
|
||||||
</body>
|
</body>
|
||||||
|
|
|
@ -1,28 +1,52 @@
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<title>~krowbar's home page</title>
|
<title>~krowbar's home page</title>
|
||||||
|
<style>
|
||||||
|
body {
|
||||||
|
background-color: #f7a716a6;
|
||||||
|
}
|
||||||
|
g {
|
||||||
|
background-color: white;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
Links and stuff
|
<h1>~krowbar's home page</h1>
|
||||||
<ul>
|
<h2>Links and stuff</h2>
|
||||||
<li><a href="mc/">Minecraft</a></li>
|
<div>
|
||||||
<li><a href="chatchecker/">Tilde.town IRC Chat checker</a></li>
|
<ul>
|
||||||
<li><a href="chatstats/">IRC User Chat Statistics</a></li>
|
<li><a href="mc/">Minecraft</a></li>
|
||||||
<li><a href="besties/">IRC Chat Bestie Nodes</a></li>
|
<li><a href="chatchecker/">Tilde.town IRC Chat checker</a></li>
|
||||||
<li><a href="circle/">IRC Chat Bestie Circle</a></li>
|
<li><a href="chatstats/">IRC User Chat Statistics</a></li>
|
||||||
<li><a href="twine2/">Twine 2.0</a></li>
|
<li><a href="besties/">IRC Chat Bestie Nodes</a></li>
|
||||||
<li><a href="grimoire/app/">Grimoire: The Pathfinder Item Roller</a></li>
|
<li><a href="circle/">IRC Chat Bestie Circle</a></li>
|
||||||
<li><a href="https://github.com/RussellChamp/PragmaticDiceBag">Pragmatic Dice Bag: Artsy fartsy guide!</a></li>
|
<li><a href="twine2/">Twine 2.0</a></li>
|
||||||
<li><a href="limericks/">Dumb Limericks</a></li>
|
<li><a href="grimoire/app/">Grimoire: The Pathfinder Item Roller</a></li>
|
||||||
<li><a href="rainycoffee/">Rainy Mood + Dark Coffee</a></li>
|
<li><a href="https://github.com/RussellChamp/PragmaticDiceBag">Pragmatic Dice Bag: Artsy fartsy guide!</a></li>
|
||||||
</ul>
|
<li><a href="limericks/">Dumb Limericks</a></li>
|
||||||
|
<li><a href="rainycoffee/">Rainy Mood + Dark Coffee</a></li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
|
||||||
<h2><a href="chatcloud/">Tilde.town IRC Chat cloud</a></h2>
|
<h2><a href="chatcloud/">Tilde.town IRC Chat cloud</a></h2>
|
||||||
<iframe width=1200 height=800 frameborder=0 scrolling="no" src="chatcloud/"></iframe>
|
<iframe width=1200 height=900 frameborder=0 scrolling="no" src="chatcloud/"></iframe>
|
||||||
|
|
||||||
<h2><a href="mission/">Mission name generator</a></h2>
|
<h2><a href="mission/">Mission name generator</a></h2>
|
||||||
<iframe width=1200 height=200 frameborder=0 scrolling="no" src="mission/"></iframe>
|
<iframe width=1200 height=100 frameborder=0 scrolling="no" src="mission/"></iframe>
|
||||||
|
|
||||||
<h2><a href="du/">Tilde.town disk usage</a></h2>
|
<h2><a href="du/">Tilde.town disk usage</a></h2>
|
||||||
<iframe width=1200 height=1200 frameborder=0 scrolling="no" src="du/"></iframe>
|
<iframe width=1200 height=1200 frameborder=0 scrolling="no" src="du/"></iframe>
|
||||||
|
|
||||||
|
<h2>A poem on build infrastructure</h2>
|
||||||
|
<div>
|
||||||
|
<pre>
|
||||||
|
The bi-weekly march to prod /
|
||||||
|
It has 10,000 steps /
|
||||||
|
We spin up servers with daily build jobs then we knock them down again!
|
||||||
|
|
||||||
|
And sometimes CI's up /
|
||||||
|
And sometimes DEMO's down /
|
||||||
|
But when they're only half-way up they're neither up nor down!
|
||||||
|
</pre>
|
||||||
|
</div>
|
||||||
</body>
|
</body>
|
||||||
|
|
|
@ -1,6 +1,11 @@
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<title>Secret Mission Name Generator</title>
|
<title>Secret Mission Name Generator</title>
|
||||||
|
<style>
|
||||||
|
body {
|
||||||
|
background-color: wheat;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.2.0/angular.min.js"></script>
|
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.2.0/angular.min.js"></script>
|
||||||
<script src="./js/lodash.js"></script>
|
<script src="./js/lodash.js"></script>
|
||||||
<script src="./js/mission.js"></script>
|
<script src="./js/mission.js"></script>
|
||||||
|
|
Loading…
Reference in New Issue