use actual bash
parent
ffa9955ce4
commit
eebbe9ac22
|
@ -5,7 +5,7 @@ author: paulwalko <paul@walko.org>
|
||||||
"""
|
"""
|
||||||
|
|
||||||
from threading import Thread
|
from threading import Thread
|
||||||
import os, sqlite3, time
|
import os, sqlite3, time, web
|
||||||
|
|
||||||
queue = []
|
queue = []
|
||||||
|
|
||||||
|
@ -123,22 +123,15 @@ def bash(phenny, input):
|
||||||
final_lines.append(line[0])
|
final_lines.append(line[0])
|
||||||
final_lines = ''.join(final_lines)
|
final_lines = ''.join(final_lines)
|
||||||
|
|
||||||
"""Write quotes to file"""
|
|
||||||
files = os.listdir(phenny.bash_quotes_path)
|
|
||||||
files_num = [0]
|
|
||||||
new_file = '1.txt'
|
|
||||||
for f in files:
|
|
||||||
f = f.strip('.txt')
|
|
||||||
if f.isdigit():
|
|
||||||
files_num.append(int(f))
|
|
||||||
|
|
||||||
new_file = str(max(files_num) + 1) + '.txt'
|
quote_json = {
|
||||||
new_path = os.path.join(phenny.bash_quotes_path, new_file)
|
'body': final_lines,
|
||||||
with open(new_path, 'w') as f:
|
'tags': '',
|
||||||
f.write(final_lines)
|
'key': "SUPERSECRETAPIKEY"
|
||||||
f.close()
|
}
|
||||||
|
web.post('https://bash.vtluug.org/quotes', quote_json)
|
||||||
|
|
||||||
phenny.say('%s: Check bash.walko.org to see your quote' % (input.nick))
|
phenny.say('Check https://bash.vtluug.org/quotes to see your quote!')
|
||||||
|
|
||||||
def logger(phenny, input):
|
def logger(phenny, input):
|
||||||
"""logs EVERYTHING"""
|
"""logs EVERYTHING"""
|
||||||
|
|
Loading…
Reference in New Issue