Branch: Tag:

2016-06-04

2016-06-04 14:10:29 by Martin Nilsson <nilsson@fastmail.com>

Nicer help.

1801:    return 0;   }    + void help(void|string err) + { +  string msg = #"pike -x autodoc_to_html [args] <input file> [<output file>] + --img=<image path> + --dest=<destination path> +  + --title=<document title> +  + --template=<template.html path> + "; +  +  if( err ) +  exit(1, err+"\n"+msg); +  write(msg); +  exit(0); + } +    int main(int num, array args) {       string title, template;
1842:    verbosity = Tools.AutoDoc.FLAG_QUIET;    break;    case "help": -  write(#"pike -x autodoc_to_html [args] <input file> [<output file>] - --img=<image path> - --dest=<destination path> -  - --title=<document title> -  - --template=<template.html path> - "); +  help();    break;    }    args = Getopt.get_args(args)[1..];       if(!sizeof(args)) -  error( "No input file given.\n" ); +  { +  help( "No input file given.\n" ); +  }       if (template && Stdio.exist(template)) {    string dir = dirname(template);