mirror of
https://github.com/openSUSE/osc.git
synced 2024-12-26 01:46:13 +01:00
osc search can now output CSV
This commit is contained in:
parent
1f76cd0c19
commit
e12100fc48
2
NEWS
2
NEWS
@ -15,7 +15,7 @@
|
||||
- osc can now store credentials in Gnome keyring if it is available
|
||||
- new support for osc linkpac to specify cicount attribute
|
||||
- new log/rlog output formats (CSV and XML)
|
||||
- new jobhistory/buildhistory output format (CSV)
|
||||
- new jobhistory/buildhistory/search output format (CSV)
|
||||
- new option to fetch buildlogs starting at given offset
|
||||
- new option for copypac
|
||||
* -r to specify source revision
|
||||
|
@ -2548,6 +2548,8 @@ Please submit there instead, or use --nodevelproject to force direct submission.
|
||||
help='show more information')
|
||||
@cmdln.option('-i', '--involved', action='store_true',
|
||||
help='show projects/packages where given person is involved')
|
||||
@cmdln.option('--csv', action='store_true',
|
||||
help='generate output in CSV (separated by |)')
|
||||
def do_search(self, subcmd, opts, *args):
|
||||
"""${cmd_name}: Search for a project and/or package.
|
||||
|
||||
@ -2604,10 +2606,11 @@ Please submit there instead, or use --nodevelproject to force direct submission.
|
||||
headline.append('# Title')
|
||||
if opts.repos_baseurl:
|
||||
headline.append('# URL')
|
||||
if len(search_for) > 1:
|
||||
print '#' * 68
|
||||
print 'matches for \'%s\' in %ss:\n' % (search_term, kind)
|
||||
for row in build_table(len(headline), result, headline, 2):
|
||||
if not opts.csv:
|
||||
if len(search_for) > 1:
|
||||
print '#' * 68
|
||||
print 'matches for \'%s\' in %ss:\n' % (search_term, kind)
|
||||
for row in build_table(len(headline), result, headline, 2, csv = opts.csv):
|
||||
print row
|
||||
else:
|
||||
print 'No matches found for \'%s\' in %ss' % (search_term, kind)
|
||||
|
Loading…
Reference in New Issue
Block a user