Description
I want to be able to write typst query --field value --minified file.typ metadata and get:
instead of:
which is very verbose IMO (7 bytes more). Maybe even print minified version by default (this command is probably only ever used in scripts anyway) and instead add --prittify for the verbose version.
Same can be done for the YAML version: from
to
(https://yaml.org/spec/1.0/, paragraph 2.1, example 2.5)
I personally haven't heard about YAML minification, but in some cases it is indeed possible (2 bytes saved), so if possible, why not affect both formats?
Use Case
The minified version outputs a smaller result, which if saved as a file, can reduce the size of that file (or reduce the size of piped data if used in a POSIX-compliant shell). If typst query outputs a lot of data, then the size difference becomes more noticeable. And just in general, it's better to not waste any resources if it is possible. Also, since the command is mainly used in scripts, the output doesn't have to be readable.
Description
I want to be able to write
typst query --field value --minified file.typ metadataand get:instead of:
which is very verbose IMO (7 bytes more). Maybe even print minified version by default (this command is probably only ever used in scripts anyway) and instead add
--prittifyfor the verbose version.Same can be done for the YAML version: from
to
[false,true](https://yaml.org/spec/1.0/, paragraph 2.1, example 2.5)
I personally haven't heard about YAML minification, but in some cases it is indeed possible (2 bytes saved), so if possible, why not affect both formats?
Use Case
The minified version outputs a smaller result, which if saved as a file, can reduce the size of that file (or reduce the size of piped data if used in a POSIX-compliant shell). If
typst queryoutputs a lot of data, then the size difference becomes more noticeable. And just in general, it's better to not waste any resources if it is possible. Also, since the command is mainly used in scripts, the output doesn't have to be readable.