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