Skip to content

Commit 59c4c73

Browse files
author
George K. Thiruvathukal
committed
another update for filename - not bumping release
1 parent b5b4160 commit 59c4c73

File tree

1 file changed

+13
-13
lines changed

1 file changed

+13
-13
lines changed

zettelgeist/zfind.py

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -98,19 +98,19 @@ def main():
9898
# Handle output of YAML here
9999
this_result_output = []
100100
for field in row.keys():
101-
show_field = "show_" + field
102-
if show_field == 'show_filename':
103-
filename_yaml = yaml.dump({ 'filename' : row['filename']})
104-
this_result_output.append(filename_yaml.rstrip())
105-
elif show_field == 'show_document':
106-
continue
107-
elif argsd.get(show_field, None):
108-
if row[field]:
109-
if z:
110-
this_result_output.append(z.get_yaml([field]).rstrip())
111-
else:
112-
this_result_output.append("%s:" % field)
113-
this_result_output.append(row[field])
101+
show_field = 'show_' + field
102+
if argsd.get(show_field, None):
103+
if field == 'filename':
104+
filename_yaml = yaml.dump({ 'filename' : row['filename']})
105+
this_result_output.append(filename_yaml.rstrip())
106+
elif field == 'document':
107+
continue
108+
elif row[field]:
109+
if z:
110+
this_result_output.append(z.get_yaml([field]).rstrip())
111+
else:
112+
this_result_output.append("%s:" % field)
113+
this_result_output.append(row[field])
114114

115115
# No output if just --- and ---
116116
if len(this_result_output) > 0:

0 commit comments

Comments
 (0)