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 c156e5afa09267e2162549ff9babc60e97ba6b02
parent 33edd1540030bbebec7c4d17d8664e2f9dcceec9
Author: nolash <dev@holbrook.no>
Date:   Mon, 29 Jun 2020 23:56:54 +0200

Add raw flag to output mime headers

Diffstat:
MCHANGELOG | 1+
Mfeedwarrior/cmd/show.py | 6+++++-
Mscripts/feedwarrior | 1+
3 files changed, 7 insertions(+), 1 deletion(-)

diff --git a/CHANGELOG b/CHANGELOG @@ -1,6 +1,7 @@ * 0.1.3 - Add multiple hashers for each entry - Fix bug in config handler that prevents handling of config filenames passed to it + - Fix opinionated arg flags before or after subcommand * 0.1.2 - Add simple, readable feed summary - Correct binary script name in setup.py diff --git a/feedwarrior/cmd/show.py b/feedwarrior/cmd/show.py @@ -9,6 +9,8 @@ def parse_args(argparser): def check_args(args): pass +# TODO: this should call a render method of the entry instead of +# dictating how the display format should be def execute(config, feed, args): i = 0 while 1: @@ -39,8 +41,10 @@ def execute(config, feed, args): if i > 0: print('----') - if body != None: + if args.r: + for k in m.keys(): + print('{}: {}'.format(k, m.get(k))) print('{} - {}'.format(ts, j['uuid'])) print(body) for a in attachments: diff --git a/scripts/feedwarrior b/scripts/feedwarrior @@ -26,6 +26,7 @@ argparser = argparse.ArgumentParser(description='create and manipulate feedwarri argparser.add_argument('-l', help='feed log to operate on') argparser.add_argument('-c', type=str, help='configuration file') argparser.add_argument('-v', action='store_true', help='be verbose') +argparser.add_argument('-r', action='store_true', help='raw feed output') sub = argparser.add_subparsers() # TODO: add subparser to same level flags as main parser sub.dest = 'command'