{"id":42212933,"url":"https://github.com/foliant-docs/foliantcontrib.subset","last_synced_at":"2026-01-27T01:06:57.182Z","repository":{"id":57431762,"uuid":"153649077","full_name":"foliant-docs/foliantcontrib.subset","owner":"foliant-docs","description":"Extension for Foliant documentation generator to configure a subset of the Foliant project.","archived":false,"fork":false,"pushed_at":"2019-10-15T12:32:27.000Z","size":18,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"develop","last_synced_at":"2025-08-17T16:42:20.396Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/foliant-docs.png","metadata":{"files":{"readme":"README.md","changelog":"changelog.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-10-18T15:46:54.000Z","updated_at":"2019-10-15T12:32:10.000Z","dependencies_parsed_at":"2022-09-02T11:51:45.624Z","dependency_job_id":null,"html_url":"https://github.com/foliant-docs/foliantcontrib.subset","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/foliant-docs/foliantcontrib.subset","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/foliant-docs%2Ffoliantcontrib.subset","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/foliant-docs%2Ffoliantcontrib.subset/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/foliant-docs%2Ffoliantcontrib.subset/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/foliant-docs%2Ffoliantcontrib.subset/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/foliant-docs","download_url":"https://codeload.github.com/foliant-docs/foliantcontrib.subset/tar.gz/refs/heads/develop","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/foliant-docs%2Ffoliantcontrib.subset/sbom","scorecard":{"id":406105,"data":{"date":"2025-08-11","repo":{"name":"github.com/foliant-docs/foliantcontrib.subset","commit":"4f1a89da0819f143f69dffbde7e5b1a91cb12739"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3,"checks":[{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"SAST","score":0,"reason":"no SAST tool detected","details":["Warn: no pull requests merged into dev branch"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Code-Review","score":0,"reason":"Found 0/26 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'develop'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}}]},"last_synced_at":"2025-08-18T21:17:57.889Z","repository_id":57431762,"created_at":"2025-08-18T21:17:57.889Z","updated_at":"2025-08-18T21:17:57.889Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28794644,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-26T21:49:50.245Z","status":"ssl_error","status_checked_at":"2026-01-26T21:48:29.455Z","response_time":59,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2026-01-27T01:06:56.416Z","updated_at":"2026-01-27T01:06:57.170Z","avatar_url":"https://github.com/foliant-docs.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Subset\n\nThis CLI extension adds the command `subset` that generates a config file for a subset (i.e. a detached part) of the Foliant project. The command uses:\n\n* the common (i.e. default, single) config file for the whole Foliant project;\n* the part of config that is individual for each subset. The Foliant project may include multiple subsets that are defined by their own partial config files.\n\nThe command `subset` takes a path to the subset directory as a mandatory command line parameter.\n\nThe command `subset`:\n\n* reads the partial config of the subset;\n* optionally rewrites the paths of Markdown files that specified there in the `chapters` section;\n* merges the result with the default config of the whole Foliant project config;\n* finally, writes a new config file that allows to build a certain subset of the Foliant project with the `make` command.\n\n## Installation\n\nTo install the extension, use the command:\n\n```bash\n$ pip install foliantcontrib.subset\n```\n\n## Usage\n\nTo get the list of all necessary parameters and available options, run `foliant subset --help`:\n\n```bash\n$ foliant subset --help\nusage: foliant subset [-h] [-p PROJECT_DIR_PATH] [-c CONFIG] [-n] [-d] SUBPATH\n\nGenerate the config file to build the project subset from SUBPATH.\n\npositional arguments:\n  SUBPATH               Path to the subset of the Foliant project\n\noptional arguments:\n  -h, --help            show this help message and exit\n  -p PROJECT_DIR, --path PROJECT_DIR\n                        Path to the Foliant project\n  -c CONFIG, --config CONFIG\n                        Name of config file of the Foliant project, default 'foliant.yml'\n  -n, --norewrite       Do not rewrite the paths of Markdown files in the subset partial config\n  -d, --debug           Log all events during build. If not set, only warnings and errors are logged\n```\n\nIn most cases it’s enough to use the default values of optional parameters. You need to specify only the `SUBPATH`—the directory that should be located inside the Foliant project source directory.\n\nSuppose you use the default settings. Then you have to prepare:\n\n* the common (default) config file `foliant.yml` in the Foliant project root directory;\n* partial config files for each subset. They also must be named `foliant.yml`, and they must be located in the directories of the subsets.\n\nYour Foliant project tree may look so:\n\n```bash\n$ tree\n.\n├── foliant.yml\n└── src\n    ├── group_1\n    │   ├── product_1\n    │   │   └── feature_1\n    │   │       ├── foliant.yml\n    │   │       └── index.md\n    │   └── product_2\n    │       ├── foliant.yml\n    │       └── main.md\n    └── group_2\n        ├── foliant.yml\n        └── intro.md\n```\n\nThe command `foliant subset group_1/product_1/feautre_1` will merge the files `./src/group_1/product_1/feautre_1/foliant.yml` and `./foliant.yml`, and write the result into the file `./foliant.yml.subset`.\n\nAfter that you may use the command like the following to build your Foliant project:\n\n```bash\n$ foliant make pdf --config foliant.yml.subset\n```\n\nLet’s look at some examples.\n\nThe content of the common (default) file `./foliant.yml`:\n\n```yaml\ntitle: \u0026title Default Title\n\nsubtitle: \u0026subtitle Default Subtitle\n\nversion: \u0026version 0.0\n\nbackend_config:\n    pandoc:\n        template: !path /somewhere/template.tex\n        reference_docx: !path /somewhere/reference.docx\n        vars:\n            title: *title\n            version: *version\n            subtitle: *subtitle\n            year: 2018\n        params:\n            pdf_engine: xelatex\n```\n\nThe content of the partial config file `./src/group_1/product_1/feautre_1/foliant.yml`:\n\n```yaml\ntitle: \u0026title Group 1, Product 1, Feature 1\n\nsubtitle: \u0026subtitle Technical Specification\n\nversion: \u0026version 1.0\n\nchapters:\n    - index.md\n\nbackend_config:\n    pandoc:\n        vars:\n            year: 2019\n```\n\n\nThe content of newly generated file `./foliant.yml.subset`:\n\n```yaml\ntitle: \u0026title Group 1, Product 1, Feature 1\nsubtitle: \u0026subtitle Technical Specification\nversion: \u0026version 1.0\nbackend_config:\n    pandoc:\n        template: !path /somewhere/template.tex\n        reference_docx: !path /somewhere/reference.docx\n        vars:\n            title: *title\n            version: *version\n            subtitle: *subtitle\n            year: 2019\n        params:\n            pdf_engine: xelatex\nchapters:\n- b2b/order_1/feature_1/index.md\n```\n\nIf the option `--no-rewrite` is not set, the paths of Markdown files that are specified in the `chapters` section of the file `./src/group_1/product_1/feautre_1/foliant.yml`, will be rewritten as if these paths were relative to the directory `./src/group_1/product_1/feautre_1/`.\n\nOtherwise, the Subset CLI extension will not rewrite the paths of Markdown files as if they were relative to `./src/` directory.\n\nNote that the Subset CLI Extension merges the data of the config files recursively, so any subkeys of default config may be overridden by the settings of partial config.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffoliant-docs%2Ffoliantcontrib.subset","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffoliant-docs%2Ffoliantcontrib.subset","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffoliant-docs%2Ffoliantcontrib.subset/lists"}