Skip to content

Commit 70d6033

Browse files
author
George K. Thiruvathukal
committed
add --show-all option (resolves #30)
1 parent c82529a commit 70d6033

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

zettelgeist/zfind.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,10 @@ def get_argparse():
1515
action='store_const', const=True, default=False,
1616
help="include field <%s> in output" % field)
1717

18+
parser.add_argument('--show-all',
19+
action='store_const', const=True, default=False,
20+
help="include all fields in output")
21+
1822
parser.add_argument('--publish', help="use template to publish zfind output (suppresses all --show-FIELD)", default=None)
1923

2024
parser.add_argument('--publish-conf', help="use publish configuration file to format special fields", default=None)
@@ -117,7 +121,7 @@ def main():
117121
this_result_output = []
118122
for field in row.keys():
119123
show_field = 'show_' + field
120-
if argsd.get(show_field, None):
124+
if argsd.get(show_field, None) or argsd.get('show_all'):
121125
if field == 'filename':
122126
filename_yaml = yaml.dump({ 'filename' : row['filename']})
123127
this_result_output.append(filename_yaml.rstrip())

0 commit comments

Comments
 (0)