https://github.com/ietf-tools/svgcheck
Check SVG against RFC schema
https://github.com/ietf-tools/svgcheck
rfc svg tool utility validation
Last synced: about 1 month ago
JSON representation
Check SVG against RFC schema
- Host: GitHub
- URL: https://github.com/ietf-tools/svgcheck
- Owner: ietf-tools
- License: bsd-3-clause
- Created: 2022-01-25T02:25:11.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2024-12-03T22:36:06.000Z (6 months ago)
- Last Synced: 2025-04-09T22:12:34.326Z (about 1 month ago)
- Topics: rfc, svg, tool, utility, validation
- Language: Python
- Homepage:
- Size: 8.29 MB
- Stars: 19
- Watchers: 6
- Forks: 18
- Open Issues: 8
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
![]()
[](https://github.com/ietf-tools/svgcheck/releases)
[](https://github.com/ietf-tools/svgcheck/blob/main/LICENSE)
[](https://pypi.org/project/svgcheck/)
[](https://pypi.org/project/svgcheck/)
[](https://pypi.org/project/svgcheck/)
##### Check SVG against RFC schema
- [Changelog](https://github.com/ietf-tools/svgcheck/blob/main/CHANGELOG.md)
- [Contributing](https://github.com/ietf-tools/.github/blob/main/CONTRIBUTING.md)---
This program takes an XML file containing an SVG or an RFC document. It then compares all of the SVG elements with the schema defined in the document with [RFC 7996 bis](https://datatracker.ietf.org/doc/draft-7996-bis). The program has the option of modifying and writing out a version of the input that passes the defined schema.
## Usage
`svgcheck` accepts a single XML document as input and optionally outputs a modified version of the document.
### Basic Usage
```sh
svgcheck [options] SOURCE
```### Options
| Short | Long | Description |
|---------------|------------------|-----------------------------------------------------------------------------------|
| `-C` | `--clear-cache` | purge the cache and exit |
| `-h` | `--help` | show the help message and exit |
| `-N` | `--no-network` | don't use the network to resolve references |
| `-q` | `--quiet` | dont print anything |
| `-r` | `--repair` | repair the SVG so it meets RFC 7966, only emit the new file if repairs are needed |
| `-a` | `--always-emit` | repair the SVG file if needed, emit the file even if no repairs are needed |
| `-v` | `--verbose` | print extra information |
| `-V` | `--version` | display the version number and exit |
| `-d RNG` | `--rng=RNG` | specify an alternate RNG file |
| `-o FILENAME` | `--out=FILENAME` | specify an output filename, default to stdout |
| `-g` | `--grey-scale` | use a grey scale heuristic to determine what is white |
| | `--grey-level` | cut off level between black and white |