Skip to content

Commit

Permalink
fix: clean up PDF command help options
Browse files Browse the repository at this point in the history
fixes #9696
  • Loading branch information
yufeih committed Feb 18, 2024
1 parent 679c092 commit a5c7194
Showing 1 changed file with 7 additions and 56 deletions.
63 changes: 7 additions & 56 deletions src/docfx/Models/PdfCommandOptions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,62 +7,13 @@
namespace Docfx;

[Description("Generate pdf file")]
internal class PdfCommandOptions : BuildCommandOptions
internal class PdfCommandOptions : LogOptions
{
[Description("Specify the name of the generated pdf")]
[CommandOption("--name")]
public string Name { get; set; }
[Description("Specify the output base directory")]
[CommandOption("-o|--output")]
public string OutputFolder { get; set; }

[Description("Specify the path for the css to generate pdf, default value is styles/default.css")]
[CommandOption("--css")]
public string CssFilePath { get; set; }

[Description("Specify whether or not to generate appendices for not-in-TOC articles")]
[CommandOption("--generatesAppendices")]
public bool? GeneratesAppendices { get; set; }

[Description("Specify whether or not to generate external links for PDF")]
[CommandOption("--generatesExternalLink")]
public bool? GeneratesExternalLink { get; set; }

[Description("Specify whether or not to keep the intermediate html files that used to generate the PDF file. It it usually used in debug purpose. By default the value is false")]
[CommandOption("--keepRawFiles")]
public bool? KeepRawFiles { get; set; }

[Description("Specify whether or not to exclude a table of contents. By default the value is false")]
[CommandOption("--excludeDefaultToc")]
public bool? ExcludeDefaultToc { get; set; }

[Description("Specify how to handle pdf pages that fail to load: abort, ignore or skip(default abort), it is the same input as wkhtmltopdf --load-error-handling options")]
[CommandOption("--errorHandling")]
public string LoadErrorHandling { get; set; }

[Description("Specify the output folder for the raw files, if not specified, raw files will by default be saved to _raw subfolder under output folder if keepRawFiles is set to true.")]
[CommandOption("--rawOutputFolder")]
public string RawOutputFolder { get; set; }

[Description("Specify the hostname to link not-in-TOC articles")]
[CommandOption("--host")]
public new string Host { get; set; }

[Description("Specify the locale of the pdf file")]
[CommandOption("--locale")]
public string Locale { get; set; }

[Description("Specify the toc files to be excluded")]
[CommandOption("--excludedTocs")]
[TypeConverter(typeof(ArrayOptionConverter))]
public IEnumerable<string> ExcludedTocs { get; set; }

[Description("Specify the base path to generate external link, {host}/{locale}/{basePath}")]
[CommandOption("--basePath")]
public string BasePath { get; set; }

[Description("Do not use stdin when wkhtmltopdf is executed")]
[CommandOption("--noStdin")]
public bool? NoInputStreamArgs { get; set; }

[Description("The path and file name of a wkhtmltopdf.exe compatible executable. This path may be relative to the current working directory. If not specified, wkhtmltopdf.exe will be searched in paths specified in the PATH environment variable.")]
[CommandOption("--filePath")]
public string FilePath { get; set; }
[Description("Path to docfx.json")]
[CommandArgument(0, "[config]")]
public string ConfigFile { get; set; }
}

0 comments on commit a5c7194

Please sign in to comment.