svgcheck


Namesvgcheck JSON
Version 0.8.0 PyPI version JSON
download
home_pagehttps://github.com/ietf-tools/svgcheck
SummaryVerify that an svg file is compliant with the RFC standards.
upload_time2024-04-04 23:26:53
maintainerNone
docs_urlNone
authorIETF Tools Team
requires_python>=3.8
licenseBSD-3-Clause
keywords svg validation rfc
VCS
bugtrack_url
requirements lxml xml2rfc
Travis-CI No Travis.
coveralls test coverage No coveralls.
            <div align="center">
    
<img src="https://raw.githubusercontent.com/ietf-tools/common/main/assets/logos/svgcheck.svg" alt="SVGCHECK" height="125" />
    
[![Release](https://img.shields.io/github/release/ietf-tools/svgcheck.svg?style=flat&maxAge=360)](https://github.com/ietf-tools/svgcheck/releases)
[![License](https://img.shields.io/github/license/ietf-tools/svgcheck)](https://github.com/ietf-tools/svgcheck/blob/main/LICENSE)
[![PyPI - Version](https://img.shields.io/pypi/v/svgcheck)](https://pypi.org/project/svgcheck/)
[![PyPI - Status](https://img.shields.io/pypi/status/svgcheck)](https://pypi.org/project/svgcheck/)
[![PyPI - Format](https://img.shields.io/pypi/format/svgcheck)](https://pypi.org/project/svgcheck/)
    
##### Check SVG against RFC schema
    
</div>

- [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 hieristic to determine what is white                             |
|               | `--grey-level`   | cut off level between black and white                                             |

## Dependencies

`svgcheck` depends on the following packages:

- [lxml](http://lxml.de) *(>= 4.1.1)*
- [xml2rfc](https://github.com/ietf-tools/xml2rfc/) *(>= 3.16.0)*

Copyright (C) 2017, 2022 IETF Trust
All rights reserved.

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:

    1. Redistributions of source code must retain the above copyright notice,
       this list of conditions and the following disclaimer.

    2. Redistributions in binary form must reproduce the above copyright
       notice, this list of conditions and the following disclaimer in the
       documentation and/or other materials provided with the distribution.

    3. Neither the name of the copyright holder nor the names of its contributors
       may be used to endorse or promote products derived from this software
       without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/ietf-tools/svgcheck",
    "name": "svgcheck",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.8",
    "maintainer_email": null,
    "keywords": "svg, validation, rfc",
    "author": "IETF Tools Team",
    "author_email": null,
    "download_url": "https://files.pythonhosted.org/packages/e9/e7/bee97fde9aa01bcaa7df4287493226f9f72c66daf9920ca584bdc16e631c/svgcheck-0.8.0.tar.gz",
    "platform": null,
    "description": "<div align=\"center\">\n    \n<img src=\"https://raw.githubusercontent.com/ietf-tools/common/main/assets/logos/svgcheck.svg\" alt=\"SVGCHECK\" height=\"125\" />\n    \n[![Release](https://img.shields.io/github/release/ietf-tools/svgcheck.svg?style=flat&maxAge=360)](https://github.com/ietf-tools/svgcheck/releases)\n[![License](https://img.shields.io/github/license/ietf-tools/svgcheck)](https://github.com/ietf-tools/svgcheck/blob/main/LICENSE)\n[![PyPI - Version](https://img.shields.io/pypi/v/svgcheck)](https://pypi.org/project/svgcheck/)\n[![PyPI - Status](https://img.shields.io/pypi/status/svgcheck)](https://pypi.org/project/svgcheck/)\n[![PyPI - Format](https://img.shields.io/pypi/format/svgcheck)](https://pypi.org/project/svgcheck/)\n    \n##### Check SVG against RFC schema\n    \n</div>\n\n- [Changelog](https://github.com/ietf-tools/svgcheck/blob/main/CHANGELOG.md)\n- [Contributing](https://github.com/ietf-tools/.github/blob/main/CONTRIBUTING.md)\n\n---\n\nThis 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.\n\n\n## Usage\n\n`svgcheck` accepts a single XML document as input and optionally outputs a modified version of the document.\n\n### Basic Usage\n\n```sh\nsvgcheck [options] SOURCE\n```\n\n### Options\n\n| Short         | Long             | Description                                                                       |\n|---------------|------------------|-----------------------------------------------------------------------------------|\n| `-C`          | `--clear-cache`  | purge the cache and exit                                                          |\n| `-h`          | `--help`         | show the help message and exit                                                    |\n| `-N`          | `--no-network`   | don't use the network to resolve references                                       |\n| `-q`          | `--quiet`        | dont print anything                                                               |\n| `-r`          | `--repair`       | repair the SVG so it meets RFC 7966, only emit the new file if repairs are needed |\n| `-a`          | `--always-emit`  | repair the SVG file if needed, emit the file even if no repairs are needed        |\n| `-v`          | `--verbose`      | print extra information                                                           |\n| `-V`          | `--version`      | display the version number and exit                                               |\n| `-d RNG`      | `--rng=RNG`      | specify an alternate RNG file                                                     |\n| `-o FILENAME` | `--out=FILENAME` | specify an output filename, default to stdout                                     |\n| `-g`          | `--grey-scale`   | use a grey scale hieristic to determine what is white                             |\n|               | `--grey-level`   | cut off level between black and white                                             |\n\n## Dependencies\n\n`svgcheck` depends on the following packages:\n\n- [lxml](http://lxml.de) *(>= 4.1.1)*\n- [xml2rfc](https://github.com/ietf-tools/xml2rfc/) *(>= 3.16.0)*\n\nCopyright (C) 2017, 2022 IETF Trust\nAll rights reserved.\n\nRedistribution and use in source and binary forms, with or without\nmodification, are permitted provided that the following conditions are met:\n\n    1. Redistributions of source code must retain the above copyright notice,\n       this list of conditions and the following disclaimer.\n\n    2. Redistributions in binary form must reproduce the above copyright\n       notice, this list of conditions and the following disclaimer in the\n       documentation and/or other materials provided with the distribution.\n\n    3. Neither the name of the copyright holder nor the names of its contributors\n       may be used to endorse or promote products derived from this software\n       without specific prior written permission.\n\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\nAND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\nIMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\nDISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE\nFOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\nDAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR\nSERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER\nCAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,\nOR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\nOF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n",
    "bugtrack_url": null,
    "license": "BSD-3-Clause",
    "summary": "Verify that an svg file is compliant with the RFC standards.",
    "version": "0.8.0",
    "project_urls": {
        "Homepage": "https://github.com/ietf-tools/svgcheck"
    },
    "split_keywords": [
        "svg",
        " validation",
        " rfc"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "e9e7bee97fde9aa01bcaa7df4287493226f9f72c66daf9920ca584bdc16e631c",
                "md5": "4d8fb6cdc0b5fe13a1384c7805b19f08",
                "sha256": "84e9e3ca00bb14f04fcc5eda7418a52d45a55e5ed4a75d49b39124c279460573"
            },
            "downloads": -1,
            "filename": "svgcheck-0.8.0.tar.gz",
            "has_sig": false,
            "md5_digest": "4d8fb6cdc0b5fe13a1384c7805b19f08",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8",
            "size": 425087,
            "upload_time": "2024-04-04T23:26:53",
            "upload_time_iso_8601": "2024-04-04T23:26:53.960635Z",
            "url": "https://files.pythonhosted.org/packages/e9/e7/bee97fde9aa01bcaa7df4287493226f9f72c66daf9920ca584bdc16e631c/svgcheck-0.8.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-04-04 23:26:53",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "ietf-tools",
    "github_project": "svgcheck",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "requirements": [
        {
            "name": "lxml",
            "specs": [
                [
                    ">=",
                    "4.1.1"
                ]
            ]
        },
        {
            "name": "xml2rfc",
            "specs": [
                [
                    ">=",
                    "3.16.0"
                ]
            ]
        }
    ],
    "tox": true,
    "lcname": "svgcheck"
}
        
Elapsed time: 0.30171s