export_all works
This commit is contained in:
parent
78fe6e38f8
commit
c06b4e07fe
1 changed files with 15 additions and 2 deletions
|
|
@ -34,7 +34,6 @@ class MessageFormatter(IFormatter):
|
||||||
pass
|
pass
|
||||||
|
|
||||||
def format_dict(self, item):
|
def format_dict(self, item):
|
||||||
print self.outfile
|
|
||||||
result = u'%sTitle:%s %s\n' % (self.BOLD,
|
result = u'%sTitle:%s %s\n' % (self.BOLD,
|
||||||
self.NC, item['title'])
|
self.NC, item['title'])
|
||||||
result += u'%sDate:%s %s\n' % (self.BOLD,
|
result += u'%sDate:%s %s\n' % (self.BOLD,
|
||||||
|
|
@ -157,7 +156,8 @@ class Boobmsg(ReplApplication):
|
||||||
}
|
}
|
||||||
COMMANDS_FORMATTERS = {'list': 'msglist',
|
COMMANDS_FORMATTERS = {'list': 'msglist',
|
||||||
'show': 'msg',
|
'show': 'msg',
|
||||||
'export_thread': 'msg'
|
'export_thread': 'msg',
|
||||||
|
'export_all': 'msg'
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -291,6 +291,19 @@ class Boobmsg(ReplApplication):
|
||||||
self.format(thread)
|
self.format(thread)
|
||||||
self.flush()
|
self.flush()
|
||||||
|
|
||||||
|
def do_export_all(self, arg):
|
||||||
|
"""
|
||||||
|
export_all
|
||||||
|
|
||||||
|
Export All threads
|
||||||
|
"""
|
||||||
|
|
||||||
|
cmd = self.do('iter_threads')
|
||||||
|
for backend, thread in cmd:
|
||||||
|
t = backend.get_thread(thread.id)
|
||||||
|
for msg in t.iter_all_messages():
|
||||||
|
self.format(msg)
|
||||||
|
|
||||||
def do_export_thread(self, arg):
|
def do_export_thread(self, arg):
|
||||||
"""
|
"""
|
||||||
export_thread
|
export_thread
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue