mirror of
https://github.com/typst/typst
synced 2025-05-14 17:15:28 +08:00
Fix some typos in CLI help
This commit is contained in:
parent
3c47a7795c
commit
8f19b49afa
@ -21,7 +21,7 @@ pub struct CliArguments {
|
|||||||
#[derive(Debug, Clone, Subcommand)]
|
#[derive(Debug, Clone, Subcommand)]
|
||||||
#[command()]
|
#[command()]
|
||||||
pub enum Command {
|
pub enum Command {
|
||||||
/// Compiles an input file into a PDF or PNG file
|
/// Compiles an input file into a supported output format
|
||||||
#[command(visible_alias = "c")]
|
#[command(visible_alias = "c")]
|
||||||
Compile(CompileCommand),
|
Compile(CompileCommand),
|
||||||
|
|
||||||
@ -36,14 +36,14 @@ pub enum Command {
|
|||||||
Fonts(FontsCommand),
|
Fonts(FontsCommand),
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Compiles the input file into a PDF file
|
/// Compiles an input file into a supported output format
|
||||||
#[derive(Debug, Clone, Parser)]
|
#[derive(Debug, Clone, Parser)]
|
||||||
pub struct CompileCommand {
|
pub struct CompileCommand {
|
||||||
/// Shared arguments.
|
/// Shared arguments
|
||||||
#[clap(flatten)]
|
#[clap(flatten)]
|
||||||
pub common: SharedArgs,
|
pub common: SharedArgs,
|
||||||
|
|
||||||
/// Path to output PDF file or PNG file(s)
|
/// Path to output file (PDF, PNG, or SVG)
|
||||||
pub output: Option<PathBuf>,
|
pub output: Option<PathBuf>,
|
||||||
|
|
||||||
/// Opens the output file using the default viewer after compilation
|
/// Opens the output file using the default viewer after compilation
|
||||||
@ -71,22 +71,22 @@ impl CompileCommand {
|
|||||||
/// Processes an input file to extract provided metadata
|
/// Processes an input file to extract provided metadata
|
||||||
#[derive(Debug, Clone, Parser)]
|
#[derive(Debug, Clone, Parser)]
|
||||||
pub struct QueryCommand {
|
pub struct QueryCommand {
|
||||||
/// Shared arguments.
|
/// Shared arguments
|
||||||
#[clap(flatten)]
|
#[clap(flatten)]
|
||||||
pub common: SharedArgs,
|
pub common: SharedArgs,
|
||||||
|
|
||||||
/// Define what elements to retrieve
|
/// Defines which elements to retrieve
|
||||||
pub selector: String,
|
pub selector: String,
|
||||||
|
|
||||||
/// Extract just one field from all retrieved elements
|
/// Extracts just one field from all retrieved elements
|
||||||
#[clap(long = "field")]
|
#[clap(long = "field")]
|
||||||
pub field: Option<String>,
|
pub field: Option<String>,
|
||||||
|
|
||||||
/// Expect and retrieve exactly one element
|
/// Expects and retrieves exactly one element
|
||||||
#[clap(long = "one", default_value = "false")]
|
#[clap(long = "one", default_value = "false")]
|
||||||
pub one: bool,
|
pub one: bool,
|
||||||
|
|
||||||
/// The format to serialization in
|
/// The format to serialize in
|
||||||
#[clap(long = "format", default_value = "json")]
|
#[clap(long = "format", default_value = "json")]
|
||||||
pub format: SerializationFormat,
|
pub format: SerializationFormat,
|
||||||
}
|
}
|
||||||
@ -104,7 +104,7 @@ pub struct SharedArgs {
|
|||||||
/// Path to input Typst file
|
/// Path to input Typst file
|
||||||
pub input: PathBuf,
|
pub input: PathBuf,
|
||||||
|
|
||||||
/// Configures the project root
|
/// Configures the project root (for absolute paths)
|
||||||
#[clap(long = "root", env = "TYPST_ROOT", value_name = "DIR")]
|
#[clap(long = "root", env = "TYPST_ROOT", value_name = "DIR")]
|
||||||
pub root: Option<PathBuf>,
|
pub root: Option<PathBuf>,
|
||||||
|
|
||||||
@ -117,7 +117,7 @@ pub struct SharedArgs {
|
|||||||
)]
|
)]
|
||||||
pub font_paths: Vec<PathBuf>,
|
pub font_paths: Vec<PathBuf>,
|
||||||
|
|
||||||
/// In which format to emit diagnostics
|
/// The format to emit diagnostics in
|
||||||
#[clap(
|
#[clap(
|
||||||
long,
|
long,
|
||||||
default_value_t = DiagnosticFormat::Human,
|
default_value_t = DiagnosticFormat::Human,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user