Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Patch 2 #14

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open

Patch 2 #14

wants to merge 5 commits into from

Conversation

arran4
Copy link

@arran4 arran4 commented Aug 13, 2024

I've added the ability to add an "output" file version, because the code accepts multiple input files, I had to improvise with using a : to separate the values.

Tested only on my use case sorry.

The options were also in the wrong spot and running the 'root' options as they seem to be positional. It seems some options such as font are quietly accepted despite being in the wrong location

arran@arran-desktop:/home/arran 27401 
% typst -h
The Typst compiler

Usage: typst [OPTIONS] <COMMAND>

Commands:
  compile  Compiles an input file into a supported output format [aliases: c]
  watch    Watches an input file and recompiles on changes [aliases: w]
  init     Initializes a new project from a template
  query    Processes an input file to extract provided metadata
  fonts    Lists all discovered fonts in system and custom font paths
  update   Self update the Typst CLI (disabled)
  help     Print this message or the help of the given subcommand(s)

Options:
      --color[=<WHEN>]  Set when to use color. auto = use color if a capable terminal is detected [default: auto] [possible values: auto, always, never]
      --cert <CERT>     Path to a custom CA certificate to use when making network requests [env: TYPST_CERT=]
  -h, --help            Print help
  -V, --version         Print version
arran@arran-desktop:/home/arran 27402 
% typst compile -h
Compiles an input file into a supported output format

Usage: typst compile [OPTIONS] <INPUT> [OUTPUT]

Arguments:
  <INPUT>   Path to input Typst file, use `-` to read input from stdin
  [OUTPUT]  Path to output file (PDF, PNG, or SVG)

Options:
      --root <DIR>
          Configures the project root (for absolute paths) [env: TYPST_ROOT=]
      --input <key=value>
          Add a string key-value pair visible through `sys.inputs`
      --font-path <DIR>
          Adds additional directories to search for fonts [env: TYPST_FONT_PATHS=]
      --diagnostic-format <DIAGNOSTIC_FORMAT>
          The format to emit diagnostics in [default: human] [possible values: human, short]
  -f, --format <FORMAT>
          The format of the output file, inferred from the extension by default [possible values: pdf, png, svg]
      --open [<OPEN>]
          Opens the output file using the default viewer after compilation
      --ppi <PPI>
          The PPI (pixels per inch) to use for PNG export [default: 144]
      --timings [<OUTPUT_JSON>]
          Produces performance timings of the compilation process (experimental)
  -h, --help
          Print help (see more with '--help')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant