Put channel id on same line as "Reply above this line"

Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
This commit is contained in:
Anna Schumaker 2015-05-28 14:05:27 -04:00
parent 65e5403165
commit 1bc6d1064f
1 changed files with 6 additions and 2 deletions

View File

@ -4,9 +4,12 @@
import slack
import smtplib
from email.mime.text import MIMEText
import textwrap
s = smtplib.SMTP("localhost")
repl = "--- Reply above this line ---".ljust(40)
for channel in slack.channels.list():
@ -15,11 +18,12 @@ for channel in slack.channels.list():
if channel.unread_count() == 0 or channel.unread_count() == None:
continue
text = [ str(channel) ] + [ "" ]
chan = ("channel=%s" % channel.id()).rjust(40)
text = [ "", "%s%s" % (repl, chan), ""]
text += [ str(channel) ] + [ "" ]
for message in channel.read():
text += [ str(message) ]
text += [ "", "--- Reply above this line ---", "channel=%s" % channel.id() ]
print("\n".join(text))
print()