summaryrefslogtreecommitdiff
path: root/src/bin/cli/mod.rs
AgeCommit message (Collapse)AuthorFilesLines
2023-07-02feat! drop support for bibliographies in document metadataLars Wirzenius1-10/+0
We don't use the bibliographies for anything so there's not point in allowing users to specify it. If and when we add support for bibliographies again, we may well want to do it in a different way. Alas, we also have to disable reference.md because the release it refers to uses bibliographies. We'll have to re-enable it again after the next release. Sponsored-by: author
2023-06-21refactor: rename Document::files to ::embedded_filesLars Wirzenius1-2/+2
This makes it more clear what kind of files we're talking about. The old name could've meant, say, the markdown files. Sponsored-by: author
2023-02-11chore: use variables in Rust format stringsLars Wirzenius1-3/+3
Change this: format!("{}", foo) into this: format!("{foo}") Support for this feature was added in Rust 1.58 (see https://github.com/rust-lang/rust/releases/tag/1.58.0) and in 1.67 clippy suggests about this. Because the new style seems to be where the Rust ecosystem is going, I think Subplot should follow to avoid being needlessly different from most other projects. Sponsored-by: author
2022-12-01(chore): Update to clap4Daniel Silverstone1-1/+2
Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
2022-09-03refactor: rename DataFile{,s} to EmbeddedFile{,s} to be systematicLars Wirzenius1-2/+2
Sponsored-by: author
2022-03-24feat! change logging to use log/env_logger instead of tracingLars Wirzenius1-1/+1
We don't use async in Subplot, and the mental overhead of learning tracing and the code overhead to add support for logging custom values (implementing the Value trait for Subplot internal types) does not seem worthwhile. Sponsored-by: author
2021-11-19metadata: Write out templates too, to make it easier to parseDaniel Silverstone1-0/+2
Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
2021-11-19various: Rework document to support multiple implementationsDaniel Silverstone1-10/+20
In order to eventually shift the document metadata to support more than one template defined for the document this reworks all the internal APIs to expect templates, and also the external CLI to be able to provide it. Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
2021-10-13feat: add crate subplot-build for using Subplot from build.rsLars Wirzenius1-44/+0
Make it easy to generate test code from a subplot in another project's `build.rs` script. Move the code to load documents and generate test code from src/bin/subplot.rs and src/bin/cli/mod.rs to src/doc.rs so it can be used without using the subplot executable. Make the add_search_path function public so it can be used outside its module. The subplot executable arranged for the directory where the markdown input file resides to be added to the search path via another way. Sponsored-by: pep.foundation
2021-09-16feat! parse Markdown input with pull-cmark instead of PandocLars Wirzenius1-0/+22
This is a first step towards being able to use Subplot codegen from a project's build.rs, and with only pure-Rust build dependencies. Replace Pandoc for parsing Markdown input with pulldown-cmark. This is mostly a drop-in replacement, but not entirely. The YAML parsing is more strict now. Note that this is a breaking change. Some subplots that used to work, and still work with docgen, no longer work with the new parser. Major differences are: * Only specific fields are supported. All the Markdown files in the Subplot source tree work. If anything else is needed, and it likely is, the new parser needs to be extended. * The bindings, functions, classes, and bibliography fields MUST be lists of strings. A single string value will no longer work. Sponsored-by: pep.foundation
2021-09-14debug: add tracing calls to help debugLars Wirzenius1-0/+1
I needed these to figure out a problem that wasn't in Subplot itself. I'd like to keep them for the future. Sponsored-by: author
2021-09-04tracing: Add a bunch of TRACE level tracingDaniel Silverstone1-3/+17
Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
2021-09-04chore: Fix unnecessary borrow lintsDaniel Silverstone1-3/+3
Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
2021-08-30policy: No parent directory means basedir is curdirDaniel Silverstone1-1/+1
Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
2021-06-11cli: Sort output of metadata commandDaniel Silverstone1-6/+12
Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
2021-04-09bin: Abstract metadata handlingDaniel Silverstone1-0/+108
Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
2021-04-09sp-extract: Move file extractionDaniel Silverstone1-1/+12
Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
2021-04-09CLI: Refactor out document loadingDaniel Silverstone1-0/+14
Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>