removed these for now
This commit is contained in:
parent
0719e86c5a
commit
07af40215b
3 changed files with 0 additions and 83 deletions
|
@ -1,35 +0,0 @@
|
|||
# Colors. Plugin by blha303, color/control id info from http://stackoverflow.com/a/13382032
|
||||
|
||||
colors = {'white': '0', 'black': '1', 'darkblue': '2', 'darkgreen': '3',
|
||||
'red': '4', 'darkred': '5', 'darkviolet': '6', 'orange': '7',
|
||||
'yellow': '8', 'lightgreen': '9', 'cyan': '10', 'lightcyan': '11',
|
||||
'blue': '12', 'violet': '13', 'darkgray': '14', 'lightgray': '15'}
|
||||
|
||||
control = {'bold': '\x02', 'color': '\x03', 'italic': '\x09',
|
||||
'strikethrough': '\x13', 'reset': '\x0f', 'underline': '\x15',
|
||||
'underline2': '\x1f', 'reverse': '\x16'}
|
||||
|
||||
|
||||
def color(color):
|
||||
return control['color'] + colors[color]
|
||||
|
||||
def bold():
|
||||
return control['bold']
|
||||
|
||||
def italic():
|
||||
return control['italic']
|
||||
|
||||
def strike():
|
||||
return control['strikethrough']
|
||||
|
||||
def reset():
|
||||
return control['reset']
|
||||
|
||||
def underline(other=False):
|
||||
if other:
|
||||
return control['underline2']
|
||||
else:
|
||||
return control['underline']
|
||||
|
||||
def reverse():
|
||||
return control['reverse']
|
|
@ -1,34 +0,0 @@
|
|||
def raw(format_string):
|
||||
"""Replace based irc formatting"""
|
||||
stuff = {}
|
||||
stuff['col'] = {'[white]':'\x030',
|
||||
'[black]':'\x031',
|
||||
'[dblue]':'\x032',
|
||||
'[dgreen]':'\x033',
|
||||
'[dred]':'\x034',
|
||||
'[brown]':'\x035',
|
||||
'[purple]':'\x036',
|
||||
'[gold]':'\x037',
|
||||
'[yellow]':'\x038',
|
||||
'[green]':'\x039',
|
||||
'[cyan]':'\x0310',
|
||||
'[lblue]':'\x0311',
|
||||
'[blue]':'\x0312',
|
||||
'[pink]':'\x0313',
|
||||
'[gray]':'\x0314',
|
||||
'[lgray]':'\x0315',
|
||||
'[err]':'\x034\x02'
|
||||
'[/err]':'\x030\x02'}
|
||||
stuff['style'] = {'[b]':'\x02',
|
||||
'[clear]':'\x0f'}
|
||||
stuff['sym'] = {'[point]':'\x07'}
|
||||
stuff['text'] = {'[url]':'http://'}
|
||||
final = {}
|
||||
for x in stuff:
|
||||
final.update(stuff[x])
|
||||
for x in final:
|
||||
format_string = format_string.replace(x,final[x])
|
||||
return format_string
|
||||
def err(format_string):
|
||||
"""Format the string with standard error styling"""
|
||||
return "\x034\x02{}\x0f".format(format_string)
|
|
@ -1,14 +0,0 @@
|
|||
def timeformat(seconds):
|
||||
days = seconds / 86400
|
||||
seconds -= 86400 * days
|
||||
hours = seconds / 3600
|
||||
seconds -= 3600 * hours
|
||||
minutes = seconds / 60
|
||||
seconds -= 60 * minutes
|
||||
if days != 0:
|
||||
return "%sd %sh %sm %ss" % (days, hours, minutes, seconds)
|
||||
elif hours == 0 and minutes != 0:
|
||||
return "%sm %ss" % (minutes, seconds)
|
||||
elif hours == 0 and minutes == 0:
|
||||
return "%ss" % seconds
|
||||
return "%sh %sm %ss" % (hours, minutes, seconds)
|
Reference in a new issue