Fixed patch: indentation and empty line in the cmd help.
** Don't generate manpage if help2man not present.
** Generate html page for the PPA.
** Renamed --output_dir option to --output-dir.
+** Added -S option (patch submitted by Lekensteyn).
* v0.0.3
** Generated HTML pages for package versions.
ppa_to_html(const char *owner,
const char *ppa,
const char *package_status,
- const char *output_dir)
+ const char *output_dir,
+ const int install_static_files)
{
struct ppa_stats *ppastats;
struct daily_download_total **totals;
DEFAULT_WWW_DIR"/jquery.jqplot.min.css",
"css/jquery.jqplot.min.css" };
- css_dir = append_path(output_dir, "css");
- js_dir = append_path(output_dir, "js");
+ if (install_static_files) {
+ css_dir = append_path(output_dir, "css");
+ js_dir = append_path(output_dir, "js");
- mkdir(css_dir, 0777);
- mkdir(js_dir, 0777);
+ mkdir(css_dir, 0777);
+ mkdir(js_dir, 0777);
- for (i = 0; i < 6; i++) {
- f_dst = append_path(output_dir, www_files[2*i+1]);
- fcopy(www_files[2*i], f_dst);
+ for (i = 0; i < 6; i++) {
+ f_dst = append_path(output_dir, www_files[2*i+1]);
+ fcopy(www_files[2*i], f_dst);
- free(f_dst);
+ free(f_dst);
+ }
+ free(css_dir);
+ free(js_dir);
}
ppastats = create_ppa_stats(owner, ppa, package_status);
ppa_stats_free(ppastats);
free(path);
- free(css_dir);
- free(js_dir);
}
void ppa_to_html(const char *owner,
const char *ppa,
const char *package_status,
- const char *output_dir);
+ const char *output_dir,
+ const int install_static_files);
#endif
{"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}
};
(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,
+ 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);
retrieves only package of the given status
(possible values are: Pending, Published,
Superseded, Deleted or Obsolete).
+.TP
+\fB\-S\fR, \fB\-\-skip\-js\-css\fR
+skip installation of js and css files
.SH "REPORTING BUGS"
Report bugs to: jeanfi@gmail.com
.PP