{"id":42212940,"url":"https://github.com/foliant-docs/foliantcontrib.checksources","last_synced_at":"2026-01-27T01:06:59.756Z","repository":{"id":62591817,"uuid":"497399834","full_name":"foliant-docs/foliantcontrib.checksources","owner":"foliant-docs","description":"Foliant preprocessor that checks the project for missing and unmentioned files","archived":false,"fork":false,"pushed_at":"2025-09-17T13:28:38.000Z","size":27,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-09-28T00:23:00.705Z","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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2022-05-28T18:32:34.000Z","updated_at":"2025-09-17T13:18:19.000Z","dependencies_parsed_at":"2025-09-04T23:17:13.446Z","dependency_job_id":null,"html_url":"https://github.com/foliant-docs/foliantcontrib.checksources","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"purl":"pkg:github/foliant-docs/foliantcontrib.checksources","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/foliant-docs%2Ffoliantcontrib.checksources","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/foliant-docs%2Ffoliantcontrib.checksources/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/foliant-docs%2Ffoliantcontrib.checksources/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/foliant-docs%2Ffoliantcontrib.checksources/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/foliant-docs","download_url":"https://codeload.github.com/foliant-docs/foliantcontrib.checksources/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/foliant-docs%2Ffoliantcontrib.checksources/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28794646,"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:58.999Z","updated_at":"2026-01-27T01:06:59.695Z","avatar_url":"https://github.com/foliant-docs.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![](https://img.shields.io/pypi/v/foliantcontrib.checksources.svg)](https://pypi.org/project/foliantcontrib.checksources/) [![](https://img.shields.io/github/v/tag/foliant-docs/foliantcontrib.checksources.svg?label=GitHub)](https://github.com/foliant-docs/foliantcontrib.checksources)\n\n# CheckSources\n\nCheckSources is a preprocessor that checks the project’s `chapters` for missing and unmentioned files in the sources directory.\n\n## Installation\n\n```bash\n$ pip install foliantcontrib.checksources\n```\n\n## Usage\n\nTo enable the preprocessor, add `checksources` to `preprocessors` section in the project config:\n\n```yaml\npreprocessors:\n    - checksources\n```\n\n### Options\n\n- `not_in_chapters` –  a list of files not mentioned in the chapters.\n  No warnings will be displayed for the specified files.\n  This option is useful if you don't need to add some files to the table of contents.\n\n  Files can be specified in this option using [Unix-style](https://en.wikipedia.org/wiki/Glob_(programming)#Unix-like) wildcards.\n  The comparison is case-sensitive.\n- `strict_check` – if a critical error is detected, the build will be failed after applying the preprocessor.\n  Several checks are supported:\n    - `not_exist` – checking the existence of the file.\n      Checks if the file specified in chapters exists (enabled by default);\n    - `duplicate` – checking for duplicate in the chapters.\n\n  To disable strict check, use `strict_check: false`. And in order to enable all available checks, use `strict_check: true`.\n- `disable_warnings` – disabling the output of warnings, just like `strict_check` supports: `not_exist` and `duplicate`.\n\n**Example of options:**\n```yaml\npreprocessors:\n    - checksources:\n        not_in_chapters:\n          - tags.md\n          - archive/*\n        strict_check:\n          - not_exist\n        disable_warnings:\n          - duplicate\n```\n\n## Integration with preprocessor Includes\n\nAll source files that are not mentioned in `chapters` or `not_in_chapters` cause warnings.\n\nHowever, some files or parts of files may be included by the preprocessor [Includes](https://foliant-docs.github.io/docs/preprocessors/includes/) in other files. \nWarnings about such included files may be unnecessary. \nCheckSources can process the `includes_map.json` file generated by Includes and create a list of included files. Files from this list do not cause warnings.\n\nTo create a list of included files and avoid unnecessary warnings, enable generation of a map in the project config:\n\n```yaml\npreprocessors:\n    - includes:             #includes defined before checksources\n        includes_map: true\n    - ...\n    - checksources\n\n```\n\n### Included files and MultiProject\n[MultiProject](https://github.com/foliant-docs/foliantcontrib.multiproject) is an extension for Foliant to generate the documentation from multiple sources.\n\nTo create a list of included files for the entire project, CheckSources can process the `multiproject_includes_map.json` file generated by the [Includesmap](https://github.com/foliant-docs/foliantcontrib.multiproject#includesmap-preprocessor) preprocessor from multiple `includes_map.json` files. If `multiproject_includes_map.json` and `includes_map.json` exist for the main project at the same time, CheckSources will use `multiproject_includes_map.json`.\n\nTo create a list of included files for the entire project, enable generation of maps in all configs and combining of maps in the config of the main project.\n\nConfig of main project:\n\n```yaml\npreprocessors:              \n    - includes:             \n        includes_map: true  \n    - includesmap           \n    - ...\n    - checksources\n\n```\n\nConfig of subproject:\n\n```yaml\npreprocessors:              \n    - includes:             \n        includes_map: true  \n    - ...\n\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffoliant-docs%2Ffoliantcontrib.checksources","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffoliant-docs%2Ffoliantcontrib.checksources","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffoliant-docs%2Ffoliantcontrib.checksources/lists"}