feedwarrior

Slim, portable tooling for creating and distributing decentralized append logs
git clone git://git.defalsify.org/logwarrior.git
Log | Files | Refs | README | LICENSE

commit e65ffcda46080c637bcebeb42526911b12f8c5c7
parent 0a56d0b4213081b4713df0cfdfcad0cff89e2430
Author: nolash <dev@holbrook.no>
Date:   Tue, 30 Jun 2020 21:02:05 +0200

Include all inline text content in output

Diffstat:
MCHANGELOG | 2++
MVERSION | 2+-
Mfeedwarrior/cmd/show.py | 11+++++++----
Msetup.py | 2+-
4 files changed, 11 insertions(+), 6 deletions(-)

diff --git a/CHANGELOG b/CHANGELOG @@ -1,3 +1,5 @@ +* 0.2.2 + - Add all inline text content to output in show cmd * 0.2.1 - Fix non-committed headers flag * 0.2.0 diff --git a/VERSION b/VERSION @@ -1 +1 @@ -0.2.1 +0.2.2 diff --git a/feedwarrior/cmd/show.py b/feedwarrior/cmd/show.py @@ -24,7 +24,7 @@ def execute(config, feed, args): t = int(time.mktime(tf)) tl = time.localtime(t) ts = time.strftime('%x %X', tl) - body = None + body = '' attachments = [] ii = 0 for p in m.walk(): @@ -35,8 +35,11 @@ def execute(config, feed, args): if 'attachment' in p.get_content_disposition(): attachments.append('{} ({})'.format(p.get_filename(), p.get_content_type())) elif p.get_content_maintype() == 'text': - if p.get_filename() == '_content' or body == None: - body = p.get_payload(decode=True).decode('utf-8') + subject = p.get('Subject') + if subject == None: + subject = p.get_filename() + #if p.get_filename() == '_content' or body == None: + body += '>>> {}\n\n{}\n\n\n'.format(subject, p.get_payload(decode=True).decode('utf-8')) if i > 0: print('----') @@ -45,7 +48,7 @@ def execute(config, feed, args): if args.headers: for k in m.keys(): print('{}: {}'.format(k, m.get(k))) - print('{} - {}'.format(ts, j['uuid'])) + print('{} - {}\n'.format(ts, j['uuid'])) print(body) for a in attachments: print('+ {}'.format(a)) diff --git a/setup.py b/setup.py @@ -2,7 +2,7 @@ from setuptools import setup setup( name='feedwarrior', - version='0.2.1', + version='0.2.2', description='feeds, warrior style', author='Louis Holbrook', author_email='dev@holbrook.no',