Put channel id on same line as "Reply above this line"
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
This commit is contained in:
parent
65e5403165
commit
1bc6d1064f
|
@ -4,9 +4,12 @@
|
||||||
import slack
|
import slack
|
||||||
import smtplib
|
import smtplib
|
||||||
from email.mime.text import MIMEText
|
from email.mime.text import MIMEText
|
||||||
|
import textwrap
|
||||||
|
|
||||||
|
|
||||||
s = smtplib.SMTP("localhost")
|
s = smtplib.SMTP("localhost")
|
||||||
|
repl = "--- Reply above this line ---".ljust(40)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
for channel in slack.channels.list():
|
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:
|
if channel.unread_count() == 0 or channel.unread_count() == None:
|
||||||
continue
|
continue
|
||||||
|
|
||||||
text = [ str(channel) ] + [ "" ]
|
chan = ("channel=%s" % channel.id()).rjust(40)
|
||||||
|
text = [ "", "%s%s" % (repl, chan), ""]
|
||||||
|
text += [ str(channel) ] + [ "" ]
|
||||||
for message in channel.read():
|
for message in channel.read():
|
||||||
text += [ str(message) ]
|
text += [ str(message) ]
|
||||||
|
|
||||||
text += [ "", "--- Reply above this line ---", "channel=%s" % channel.id() ]
|
|
||||||
print("\n".join(text))
|
print("\n".join(text))
|
||||||
print()
|
print()
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue