File tree Expand file tree Collapse file tree 1 file changed +8
-10
lines changed Expand file tree Collapse file tree 1 file changed +8
-10
lines changed Original file line number Diff line number Diff line change @@ -92,8 +92,14 @@ def main():
92
92
show_field = "show_" + field
93
93
if argsd .get (show_field , None ):
94
94
if row [field ]:
95
- if z and field in zettel .ZettelFields :
96
- if field not in zettel .ZettelExtraFields :
95
+ if z :
96
+ # TODO: Think more carefully about special fields.
97
+ # Need to refactor this code to make it cleaner
98
+ if field == 'document' :
99
+ continue
100
+ if field == 'filename' :
101
+ this_result_output .append ('filename: %s' % row ['filename' ])
102
+ elif field in zettel .ZettelFields :
97
103
this_result_output .append (z .get_yaml ([field ]).rstrip ())
98
104
else :
99
105
this_result_output .append ("%s:" % field )
@@ -112,14 +118,6 @@ def main():
112
118
print (row ['document' ])
113
119
print ()
114
120
115
- # TODO eliminate this duplication later. document/filename are the only special fields
116
- if argsd .get ("show_filename" ):
117
- filename = row ['filename' ]
118
- if len (filename ) > 0 :
119
- print (row ['filename' ])
120
- print ()
121
-
122
-
123
121
if args .count :
124
122
print ("%d Zettels matched search" % search_count )
125
123
You can’t perform that action at this time.
0 commit comments