Skip to content

Commit

Permalink
Fixed --itemlist in --fts
Browse files Browse the repository at this point in the history
  • Loading branch information
jake authored and jake committed Jan 6, 2023
1 parent 68f55e2 commit 98dd225
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion internetarchive/cli/ia_search.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,10 @@ def main(argv, session: ArchiveSession | None = None) -> None:

for result in search:
if args['--itemlist']:
print(result.get('identifier', ''))
if args['--fts'] or args['--dsl-fts']:
print('\n'.join(result.get('fields', dict()).get('identifier')))
else:
print(result.get('identifier', ''))
else:
j = json.dumps(result)
print(j)
Expand Down

0 comments on commit 98dd225

Please sign in to comment.