Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
02110-1301 USA
*/
+#include <libintl.h>
+#define _(String) gettext (String)
#include <getopt.h>
#include <stdlib.h>
{"output-dir", required_argument, 0, 'o'},
{"debug", no_argument, 0, 'd'},
{"status", required_argument, 0, 's'},
+ {"skip-js-css", no_argument, 0, 'S'},
{0, 0, 0, 0}
};
static void print_version()
{
printf("ppastats %s\n", VERSION);
- printf("Copyright (C) %s jeanfi@gmail.com\n\
+ printf(_("Copyright (C) %s jeanfi@gmail.com\n\
License GPLv2: GNU GPL version 2 or later \
<http://www.gnu.org/licenses/old-licenses/gpl-2.0.html>\n\
This is free software: you are free to change and redistribute it.\n\
-There is NO WARRANTY, to the extent permitted by law.\n",
- "2010-2011");
+There is NO WARRANTY, to the extent permitted by law.\n"),
+ "2011-2012");
}
static void print_help()
{
- printf("Usage: %s [OPTION]... PPA_OWNER PPA_NAME\n", program_name);
+ printf(_("Usage: %s [OPTION]... PPA_OWNER PPA_NAME\n"), program_name);
puts("ppastats is a command application"
" for generating PPA statistics.\n");
"or generates an HTML page containing a graph representation.");
puts("");
- puts("Options:");
- puts("\
+ puts(_("Options:"));
+ puts(_("\
-h, --help display this help and exit\n\
- -v, --version display version information and exit");
+ -v, --version display version information and exit"));
puts("");
(possible values are: Pending, Published, \n\
Superseded, Deleted or Obsolete).");
+ puts("\
+ -S, --skip-js-css skip installation of js and css files");
puts("");
printf("Report bugs to: %s\n", PACKAGE_BUGREPORT);
char *package_status = NULL;
int cmdok = 1;
char *output_dir = NULL;
+ int install_static_files = 1;
program_name = argv[0];
- while ((optc = getopt_long(argc, argv, "vho:ds:", long_options,
+ setlocale(LC_ALL, "");
+ bindtextdomain(PACKAGE, LOCALEDIR);
+ textdomain(PACKAGE);
+
+ while ((optc = getopt_long(argc, argv, "vho:ds:S", long_options,
NULL)) != -1) {
switch (optc) {
case 'o':
if (optarg)
package_status = strdup(optarg);
break;
+ case 'S':
+ install_static_files = 0;
+ break;
default:
cmdok = 0;
break;
ppa = argv[optind+1];
if (output_html)
- ppa_to_html(owner, ppa, package_status, output_dir);
+ ppa_to_html(owner, ppa, package_status, output_dir,
+ install_static_files);
else
display_published_binaries(owner, ppa, package_status);