summaryrefslogtreecommitdiff
path: root/src/resource.rs
AgeCommit message (Collapse)AuthorFilesLines
2022-05-14(cli): Change from structopt to clap3-deriveDaniel Silverstone1-3/+3
Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
2021-10-13feat: add crate subplot-build for using Subplot from build.rsLars Wirzenius1-1/+1
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-07chore: Rename generated file for resources to ease developmentDaniel Silverstone1-1/+1
Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
2021-09-07core: Adjust behaviour for bindings and function file findingDaniel Silverstone1-20/+28
From now on, we search $ common/$ then template/$ and as such we will find common (polyglot) bindings automatically Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
2021-09-07chore: Unwind global template nameDaniel Silverstone1-11/+4
Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
2021-09-06fix: build resources into subplot binary even in Debian packageLars Wirzenius1-11/+1
Once upon a time, in a galaxy far, far away, we decided to not build the share/* resource files into the subplot binary, when building it for a Debian package. Much later, we were much surprised when this was not the case and tests fail when run during the Debian package build. Because it's surprising to not build in the resources for a Debian package, we hereby undo that decision. Sponsored-by: author
2021-09-05resources: Hidden subcommand to list internal resourcesDaniel Silverstone1-0/+5
Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
2021-05-02resources: Remove some unnecessary `pub`Daniel Silverstone1-2/+2
Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
2021-05-02resources: Use new path checking orderDaniel Silverstone1-3/+15
Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
2021-04-09resource: Remove doc comment which confuses CLI helpDaniel Silverstone1-4/+5
Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
2021-01-10resource: Use a fallback path if neededDaniel Silverstone1-1/+9
Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
2021-01-10resource: Support setting the template nameDaniel Silverstone1-0/+32
Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
2021-01-10resource: Support embedded the resourcesDaniel Silverstone1-3/+15
We detect the content of the share/ tree at build time and embed files into it. Symbolic links to files will be followed and the target will be embedded. Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
2021-01-10resource: Support more than one --resource on the CLIDaniel Silverstone1-2/+3
Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
2021-01-10resource: Switch from 'templates' to 'share'Daniel Silverstone1-0/+24
In a general sense, we will want to have more than just template files as resources. This shifts from the concept that the only thing resource-wise that subplot has is templates, to a more general shared resources concept without a default path beyond CWD. Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
2021-01-09resource: Add support for multiple search pathsDaniel Silverstone1-2/+36
Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
2021-01-09chore: Simplify to use resource::read_as_stringDaniel Silverstone1-1/+1
Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
2021-01-09resource: Step one of VFS support, redirect all opensDaniel Silverstone1-0/+25
This redirects all file reading via the new resource module which will be used to control where files come from. Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>