Skip to content

Commit

Permalink
Merge pull request #256 from enen92/fixrepos
Browse files Browse the repository at this point in the history
Fix repository schemas
  • Loading branch information
enen92 authored Mar 1, 2022
2 parents 7374f16 + 3d14980 commit 3d26214
Show file tree
Hide file tree
Showing 5 changed files with 173 additions and 30 deletions.
2 changes: 1 addition & 1 deletion kodi_addon_checker/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
See LICENSES/README.md for more information.
"""

__version__ = "0.0.26"
__version__ = "0.0.27"

ValidKodiVersions = [
"gotham",
Expand Down
55 changes: 33 additions & 22 deletions kodi_addon_checker/xml_schema/gotham_repository.xsd
Original file line number Diff line number Diff line change
Expand Up @@ -4,37 +4,48 @@
<xs:element name="extension">
<xs:complexType>
<xs:sequence>
<xs:element name="dir" type="dirItem" minOccurs="1" maxOccurs="unbounded"/>
<xs:element name="dir" type="dirItem" minOccurs="0" maxOccurs="unbounded"/>
<xs:element name="info" type="infoItem" minOccurs="0" maxOccurs="1"/>
<xs:element name="checksum" type="checksumItem" minOccurs="0" maxOccurs="1"/>
<xs:element name="datadir" type="datadirItem" minOccurs="0" maxOccurs="1"/>
<xs:element name="hashes" type="xs:string" minOccurs="0" maxOccurs="1"/>
</xs:sequence>
<xs:attribute name="point" type="xs:string" use="required"/>
<xs:attribute name="id" type="simpleIdentifier"/>
<xs:attribute name="name" type="xs:string"/>
</xs:complexType>
</xs:element>
<xs:complexType name="dirItem">
<xs:group ref="dirItems" />
</xs:complexType>
<xs:group name="dirItems">
<xs:all>
<xs:element name="info" minOccurs="1">
<xs:complexType>
<xs:simpleContent>
<xs:extension base="xs:string">
<xs:attribute name="compressed" type="xs:boolean"/>
</xs:extension>
</xs:simpleContent>
</xs:complexType>
</xs:element>
<xs:element name="checksum" type="xs:string" minOccurs="1"/>
<xs:element name="datadir" minOccurs="1">
<xs:complexType>
<xs:simpleContent>
<xs:extension base="xs:string">
<xs:attribute name="zip" type="xs:boolean"/>
</xs:extension>
</xs:simpleContent>
</xs:complexType>
</xs:element>
<xs:element name="hashes" type="xs:boolean"/>
<xs:element name="info" type="infoItem" minOccurs="1"/>
<xs:element name="checksum" type="checksumItem" minOccurs="1"/>
<xs:element name="datadir" type="datadirItem" minOccurs="1"/>
<xs:element name="hashes" type="xs:string" minOccurs="0"/>
</xs:all>
<xs:attribute name="minversion" type="xs:string"/>
</xs:group>
<xs:complexType name="checksumItem">
<xs:simpleContent>
<xs:extension base="xs:string">
<xs:attribute name="verify" type="xs:string"/>
</xs:extension>
</xs:simpleContent>
</xs:complexType>
<xs:complexType name="infoItem">
<xs:simpleContent>
<xs:extension base="xs:string">
<xs:attribute name="compressed" type="xs:boolean"/>
</xs:extension>
</xs:simpleContent>
</xs:complexType>
<xs:complexType name="datadirItem">
<xs:simpleContent>
<xs:extension base="xs:string">
<xs:attribute name="zip" type="xs:boolean"/>
</xs:extension>
</xs:simpleContent>
</xs:complexType>
<xs:simpleType name="simpleIdentifier">
<xs:restriction base="xs:string">
Expand Down
27 changes: 20 additions & 7 deletions kodi_addon_checker/xml_schema/leia_repository.xsd
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,31 @@
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:element name="extension">
<xs:complexType>
<xs:all>
<xs:element name="info" type="infoItem" minOccurs="1"/>
<xs:element name="checksum" type="checksumItem" minOccurs="1"/>
<xs:element name="datadir" type="datadirItem" minOccurs="1"/>
<xs:element name="artdir" type="xs:string"/>
<xs:element name="hashes" type="xs:string"/>
</xs:all>
<xs:sequence>
<xs:element name="dir" type="dirItem" minOccurs="0" maxOccurs="unbounded"/>
<xs:element name="info" type="infoItem" minOccurs="0" maxOccurs="1"/>
<xs:element name="checksum" type="checksumItem" minOccurs="0" maxOccurs="1"/>
<xs:element name="datadir" type="datadirItem" minOccurs="0" maxOccurs="1"/>
<xs:element name="artdir" type="xs:string" minOccurs="0" maxOccurs="1"/>
<xs:element name="hashes" type="xs:string" minOccurs="0" maxOccurs="1"/>
</xs:sequence>
<xs:attribute name="point" type="xs:string" use="required"/>
<xs:attribute name="id" type="simpleIdentifier"/>
<xs:attribute name="name" type="xs:string"/>
</xs:complexType>
</xs:element>
<xs:complexType name="dirItem">
<xs:group ref="dirItems" />
</xs:complexType>
<xs:group name="dirItems">
<xs:all>
<xs:element name="info" type="infoItem" minOccurs="1"/>
<xs:element name="checksum" type="checksumItem" minOccurs="1"/>
<xs:element name="datadir" type="datadirItem" minOccurs="1"/>
<xs:element name="artdir" type="xs:string" minOccurs="0"/>
<xs:element name="hashes" type="xs:string" minOccurs="0"/>
</xs:all>
</xs:group>
<xs:complexType name="checksumItem">
<xs:simpleContent>
<xs:extension base="xs:string">
Expand Down
59 changes: 59 additions & 0 deletions kodi_addon_checker/xml_schema/matrix_repository.xsd
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE schema PUBLIC "-//W3C//DTD XMLSCHEMA 200102//EN" "http://www.w3.org/2001/XMLSchema.dtd">
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:element name="extension">
<xs:complexType>
<xs:sequence>
<xs:element name="dir" type="dirItem" minOccurs="0" maxOccurs="unbounded"/>
<xs:element name="info" type="infoItem" minOccurs="0" maxOccurs="1"/>
<xs:element name="checksum" type="checksumItem" minOccurs="0" maxOccurs="1"/>
<xs:element name="datadir" type="datadirItem" minOccurs="0" maxOccurs="1"/>
<xs:element name="artdir" type="xs:string" minOccurs="0" maxOccurs="1"/>
<xs:element name="hashes" type="xs:string" minOccurs="0" maxOccurs="1"/>
</xs:sequence>
<xs:attribute name="point" type="xs:string" use="required"/>
<xs:attribute name="id" type="simpleIdentifier"/>
<xs:attribute name="name" type="xs:string"/>
</xs:complexType>
</xs:element>
<xs:complexType name="dirItem">
<xs:group ref="dirItems" />
<xs:attribute name="minversion" type="xs:string"/>
<xs:attribute name="maxversion" type="xs:string"/>
</xs:complexType>
<xs:group name="dirItems">
<xs:all>
<xs:element name="info" type="infoItem" minOccurs="1"/>
<xs:element name="checksum" type="checksumItem" minOccurs="1"/>
<xs:element name="datadir" type="datadirItem" minOccurs="1"/>
<xs:element name="artdir" type="xs:string" minOccurs="0"/>
<xs:element name="hashes" type="xs:string" minOccurs="0"/>
</xs:all>
</xs:group>
<xs:complexType name="checksumItem">
<xs:simpleContent>
<xs:extension base="xs:string">
<xs:attribute name="verify" type="xs:string"/>
</xs:extension>
</xs:simpleContent>
</xs:complexType>
<xs:complexType name="infoItem">
<xs:simpleContent>
<xs:extension base="xs:string">
<xs:attribute name="compressed" type="xs:boolean"/>
</xs:extension>
</xs:simpleContent>
</xs:complexType>
<xs:complexType name="datadirItem">
<xs:simpleContent>
<xs:extension base="xs:string">
<xs:attribute name="zip" type="xs:boolean"/>
</xs:extension>
</xs:simpleContent>
</xs:complexType>
<xs:simpleType name="simpleIdentifier">
<xs:restriction base="xs:string">
<xs:pattern value="xbmc\.addon\.repository"/>
</xs:restriction>
</xs:simpleType>
</xs:schema>
60 changes: 60 additions & 0 deletions kodi_addon_checker/xml_schema/nexus_repository.xsd
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE schema PUBLIC "-//W3C//DTD XMLSCHEMA 200102//EN" "http://www.w3.org/2001/XMLSchema.dtd">
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:element name="extension">
<xs:complexType>
<xs:sequence>
<xs:element name="dir" type="dirItem" minOccurs="1" maxOccurs="unbounded"/>
</xs:sequence>
<xs:attribute name="point" type="xs:string" use="required"/>
<xs:attribute name="id" type="simpleIdentifier"/>
<xs:attribute name="name" type="xs:string"/>
</xs:complexType>
</xs:element>
<xs:complexType name="dirItem">
<xs:group ref="dirItems" />
</xs:complexType>
<xs:simpleType name="hashvalues">
<xs:restriction base="xs:string">
<xs:enumeration value="sha256"/>
<xs:enumeration value="sha512"/>
<xs:enumeration value="sha1"/>
<xs:enumeration value="md5"/>
</xs:restriction>
</xs:simpleType>
<xs:group name="dirItems">
<xs:all>
<xs:element name="info" type="infoItem" minOccurs="1"/>
<xs:element name="checksum" type="checksumItem" minOccurs="1"/>
<xs:element name="datadir" type="datadirItem" minOccurs="1"/>
<xs:element name="artdir" type="xs:string" minOccurs="0"/>
<xs:element name="hashes" type="hashvalues" minOccurs="0"/>
</xs:all>
</xs:group>
<xs:complexType name="checksumItem">
<xs:simpleContent>
<xs:extension base="xs:string">
<xs:attribute name="verify" type="xs:string"/>
</xs:extension>
</xs:simpleContent>
</xs:complexType>
<xs:complexType name="infoItem">
<xs:simpleContent>
<xs:extension base="xs:string">
<xs:attribute name="compressed" type="xs:boolean"/>
</xs:extension>
</xs:simpleContent>
</xs:complexType>
<xs:complexType name="datadirItem">
<xs:simpleContent>
<xs:extension base="xs:string">
<xs:attribute name="zip" type="xs:boolean"/>
</xs:extension>
</xs:simpleContent>
</xs:complexType>
<xs:simpleType name="simpleIdentifier">
<xs:restriction base="xs:string">
<xs:pattern value="xbmc\.addon\.repository"/>
</xs:restriction>
</xs:simpleType>
</xs:schema>

0 comments on commit 3d26214

Please sign in to comment.