Commit e1f65e1f authored by Lucas Nussbaum's avatar Lucas Nussbaum

Add --quiet option. Contributes to fixing #720981.

parent 6ffa7601
......@@ -30,6 +30,7 @@ SEEN_LOCAL = "#{DATADIR}/seen.json"
include Debian
$quiet = false
$all = false
$root = (Process.euid == 0)
......@@ -42,6 +43,11 @@ optparse = OptionParser.new do |opts|
opts.on('-a', '--all', 'show all opportunities for contribution') do
$all = true
end
opts.on('-q', '--quiet', 'do not display header and footer') do
$quiet = true
end
end
optparse.parse!
......@@ -103,7 +109,9 @@ helpitems.each do |hi|
end
end
puts "====== How can you help? (doc: http://wiki.debian.org/how-can-i-help ) ======"
unless $quiet
puts "====== How can you help? (doc: http://wiki.debian.org/how-can-i-help ) ======"
end
wnpp = helpitems_filtered.select { |e| e['type'] == 'wnpp' }
gift = helpitems_filtered.select { |e| e['type'] == 'gift' }
......@@ -127,7 +135,7 @@ if gift.length > 0
end
end
if not $all
if not $all and not $quiet
puts "------ Show all opportunities, not just new ones: how-can-i-help --all ------"
end
......
how-can-i-help (0.6) unstable; urgency=low
* Add --quiet option. Contributes to fixing #720981.
-- Lucas Nussbaum <lucas@debian.org> Thu, 12 Sep 2013 09:03:27 +0200
how-can-i-help (0.5) unstable; urgency=low
[ Paul Wise ]
* Correct the comment in the apt configuration file
[ Lucas Nussbaum ]
* Upload to unstable.
-- Lucas Nussbaum <lucas@debian.org> Thu, 12 Sep 2013 08:18:17 +0200
......
......@@ -2,12 +2,12 @@
.\" Title: how-can-i-help
.\" Author: [see the "AUTHOR" section]
.\" Generator: DocBook XSL Stylesheets v1.78.1 <http://docbook.sf.net/>
.\" Date: 08/26/2013
.\" Date: 09/12/2013
.\" Manual: \ \&
.\" Source: \ \&
.\" Language: English
.\"
.TH "HOW\-CAN\-I\-HELP" "1" "08/26/2013" "\ \&" "\ \&"
.TH "HOW\-CAN\-I\-HELP" "1" "09/12/2013" "\ \&" "\ \&"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
......@@ -31,7 +31,7 @@
how-can-i-help \- show opportunities for contributing to Debian
.SH "SYNOPSIS"
.sp
\fBhow\-can\-i\-help\fR [\fI\-ah\fR] [\fI\-\-help\fR] [\fI\-\-all\fR]
\fBhow\-can\-i\-help\fR [\fI\-ahq\fR] [\fI\-\-help\fR] [\fI\-\-all\fR] [\fI\-\-quiet\fR]
.SH "DESCRIPTION"
.sp
\fBhow\-can\-i\-help\fR hooks into APT to list opportunities for contributions to Debian (orphaned packages, bugs tagged \fIgift\fR) for packages installed locally, after each APT invocation\&. It can also be invoked directly, and then lists all opportunities for contribution (not just the new ones)\&.
......@@ -46,7 +46,12 @@ Show some help\&.
.PP
\fB\-a\fR, \fB\-\-all\fR
.RS 4
Show all opportunities for contribution\&.
Show all opportunities for contribution\&. *
.RE
.PP
\fB\-q\fR, \fB\-\-quiet\fR
.RS 4
Do not display header and footer\&.
.RE
.SH "SEE ALSO"
.sp
......
......@@ -8,7 +8,7 @@ how-can-i-help - show opportunities for contributing to Debian
SYNOPSIS
--------
*how-can-i-help* ['-ah'] ['--help'] ['--all']
*how-can-i-help* ['-ahq'] ['--help'] ['--all'] ['--quiet']
DESCRIPTION
-----------
......@@ -26,6 +26,9 @@ Options must come before the other command line arguments.
*-a*, *--all*::
Show all opportunities for contribution.
*
*-q*, *--quiet*::
Do not display header and footer.
SEE ALSO
--------
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment