2015-05-26 09:21:44 -04:00
|
|
|
#!/usr/bin/python
|
|
|
|
# Copyright 2015 (c) Anna Schumaker.
|
2015-05-26 09:44:17 -04:00
|
|
|
|
2015-05-26 14:44:59 -04:00
|
|
|
import slack
|
2015-05-26 09:21:44 -04:00
|
|
|
|
|
|
|
|
2015-05-26 15:20:12 -04:00
|
|
|
for channel in slack.channels.list():
|
|
|
|
if not channel.is_member():
|
|
|
|
continue
|
2015-05-26 15:38:47 -04:00
|
|
|
if channel.unread_count() == 0 or channel.unread_count() == None:
|
|
|
|
continue
|
2015-05-26 16:42:12 -04:00
|
|
|
|
|
|
|
text = [ str(channel) ] + [ "" ]
|
2015-05-26 16:22:05 -04:00
|
|
|
for message in channel.read():
|
2015-05-26 16:42:12 -04:00
|
|
|
text += [ str(message) ]
|
2015-05-26 16:00:11 -04:00
|
|
|
|
2015-05-26 16:42:12 -04:00
|
|
|
print("\n".join(text))
|
|
|
|
print()
|