├── LICENSE ├── README.md ├── Readme.txt ├── docs (help) ├── Makefile ├── _build │ ├── doctrees │ │ ├── blog.doctree │ │ ├── donate.doctree │ │ ├── environment.pickle │ │ ├── external.doctree │ │ ├── fields.doctree │ │ ├── find.doctree │ │ ├── generate.doctree │ │ ├── index.doctree │ │ ├── properties.doctree │ │ ├── save.doctree │ │ └── why.doctree │ └── html │ │ ├── .buildinfo │ │ ├── Readme.txt │ │ ├── _images │ │ ├── D1.png │ │ ├── D10.png │ │ ├── D11.png │ │ ├── D12.png │ │ ├── D13.png │ │ ├── D14.png │ │ ├── D15.png │ │ ├── D16.png │ │ ├── D17.png │ │ ├── D2.png │ │ ├── D3.png │ │ ├── D4.png │ │ ├── D5.png │ │ ├── D6.png │ │ ├── D7.png │ │ ├── D8.png │ │ ├── D9.png │ │ └── external_link.png │ │ ├── _sources │ │ ├── blog.txt │ │ ├── donate.txt │ │ ├── external.txt │ │ ├── fields.txt │ │ ├── find.txt │ │ ├── generate.txt │ │ ├── index.txt │ │ ├── properties.txt │ │ ├── save.txt │ │ └── why.txt │ │ ├── _static │ │ ├── ajax-loader.gif │ │ ├── basic.css │ │ ├── classic.css │ │ ├── comment-bright.png │ │ ├── comment-close.png │ │ ├── comment.png │ │ ├── default.css │ │ ├── doctools.js │ │ ├── down-pressed.png │ │ ├── down.png │ │ ├── favicon.ico │ │ ├── file.png │ │ ├── jquery.js │ │ ├── minus.png │ │ ├── plus.png │ │ ├── pygments.css │ │ ├── searchtools.js │ │ ├── sidebar.js │ │ ├── underscore.js │ │ ├── up-pressed.png │ │ ├── up.png │ │ └── websupport.js │ │ ├── blog.html │ │ ├── donate.html │ │ ├── external.html │ │ ├── fields.html │ │ ├── find.html │ │ ├── generate.html │ │ ├── genindex.html │ │ ├── index.html │ │ ├── objects.inv │ │ ├── properties.html │ │ ├── save.html │ │ ├── search.html │ │ ├── searchindex.js │ │ └── why.html ├── _templates │ ├── layout.html │ └── localtoc.html ├── blog.rst ├── conf.py ├── donate.rst ├── external.rst ├── extra │ └── Readme.txt ├── fields.rst ├── find.rst ├── generate.rst ├── images │ ├── D1.png │ ├── D10.png │ ├── D11.png │ ├── D12.png │ ├── D13.png │ ├── D14.png │ ├── D15.png │ ├── D16.png │ ├── D17.png │ ├── D2.png │ ├── D3.png │ ├── D4.png │ ├── D5.png │ ├── D6.png │ ├── D7.png │ ├── D8.png │ ├── D9.png │ ├── external_link.png │ └── favicon.ico ├── index.rst ├── properties.rst ├── save.rst └── why.rst ├── docs (technical) ├── Makefile ├── _build │ ├── doctrees │ │ ├── apache.doctree │ │ ├── controller.doctree │ │ ├── environment.pickle │ │ ├── index.doctree │ │ ├── javascript.doctree │ │ ├── model.doctree │ │ ├── schema_bot.doctree │ │ └── view.doctree │ └── html │ │ ├── .buildinfo │ │ ├── Readme.txt │ │ ├── _images │ │ └── external_link.png │ │ ├── _sources │ │ ├── apache.txt │ │ ├── controller.txt │ │ ├── index.txt │ │ ├── javascript.txt │ │ ├── model.txt │ │ ├── schema_bot.txt │ │ └── view.txt │ │ ├── _static │ │ ├── ajax-loader.gif │ │ ├── basic.css │ │ ├── comment-bright.png │ │ ├── comment-close.png │ │ ├── comment.png │ │ ├── default.css │ │ ├── doctools.js │ │ ├── down-pressed.png │ │ ├── down.png │ │ ├── favicon.ico │ │ ├── file.png │ │ ├── jquery.js │ │ ├── minus.png │ │ ├── plus.png │ │ ├── pygments.css │ │ ├── searchtools.js │ │ ├── sidebar.js │ │ ├── underscore.js │ │ ├── up-pressed.png │ │ ├── up.png │ │ └── websupport.js │ │ ├── apache.html │ │ ├── controller.html │ │ ├── genindex.html │ │ ├── index.html │ │ ├── javascript.html │ │ ├── model.html │ │ ├── objects.inv │ │ ├── py-modindex.html │ │ ├── schema_bot.html │ │ ├── search.html │ │ ├── searchindex.js │ │ └── view.html ├── _templates │ └── localtoc.html ├── apache.rst ├── conf.py ├── controller.rst ├── extra │ └── Readme.txt ├── images │ ├── external_link.png │ └── favicon.ico ├── index.rst ├── javascript.rst ├── model.rst ├── schema_bot.rst └── view.rst ├── src ├── Hierarchy.pickle ├── __init__.py ├── __pycache__ │ ├── controller.cpython-34.pyc │ ├── nqparser.cpython-36.pyc │ ├── nqparser.cpython-37.pyc │ ├── schema_bot.cpython-34.pyc │ ├── schema_bot.cpython-35.pyc │ ├── schema_bot.cpython-36.pyc │ └── schema_bot.cpython-37.pyc ├── all-layers.nq ├── controller.py ├── controller.pyc ├── model │ ├── __init__.py │ ├── __pycache__ │ │ ├── __init__.cpython-34.pyc │ │ ├── __init__.cpython-35.pyc │ │ ├── __init__.cpython-36.pyc │ │ ├── __init__.cpython-37.pyc │ │ ├── schema.cpython-34.pyc │ │ ├── schema.cpython-35.pyc │ │ ├── schema.cpython-36.pyc │ │ └── schema.cpython-37.pyc │ └── schema.py ├── nqparser.py ├── ontology.html ├── ontology.js ├── schema_bot.py ├── schemaorg-current-http.nq ├── test.py ├── view │ ├── __init__.py │ ├── __pycache__ │ │ ├── __init__.cpython-34.pyc │ │ ├── __init__.cpython-35.pyc │ │ ├── __init__.cpython-36.pyc │ │ ├── __init__.cpython-37.pyc │ │ ├── schema_view.cpython-34.pyc │ │ ├── schema_view.cpython-35.pyc │ │ ├── schema_view.cpython-36.pyc │ │ └── schema_view.cpython-37.pyc │ ├── external_link.png │ ├── favicon.ico │ ├── gen_style.css │ ├── gredos.jpg │ ├── hierarchy.tpl │ ├── index.html │ ├── logo_gen.jpg │ ├── logo_gen.png │ ├── robots.txt │ ├── schema.js │ ├── schema_bot.html │ ├── schema_bot.js │ ├── schema_header.html │ └── schema_view.py └── wsgi.py └── tests ├── __pycache__ └── test_controller.cpython-34.pyc ├── test_controller.py ├── test_files ├── ajax.html ├── hierarchy.html ├── mo_better_levels.html ├── mo_better_levels_json.html ├── mo_better_levels_micro.html ├── mo_better_levels_rdfa.html ├── one_level.html ├── one_level_json.html ├── one_level_micro.html ├── one_level_rdfa.html ├── test_get_breadcrumbs.html ├── three_level.html ├── three_level_json.html ├── three_level_micro.html ├── three_level_rdfa.html ├── two_level.html ├── two_level_json.html ├── two_level_micro.html └── two_level_rdfa.html ├── test_schema.py └── test_schema_view.py /README.md: -------------------------------------------------------------------------------- 1 | # Schema.org-Generator 2 | Generate valid HTML5 schema's: 3 | 4 | * Microdata 5 | * RDFa 6 | * JSON-LD 7 | 8 | Tool for generating a valid Scheme as proposed by Schema.org: https://schema.pythonanywhere.com/ 9 | 10 | Copyright (C) 2016 - 2021 Hans Polak 11 | 12 | This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. 13 | 14 | This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. 15 | 16 | You should have received a copy of the GNU General Public License along with this program. If not, see . 17 | 18 | __author__ = "Hans Polak" 19 | 20 | __copyright__ = "Copyright 2016 - 2021" 21 | 22 | __credits__ = ["Hans Polak"] 23 | 24 | __license__ = "GNU GPL" 25 | 26 | __version__ = "3.0" 27 | 28 | __maintainer__ = "Hans Polak" 29 | 30 | __email__ = "info@polak.es" 31 | 32 | __status__ = "Stable Release" 33 | 34 | -------------------------------------------------------------------------------- /Readme.txt: -------------------------------------------------------------------------------- 1 | Tool for generating a valid Scheme as proposed by Schema.org 2 | Copyright (C) 2016 - 2021 Hans Polak 3 | 4 | This program is free software: you can redistribute it and/or modify 5 | it under the terms of the GNU General Public License as published by 6 | the Free Software Foundation, either version 3 of the License, or 7 | (at your option) any later version. 8 | 9 | This program is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | GNU General Public License for more details. 13 | 14 | You should have received a copy of the GNU General Public License 15 | along with this program. If not, see . 16 | 17 | __author__ = "Hans Polak" 18 | __copyright__ = "Copyright 2016 - 2021" 19 | __credits__ = ["Hans Polak"] 20 | __license__ = "GNU GPL" 21 | __version__ = "3.0" 22 | __maintainer__ = "Hans Polak" 23 | __email__ = "info@polak.es" 24 | __status__ = "Stable Release" 25 | 26 | -------------------------------------------------------------------------------- /docs (help)/_build/doctrees/blog.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GUI-Junkie/Schema.org-Generator/6e5f915bed963f7e1028927c28eb823ec30ded71/docs (help)/_build/doctrees/blog.doctree -------------------------------------------------------------------------------- /docs (help)/_build/doctrees/donate.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GUI-Junkie/Schema.org-Generator/6e5f915bed963f7e1028927c28eb823ec30ded71/docs (help)/_build/doctrees/donate.doctree -------------------------------------------------------------------------------- /docs (help)/_build/doctrees/environment.pickle: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GUI-Junkie/Schema.org-Generator/6e5f915bed963f7e1028927c28eb823ec30ded71/docs (help)/_build/doctrees/environment.pickle -------------------------------------------------------------------------------- /docs (help)/_build/doctrees/external.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GUI-Junkie/Schema.org-Generator/6e5f915bed963f7e1028927c28eb823ec30ded71/docs (help)/_build/doctrees/external.doctree -------------------------------------------------------------------------------- /docs (help)/_build/doctrees/fields.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GUI-Junkie/Schema.org-Generator/6e5f915bed963f7e1028927c28eb823ec30ded71/docs (help)/_build/doctrees/fields.doctree -------------------------------------------------------------------------------- /docs (help)/_build/doctrees/find.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GUI-Junkie/Schema.org-Generator/6e5f915bed963f7e1028927c28eb823ec30ded71/docs (help)/_build/doctrees/find.doctree -------------------------------------------------------------------------------- /docs (help)/_build/doctrees/generate.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GUI-Junkie/Schema.org-Generator/6e5f915bed963f7e1028927c28eb823ec30ded71/docs (help)/_build/doctrees/generate.doctree -------------------------------------------------------------------------------- /docs (help)/_build/doctrees/index.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GUI-Junkie/Schema.org-Generator/6e5f915bed963f7e1028927c28eb823ec30ded71/docs (help)/_build/doctrees/index.doctree -------------------------------------------------------------------------------- /docs (help)/_build/doctrees/properties.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GUI-Junkie/Schema.org-Generator/6e5f915bed963f7e1028927c28eb823ec30ded71/docs (help)/_build/doctrees/properties.doctree -------------------------------------------------------------------------------- /docs (help)/_build/doctrees/save.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GUI-Junkie/Schema.org-Generator/6e5f915bed963f7e1028927c28eb823ec30ded71/docs (help)/_build/doctrees/save.doctree -------------------------------------------------------------------------------- /docs (help)/_build/doctrees/why.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GUI-Junkie/Schema.org-Generator/6e5f915bed963f7e1028927c28eb823ec30ded71/docs (help)/_build/doctrees/why.doctree -------------------------------------------------------------------------------- /docs (help)/_build/html/.buildinfo: -------------------------------------------------------------------------------- 1 | # Sphinx build info version 1 2 | # This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done. 3 | config: e2433feef4eae0fcfd9c6bd1775289ca 4 | tags: 645f666f9bcd5a90fca523b33c5a78b7 5 | -------------------------------------------------------------------------------- /docs (help)/_build/html/Readme.txt: -------------------------------------------------------------------------------- 1 | Tool for generating a valid Scheme as proposed by Schema.org 2 | Copyright (C) 2016 - 2020 Hans Polak 3 | 4 | This program is free software: you can redistribute it and/or modify 5 | it under the terms of the GNU General Public License as published by 6 | the Free Software Foundation, either version 3 of the License, or 7 | (at your option) any later version. 8 | 9 | This program is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | GNU General Public License for more details. 13 | 14 | You should have received a copy of the GNU General Public License 15 | along with this program. If not, see . 16 | 17 | __author__ = "Hans Polak" 18 | __copyright__ = "Copyright 2016 - 2020" 19 | __credits__ = ["Hans Polak"] 20 | __license__ = "GNU GPL" 21 | __version__ = "3.0" 22 | __maintainer__ = "Hans Polak" 23 | __email__ = "info@polak.es" 24 | __status__ = "Beta testing" 25 | 26 | -------------------------------------------------------------------------------- /docs (help)/_build/html/_images/D1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GUI-Junkie/Schema.org-Generator/6e5f915bed963f7e1028927c28eb823ec30ded71/docs (help)/_build/html/_images/D1.png -------------------------------------------------------------------------------- /docs (help)/_build/html/_images/D10.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GUI-Junkie/Schema.org-Generator/6e5f915bed963f7e1028927c28eb823ec30ded71/docs (help)/_build/html/_images/D10.png -------------------------------------------------------------------------------- /docs (help)/_build/html/_images/D11.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GUI-Junkie/Schema.org-Generator/6e5f915bed963f7e1028927c28eb823ec30ded71/docs (help)/_build/html/_images/D11.png -------------------------------------------------------------------------------- /docs (help)/_build/html/_images/D12.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GUI-Junkie/Schema.org-Generator/6e5f915bed963f7e1028927c28eb823ec30ded71/docs (help)/_build/html/_images/D12.png -------------------------------------------------------------------------------- /docs (help)/_build/html/_images/D13.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GUI-Junkie/Schema.org-Generator/6e5f915bed963f7e1028927c28eb823ec30ded71/docs (help)/_build/html/_images/D13.png -------------------------------------------------------------------------------- /docs (help)/_build/html/_images/D14.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GUI-Junkie/Schema.org-Generator/6e5f915bed963f7e1028927c28eb823ec30ded71/docs (help)/_build/html/_images/D14.png -------------------------------------------------------------------------------- /docs (help)/_build/html/_images/D15.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GUI-Junkie/Schema.org-Generator/6e5f915bed963f7e1028927c28eb823ec30ded71/docs (help)/_build/html/_images/D15.png -------------------------------------------------------------------------------- /docs (help)/_build/html/_images/D16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GUI-Junkie/Schema.org-Generator/6e5f915bed963f7e1028927c28eb823ec30ded71/docs (help)/_build/html/_images/D16.png -------------------------------------------------------------------------------- /docs (help)/_build/html/_images/D17.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GUI-Junkie/Schema.org-Generator/6e5f915bed963f7e1028927c28eb823ec30ded71/docs (help)/_build/html/_images/D17.png -------------------------------------------------------------------------------- /docs (help)/_build/html/_images/D2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GUI-Junkie/Schema.org-Generator/6e5f915bed963f7e1028927c28eb823ec30ded71/docs (help)/_build/html/_images/D2.png -------------------------------------------------------------------------------- /docs (help)/_build/html/_images/D3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GUI-Junkie/Schema.org-Generator/6e5f915bed963f7e1028927c28eb823ec30ded71/docs (help)/_build/html/_images/D3.png -------------------------------------------------------------------------------- /docs (help)/_build/html/_images/D4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GUI-Junkie/Schema.org-Generator/6e5f915bed963f7e1028927c28eb823ec30ded71/docs (help)/_build/html/_images/D4.png -------------------------------------------------------------------------------- /docs (help)/_build/html/_images/D5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GUI-Junkie/Schema.org-Generator/6e5f915bed963f7e1028927c28eb823ec30ded71/docs (help)/_build/html/_images/D5.png -------------------------------------------------------------------------------- /docs (help)/_build/html/_images/D6.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GUI-Junkie/Schema.org-Generator/6e5f915bed963f7e1028927c28eb823ec30ded71/docs (help)/_build/html/_images/D6.png -------------------------------------------------------------------------------- /docs (help)/_build/html/_images/D7.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GUI-Junkie/Schema.org-Generator/6e5f915bed963f7e1028927c28eb823ec30ded71/docs (help)/_build/html/_images/D7.png -------------------------------------------------------------------------------- /docs (help)/_build/html/_images/D8.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GUI-Junkie/Schema.org-Generator/6e5f915bed963f7e1028927c28eb823ec30ded71/docs (help)/_build/html/_images/D8.png -------------------------------------------------------------------------------- /docs (help)/_build/html/_images/D9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GUI-Junkie/Schema.org-Generator/6e5f915bed963f7e1028927c28eb823ec30ded71/docs (help)/_build/html/_images/D9.png -------------------------------------------------------------------------------- /docs (help)/_build/html/_images/external_link.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GUI-Junkie/Schema.org-Generator/6e5f915bed963f7e1028927c28eb823ec30ded71/docs (help)/_build/html/_images/external_link.png -------------------------------------------------------------------------------- /docs (help)/_build/html/_sources/blog.txt: -------------------------------------------------------------------------------- 1 | Pick a schema 2 | ============= 3 | 4 | We'll pick ``Blog`` as an example 5 | 6 | .. raw:: html 7 | 8 | Blog 9 | 10 | Having chosen a schema, we can now see the properties of the schema. We can also observe the ``Save Schema`` and ``Generate Schema`` buttons appearing. More on these later. 11 | 12 | .. raw:: html 13 | 14 | Blog Properties 15 | 16 | Links with the |external_link| image will lead to a |schema.org| |external_link| page in a different tab for further information. :doc:`external` 17 | 18 | Links without this |external_link| image will show the properties of that schema. For instance the first property of ``Blog`` is ``about``. ``about`` is a ``Thing``. Clicking on ``Thing`` will show the properties of ``Thing``. 19 | 20 | :doc:`properties` 21 | 22 | -------------------------------------------------------------------------------- /docs (help)/_build/html/_sources/donate.txt: -------------------------------------------------------------------------------- 1 | Donations 2 | ========= 3 | 4 | Considerable effort has gone into writing this software which I'm releasing under the terms of the GNU General Public License. 5 | 6 | If you find this software useful, don't hesitate to make a financial contribution by clicking on the **Donate** button below. 7 | 8 | If you would like additional features, I'm a freelance developer and I can bill internationally. 9 | -------------------------------------------------------------------------------- /docs (help)/_build/html/_sources/external.txt: -------------------------------------------------------------------------------- 1 | External links 2 | ============== 3 | 4 | Links marked with the |external_link| icon will lead to the |schema.org| |external_link| website. 5 | 6 | .. raw:: html 7 | 8 | about link 9 | 10 | This will open a new tab with additional information. 11 | 12 | .. raw:: html 13 | 14 | Schema.org 'about' 15 | -------------------------------------------------------------------------------- /docs (help)/_build/html/_sources/fields.txt: -------------------------------------------------------------------------------- 1 | Fill out the properties 2 | ======================= 3 | 4 | Just type the info in the fields you **want** to show (to the Search Engines) 5 | 6 | .. raw:: html 7 | 8 | Fields 9 | 10 | Now, it's possible to :doc:`save` or :doc:`generate` 11 | -------------------------------------------------------------------------------- /docs (help)/_build/html/_sources/find.txt: -------------------------------------------------------------------------------- 1 | Find a Schema 2 | ============= 3 | 4 | Visit the |generator_tool| |external_link| website and choose the top level schema which is most adjusted to your (client's) needs. Next, we'll need to :doc:`blog` 5 | 6 | .. raw:: html 7 | 8 | Generator Tool 9 | 10 | .. |generator_tool| raw:: html 11 | 12 | Generator Tool 13 | -------------------------------------------------------------------------------- /docs (help)/_build/html/_sources/generate.txt: -------------------------------------------------------------------------------- 1 | Generate Schema Button 2 | ====================== 3 | 4 | Once you have generated your schema's markup, you can then go and test it. 5 | 6 | .. raw:: html 7 | 8 | Generated output 9 | 10 | Test at |Structured Data Testing Tool| |external_link| 11 | 12 | .. raw:: html 13 | 14 | Link to the testing tool

15 | 16 | 17 | Validate the Schema 18 | =================== 19 | 20 | You can easily test your schema by copying it and paste it in the |Structured Data Testing Tool| |external_link| 21 | 22 | .. raw:: html 23 | 24 | The testing tool

25 | 26 | .. raw:: html 27 | 28 | Paste the generated output

29 | 30 | .. raw:: html 31 | 32 | Validated output 33 | 34 | |All good|? Done! 35 | 36 | .. |All good| raw:: html 37 | 38 | 42 | All good All good  43 | 44 | Now, you can start to add this markup to your own websites as |shown here| 45 | 46 | .. |shown here| raw:: html 47 | 48 | shown here 49 | 50 | Some schema's have mandatory fields. The |Structured Data Testing Tool| |external_link| will highlight these. You can add these fields by using the ``back`` button of the navigator you're using. At this moment, this tool has no way of knowing which fields are mandatory. It's trial and error. 51 | -------------------------------------------------------------------------------- /docs (help)/_build/html/_sources/index.txt: -------------------------------------------------------------------------------- 1 | .. Schema documentation master file, created by 2 | sphinx-quickstart on Sat Feb 13 13:27:50 2016. 3 | You can adapt this file completely to your liking, but it should at least 4 | contain the root `toctree` directive. 5 | 6 | Welcome to the `Schema Generator` help! 7 | ======================================= 8 | 9 | I'm assuming the reader is familiar with |html| |external_link| 10 | 11 | .. toctree:: 12 | :maxdepth: 3 13 | 14 | why 15 | find 16 | blog 17 | properties 18 | fields 19 | save 20 | generate 21 | external 22 | donate 23 | 24 | Where is the tool? 25 | ================== 26 | 27 | You can use the |Schema Generator| |external_link| 28 | 29 | Indices and tables 30 | ================== 31 | 32 | * :ref:`genindex` 33 | * :ref:`modindex` 34 | * :ref:`search` 35 | 36 | .. |Readme.txt| raw:: html 37 | 38 | Readme.txt 39 | 40 | -------------------------------------------------------------------------------- /docs (help)/_build/html/_sources/properties.txt: -------------------------------------------------------------------------------- 1 | Show properties 2 | =============== 3 | 4 | ``accountablePerson`` is a ``Person`` 5 | 6 | .. raw:: html 7 | 8 | Person 9 | 10 | By clicking on ``Person``, we can now see the properties of the schema. 11 | 12 | .. raw:: html 13 | 14 | Person properties 15 | 16 | We can add more information as needed. ``Person`` has a ``PostalAddress`` 17 | 18 | .. raw:: html 19 | 20 | Person PostalAddress 21 | 22 | .. raw:: html 23 | 24 | Person PostalAddress properties 25 | 26 | Now, we can start to fill out the text fields with the information we **want** to share with the Search Engines. Most fields are optional, but we'll see that later. 27 | 28 | :doc:`fields` 29 | -------------------------------------------------------------------------------- /docs (help)/_build/html/_sources/save.txt: -------------------------------------------------------------------------------- 1 | Save Schema to LocalStorage 2 | =========================== 3 | 4 | Schema Generator can store the data in the browser. This way, the user can continue to work on the schema, adding more fields as needed. 5 | 6 | .. raw:: html 7 | 8 | Saved 9 | 10 | 11 | Recover Data button 12 | =================== 13 | 14 | Clicking the ``Recover Data`` button will take us right back to :doc:`fields` 15 | 16 | Clear Data button 17 | ================= 18 | 19 | Clicking the ``Clear Data`` button will delete all information saved in LocalStorage. 20 | -------------------------------------------------------------------------------- /docs (help)/_build/html/_sources/why.txt: -------------------------------------------------------------------------------- 1 | Why would you use this software? 2 | ================================ 3 | 4 | "|Schema.org| |external_link| *is a collaborative, community activity with a mission to create, maintain, and promote schema's for structured data on the Internet*" This '*structured data*' helps Search Engines to obtain meaningful information from your website, even if this is ``hidden`` from the user of the website. This can improve the SEO of the websites you maintain. 5 | 6 | Depending on your needs, you could use other, existing, tools for adding |Schema.org| |external_link| schemas to your website. *This tool* aims to provide valid |HTML| |external_link| markup that can be used to integrate these schema's into your website. 7 | 8 | Example output 9 | ============== 10 | 11 | Let's look at a quick example. The first HTML block is generated with this tool, the following two blocks are possible transformations. 12 | 13 | For instance 14 | 15 | .. raw:: html 16 | 17 |
<div itemscope itemtype="http://schema.org/Park">
18 |         <div itemprop=geo itemscope itemtype="http://schema.org/GeoCoordinates">
19 |             <span itemprop="latitude">44.4279668</span>
20 |             <span itemprop="longitude">-110.5906437</span>
21 |         </div>
22 |         <span itemprop="hasMap">http://www.nps.gov/common/commonspot/customcf/apps/maps/showmap.cfm?alphacode=yell&parkname=Yellowstone</span>
23 |         <span itemprop="name">Yellowstone</span>
24 |         <span itemprop="url">http://www.nps.gov/yell/index.htm</span>
25 |     </div>
26 |     
27 |
28 | 29 | can be changed into 30 | 31 | .. code-block:: html 32 | 33 | 34 |

Yellowstone

35 |
36 | Latitude: 44.4279668
37 | Longitude: -110.5906437
38 |
39 |
40 | 41 |
42 | 43 | 44 | 45 | The ``hidden`` keyword can be used to hide some information from the markup, while still allowing Search Engines to find this information. 46 | 47 | .. code-block:: html 48 | 49 | 50 |

Yellowstone

51 | 55 |
56 | 57 |
58 | 59 | 60 | 61 | All three HTML blocks can be validated with the |Structured Data Testing Tool| |external_link|. 62 | 63 | Multiple schemas can be used simultaneously on one page. For instance, a |LocalBusiness| |external_link| can sell different products (|OfferCatalog| |external_link|). 64 | 65 | .. |LocalBusiness| raw:: html 66 | 67 | LocalBusiness 68 | 69 | .. |OfferCatalog| raw:: html 70 | 71 | OfferCatalog 72 | -------------------------------------------------------------------------------- /docs (help)/_build/html/_static/ajax-loader.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GUI-Junkie/Schema.org-Generator/6e5f915bed963f7e1028927c28eb823ec30ded71/docs (help)/_build/html/_static/ajax-loader.gif -------------------------------------------------------------------------------- /docs (help)/_build/html/_static/classic.css: -------------------------------------------------------------------------------- 1 | /* 2 | * default.css_t 3 | * ~~~~~~~~~~~~~ 4 | * 5 | * Sphinx stylesheet -- default theme. 6 | * 7 | * :copyright: Copyright 2007-2016 by the Sphinx team, see AUTHORS. 8 | * :license: BSD, see LICENSE for details. 9 | * 10 | */ 11 | 12 | @import url("basic.css"); 13 | 14 | /* -- page layout ----------------------------------------------------------- */ 15 | 16 | body { 17 | font-family: sans-serif; 18 | font-size: 100%; 19 | background-color: #11303d; 20 | color: #000; 21 | margin: 0; 22 | padding: 0; 23 | } 24 | 25 | div.document { 26 | background-color: #1c4e63; 27 | } 28 | 29 | div.documentwrapper { 30 | float: left; 31 | width: 100%; 32 | } 33 | 34 | div.bodywrapper { 35 | margin: 0 0 0 230px; 36 | } 37 | 38 | div.body { 39 | background-color: #ffffff; 40 | color: #000000; 41 | padding: 0 20px 30px 20px; 42 | } 43 | 44 | div.footer { 45 | color: #ffffff; 46 | width: 100%; 47 | padding: 9px 0 9px 0; 48 | text-align: center; 49 | font-size: 75%; 50 | } 51 | 52 | div.footer a { 53 | color: #ffffff; 54 | text-decoration: underline; 55 | } 56 | 57 | div.related { 58 | background-color: #133f52; 59 | line-height: 30px; 60 | color: #ffffff; 61 | } 62 | 63 | div.related a { 64 | color: #ffffff; 65 | } 66 | 67 | div.sphinxsidebar { 68 | } 69 | 70 | div.sphinxsidebar h3 { 71 | font-family: 'Trebuchet MS', sans-serif; 72 | color: #ffffff; 73 | font-size: 1.4em; 74 | font-weight: normal; 75 | margin: 0; 76 | padding: 0; 77 | } 78 | 79 | div.sphinxsidebar h3 a { 80 | color: #ffffff; 81 | } 82 | 83 | div.sphinxsidebar h4 { 84 | font-family: 'Trebuchet MS', sans-serif; 85 | color: #ffffff; 86 | font-size: 1.3em; 87 | font-weight: normal; 88 | margin: 5px 0 0 0; 89 | padding: 0; 90 | } 91 | 92 | div.sphinxsidebar p { 93 | color: #ffffff; 94 | } 95 | 96 | div.sphinxsidebar p.topless { 97 | margin: 5px 10px 10px 10px; 98 | } 99 | 100 | div.sphinxsidebar ul { 101 | margin: 10px; 102 | padding: 0; 103 | color: #ffffff; 104 | } 105 | 106 | div.sphinxsidebar a { 107 | color: #98dbcc; 108 | } 109 | 110 | div.sphinxsidebar input { 111 | border: 1px solid #98dbcc; 112 | font-family: sans-serif; 113 | font-size: 1em; 114 | } 115 | 116 | 117 | 118 | /* -- hyperlink styles ------------------------------------------------------ */ 119 | 120 | a { 121 | color: #355f7c; 122 | text-decoration: none; 123 | } 124 | 125 | a:visited { 126 | color: #355f7c; 127 | text-decoration: none; 128 | } 129 | 130 | a:hover { 131 | text-decoration: underline; 132 | } 133 | 134 | 135 | 136 | /* -- body styles ----------------------------------------------------------- */ 137 | 138 | div.body h1, 139 | div.body h2, 140 | div.body h3, 141 | div.body h4, 142 | div.body h5, 143 | div.body h6 { 144 | font-family: 'Trebuchet MS', sans-serif; 145 | background-color: #f2f2f2; 146 | font-weight: normal; 147 | color: #20435c; 148 | border-bottom: 1px solid #ccc; 149 | margin: 20px -20px 10px -20px; 150 | padding: 3px 0 3px 10px; 151 | } 152 | 153 | div.body h1 { margin-top: 0; font-size: 200%; } 154 | div.body h2 { font-size: 160%; } 155 | div.body h3 { font-size: 140%; } 156 | div.body h4 { font-size: 120%; } 157 | div.body h5 { font-size: 110%; } 158 | div.body h6 { font-size: 100%; } 159 | 160 | a.headerlink { 161 | color: #c60f0f; 162 | font-size: 0.8em; 163 | padding: 0 4px 0 4px; 164 | text-decoration: none; 165 | } 166 | 167 | a.headerlink:hover { 168 | background-color: #c60f0f; 169 | color: white; 170 | } 171 | 172 | div.body p, div.body dd, div.body li, div.body blockquote { 173 | text-align: justify; 174 | line-height: 130%; 175 | } 176 | 177 | div.admonition p.admonition-title + p { 178 | display: inline; 179 | } 180 | 181 | div.admonition p { 182 | margin-bottom: 5px; 183 | } 184 | 185 | div.admonition pre { 186 | margin-bottom: 5px; 187 | } 188 | 189 | div.admonition ul, div.admonition ol { 190 | margin-bottom: 5px; 191 | } 192 | 193 | div.note { 194 | background-color: #eee; 195 | border: 1px solid #ccc; 196 | } 197 | 198 | div.seealso { 199 | background-color: #ffc; 200 | border: 1px solid #ff6; 201 | } 202 | 203 | div.topic { 204 | background-color: #eee; 205 | } 206 | 207 | div.warning { 208 | background-color: #ffe4e4; 209 | border: 1px solid #f66; 210 | } 211 | 212 | p.admonition-title { 213 | display: inline; 214 | } 215 | 216 | p.admonition-title:after { 217 | content: ":"; 218 | } 219 | 220 | pre { 221 | padding: 5px; 222 | background-color: #eeffcc; 223 | color: #333333; 224 | line-height: 120%; 225 | border: 1px solid #ac9; 226 | border-left: none; 227 | border-right: none; 228 | } 229 | 230 | code { 231 | background-color: #ecf0f3; 232 | padding: 0 1px 0 1px; 233 | font-size: 0.95em; 234 | } 235 | 236 | th { 237 | background-color: #ede; 238 | } 239 | 240 | .warning code { 241 | background: #efc2c2; 242 | } 243 | 244 | .note code { 245 | background: #d6d6d6; 246 | } 247 | 248 | .viewcode-back { 249 | font-family: sans-serif; 250 | } 251 | 252 | div.viewcode-block:target { 253 | background-color: #f4debf; 254 | border-top: 1px solid #ac9; 255 | border-bottom: 1px solid #ac9; 256 | } 257 | 258 | div.code-block-caption { 259 | color: #efefef; 260 | background-color: #1c4e63; 261 | } -------------------------------------------------------------------------------- /docs (help)/_build/html/_static/comment-bright.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GUI-Junkie/Schema.org-Generator/6e5f915bed963f7e1028927c28eb823ec30ded71/docs (help)/_build/html/_static/comment-bright.png -------------------------------------------------------------------------------- /docs (help)/_build/html/_static/comment-close.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GUI-Junkie/Schema.org-Generator/6e5f915bed963f7e1028927c28eb823ec30ded71/docs (help)/_build/html/_static/comment-close.png -------------------------------------------------------------------------------- /docs (help)/_build/html/_static/comment.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GUI-Junkie/Schema.org-Generator/6e5f915bed963f7e1028927c28eb823ec30ded71/docs (help)/_build/html/_static/comment.png -------------------------------------------------------------------------------- /docs (help)/_build/html/_static/default.css: -------------------------------------------------------------------------------- 1 | @import url("classic.css"); 2 | -------------------------------------------------------------------------------- /docs (help)/_build/html/_static/down-pressed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GUI-Junkie/Schema.org-Generator/6e5f915bed963f7e1028927c28eb823ec30ded71/docs (help)/_build/html/_static/down-pressed.png -------------------------------------------------------------------------------- /docs (help)/_build/html/_static/down.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GUI-Junkie/Schema.org-Generator/6e5f915bed963f7e1028927c28eb823ec30ded71/docs (help)/_build/html/_static/down.png -------------------------------------------------------------------------------- /docs (help)/_build/html/_static/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GUI-Junkie/Schema.org-Generator/6e5f915bed963f7e1028927c28eb823ec30ded71/docs (help)/_build/html/_static/favicon.ico -------------------------------------------------------------------------------- /docs (help)/_build/html/_static/file.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GUI-Junkie/Schema.org-Generator/6e5f915bed963f7e1028927c28eb823ec30ded71/docs (help)/_build/html/_static/file.png -------------------------------------------------------------------------------- /docs (help)/_build/html/_static/minus.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GUI-Junkie/Schema.org-Generator/6e5f915bed963f7e1028927c28eb823ec30ded71/docs (help)/_build/html/_static/minus.png -------------------------------------------------------------------------------- /docs (help)/_build/html/_static/plus.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GUI-Junkie/Schema.org-Generator/6e5f915bed963f7e1028927c28eb823ec30ded71/docs (help)/_build/html/_static/plus.png -------------------------------------------------------------------------------- /docs (help)/_build/html/_static/pygments.css: -------------------------------------------------------------------------------- 1 | .highlight .hll { background-color: #ffffcc } 2 | .highlight { background: #eeffcc; } 3 | .highlight .c { color: #408090; font-style: italic } /* Comment */ 4 | .highlight .err { border: 1px solid #FF0000 } /* Error */ 5 | .highlight .k { color: #007020; font-weight: bold } /* Keyword */ 6 | .highlight .o { color: #666666 } /* Operator */ 7 | .highlight .ch { color: #408090; font-style: italic } /* Comment.Hashbang */ 8 | .highlight .cm { color: #408090; font-style: italic } /* Comment.Multiline */ 9 | .highlight .cp { color: #007020 } /* Comment.Preproc */ 10 | .highlight .cpf { color: #408090; font-style: italic } /* Comment.PreprocFile */ 11 | .highlight .c1 { color: #408090; font-style: italic } /* Comment.Single */ 12 | .highlight .cs { color: #408090; background-color: #fff0f0 } /* Comment.Special */ 13 | .highlight .gd { color: #A00000 } /* Generic.Deleted */ 14 | .highlight .ge { font-style: italic } /* Generic.Emph */ 15 | .highlight .gr { color: #FF0000 } /* Generic.Error */ 16 | .highlight .gh { color: #000080; font-weight: bold } /* Generic.Heading */ 17 | .highlight .gi { color: #00A000 } /* Generic.Inserted */ 18 | .highlight .go { color: #333333 } /* Generic.Output */ 19 | .highlight .gp { color: #c65d09; font-weight: bold } /* Generic.Prompt */ 20 | .highlight .gs { font-weight: bold } /* Generic.Strong */ 21 | .highlight .gu { color: #800080; font-weight: bold } /* Generic.Subheading */ 22 | .highlight .gt { color: #0044DD } /* Generic.Traceback */ 23 | .highlight .kc { color: #007020; font-weight: bold } /* Keyword.Constant */ 24 | .highlight .kd { color: #007020; font-weight: bold } /* Keyword.Declaration */ 25 | .highlight .kn { color: #007020; font-weight: bold } /* Keyword.Namespace */ 26 | .highlight .kp { color: #007020 } /* Keyword.Pseudo */ 27 | .highlight .kr { color: #007020; font-weight: bold } /* Keyword.Reserved */ 28 | .highlight .kt { color: #902000 } /* Keyword.Type */ 29 | .highlight .m { color: #208050 } /* Literal.Number */ 30 | .highlight .s { color: #4070a0 } /* Literal.String */ 31 | .highlight .na { color: #4070a0 } /* Name.Attribute */ 32 | .highlight .nb { color: #007020 } /* Name.Builtin */ 33 | .highlight .nc { color: #0e84b5; font-weight: bold } /* Name.Class */ 34 | .highlight .no { color: #60add5 } /* Name.Constant */ 35 | .highlight .nd { color: #555555; font-weight: bold } /* Name.Decorator */ 36 | .highlight .ni { color: #d55537; font-weight: bold } /* Name.Entity */ 37 | .highlight .ne { color: #007020 } /* Name.Exception */ 38 | .highlight .nf { color: #06287e } /* Name.Function */ 39 | .highlight .nl { color: #002070; font-weight: bold } /* Name.Label */ 40 | .highlight .nn { color: #0e84b5; font-weight: bold } /* Name.Namespace */ 41 | .highlight .nt { color: #062873; font-weight: bold } /* Name.Tag */ 42 | .highlight .nv { color: #bb60d5 } /* Name.Variable */ 43 | .highlight .ow { color: #007020; font-weight: bold } /* Operator.Word */ 44 | .highlight .w { color: #bbbbbb } /* Text.Whitespace */ 45 | .highlight .mb { color: #208050 } /* Literal.Number.Bin */ 46 | .highlight .mf { color: #208050 } /* Literal.Number.Float */ 47 | .highlight .mh { color: #208050 } /* Literal.Number.Hex */ 48 | .highlight .mi { color: #208050 } /* Literal.Number.Integer */ 49 | .highlight .mo { color: #208050 } /* Literal.Number.Oct */ 50 | .highlight .sb { color: #4070a0 } /* Literal.String.Backtick */ 51 | .highlight .sc { color: #4070a0 } /* Literal.String.Char */ 52 | .highlight .sd { color: #4070a0; font-style: italic } /* Literal.String.Doc */ 53 | .highlight .s2 { color: #4070a0 } /* Literal.String.Double */ 54 | .highlight .se { color: #4070a0; font-weight: bold } /* Literal.String.Escape */ 55 | .highlight .sh { color: #4070a0 } /* Literal.String.Heredoc */ 56 | .highlight .si { color: #70a0d0; font-style: italic } /* Literal.String.Interpol */ 57 | .highlight .sx { color: #c65d09 } /* Literal.String.Other */ 58 | .highlight .sr { color: #235388 } /* Literal.String.Regex */ 59 | .highlight .s1 { color: #4070a0 } /* Literal.String.Single */ 60 | .highlight .ss { color: #517918 } /* Literal.String.Symbol */ 61 | .highlight .bp { color: #007020 } /* Name.Builtin.Pseudo */ 62 | .highlight .vc { color: #bb60d5 } /* Name.Variable.Class */ 63 | .highlight .vg { color: #bb60d5 } /* Name.Variable.Global */ 64 | .highlight .vi { color: #bb60d5 } /* Name.Variable.Instance */ 65 | .highlight .il { color: #208050 } /* Literal.Number.Integer.Long */ -------------------------------------------------------------------------------- /docs (help)/_build/html/_static/sidebar.js: -------------------------------------------------------------------------------- 1 | /* 2 | * sidebar.js 3 | * ~~~~~~~~~~ 4 | * 5 | * This script makes the Sphinx sidebar collapsible. 6 | * 7 | * .sphinxsidebar contains .sphinxsidebarwrapper. This script adds 8 | * in .sphixsidebar, after .sphinxsidebarwrapper, the #sidebarbutton 9 | * used to collapse and expand the sidebar. 10 | * 11 | * When the sidebar is collapsed the .sphinxsidebarwrapper is hidden 12 | * and the width of the sidebar and the margin-left of the document 13 | * are decreased. When the sidebar is expanded the opposite happens. 14 | * This script saves a per-browser/per-session cookie used to 15 | * remember the position of the sidebar among the pages. 16 | * Once the browser is closed the cookie is deleted and the position 17 | * reset to the default (expanded). 18 | * 19 | * :copyright: Copyright 2007-2016 by the Sphinx team, see AUTHORS. 20 | * :license: BSD, see LICENSE for details. 21 | * 22 | */ 23 | 24 | $(function() { 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | // global elements used by the functions. 34 | // the 'sidebarbutton' element is defined as global after its 35 | // creation, in the add_sidebar_button function 36 | var bodywrapper = $('.bodywrapper'); 37 | var sidebar = $('.sphinxsidebar'); 38 | var sidebarwrapper = $('.sphinxsidebarwrapper'); 39 | 40 | // for some reason, the document has no sidebar; do not run into errors 41 | if (!sidebar.length) return; 42 | 43 | // original margin-left of the bodywrapper and width of the sidebar 44 | // with the sidebar expanded 45 | var bw_margin_expanded = bodywrapper.css('margin-left'); 46 | var ssb_width_expanded = sidebar.width(); 47 | 48 | // margin-left of the bodywrapper and width of the sidebar 49 | // with the sidebar collapsed 50 | var bw_margin_collapsed = '.8em'; 51 | var ssb_width_collapsed = '.8em'; 52 | 53 | // colors used by the current theme 54 | var dark_color = $('.related').css('background-color'); 55 | var light_color = $('.document').css('background-color'); 56 | 57 | function sidebar_is_collapsed() { 58 | return sidebarwrapper.is(':not(:visible)'); 59 | } 60 | 61 | function toggle_sidebar() { 62 | if (sidebar_is_collapsed()) 63 | expand_sidebar(); 64 | else 65 | collapse_sidebar(); 66 | } 67 | 68 | function collapse_sidebar() { 69 | sidebarwrapper.hide(); 70 | sidebar.css('width', ssb_width_collapsed); 71 | bodywrapper.css('margin-left', bw_margin_collapsed); 72 | sidebarbutton.css({ 73 | 'margin-left': '0', 74 | 'height': bodywrapper.height() 75 | }); 76 | sidebarbutton.find('span').text('»'); 77 | sidebarbutton.attr('title', _('Expand sidebar')); 78 | document.cookie = 'sidebar=collapsed'; 79 | } 80 | 81 | function expand_sidebar() { 82 | bodywrapper.css('margin-left', bw_margin_expanded); 83 | sidebar.css('width', ssb_width_expanded); 84 | sidebarwrapper.show(); 85 | sidebarbutton.css({ 86 | 'margin-left': ssb_width_expanded-12, 87 | 'height': bodywrapper.height() 88 | }); 89 | sidebarbutton.find('span').text('«'); 90 | sidebarbutton.attr('title', _('Collapse sidebar')); 91 | document.cookie = 'sidebar=expanded'; 92 | } 93 | 94 | function add_sidebar_button() { 95 | sidebarwrapper.css({ 96 | 'float': 'left', 97 | 'margin-right': '0', 98 | 'width': ssb_width_expanded - 28 99 | }); 100 | // create the button 101 | sidebar.append( 102 | '
«
' 103 | ); 104 | var sidebarbutton = $('#sidebarbutton'); 105 | light_color = sidebarbutton.css('background-color'); 106 | // find the height of the viewport to center the '<<' in the page 107 | var viewport_height; 108 | if (window.innerHeight) 109 | viewport_height = window.innerHeight; 110 | else 111 | viewport_height = $(window).height(); 112 | sidebarbutton.find('span').css({ 113 | 'display': 'block', 114 | 'margin-top': (viewport_height - sidebar.position().top - 20) / 2 115 | }); 116 | 117 | sidebarbutton.click(toggle_sidebar); 118 | sidebarbutton.attr('title', _('Collapse sidebar')); 119 | sidebarbutton.css({ 120 | 'color': '#FFFFFF', 121 | 'border-left': '1px solid ' + dark_color, 122 | 'font-size': '1.2em', 123 | 'cursor': 'pointer', 124 | 'height': bodywrapper.height(), 125 | 'padding-top': '1px', 126 | 'margin-left': ssb_width_expanded - 12 127 | }); 128 | 129 | sidebarbutton.hover( 130 | function () { 131 | $(this).css('background-color', dark_color); 132 | }, 133 | function () { 134 | $(this).css('background-color', light_color); 135 | } 136 | ); 137 | } 138 | 139 | function set_position_from_cookie() { 140 | if (!document.cookie) 141 | return; 142 | var items = document.cookie.split(';'); 143 | for(var k=0; k 3 | 4 | 5 | 6 | 7 | 8 | 9 | Donations — Schema Generator 0.1 documentation 10 | 11 | 12 | 13 | 14 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 43 | 44 |
45 |
46 |
47 |
48 | 49 |
50 |

Donations

51 |

Considerable effort has gone into writing this software which I’m releasing under the terms of the GNU General Public License.

52 |

If you find this software useful, don’t hesitate to make a financial contribution by clicking on the Donate button below.

53 |

If you would like additional features, I’m a freelance developer and I can bill internationally.

54 |
55 | 56 | 57 |
58 |
59 |
60 |
61 |
62 |

Table Of Contents

63 | 78 | 79 |

Previous topic

80 |

External links

82 |
83 |

This Page

84 | 88 |
89 | 101 | 102 |
103 |
104 |
105 |
106 | 118 | 122 | 131 | 132 | 133 | -------------------------------------------------------------------------------- /docs (help)/_build/html/genindex.html: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | Index — Schema Generator 0.1 documentation 11 | 12 | 13 | 14 | 15 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 40 | 41 |
42 |
43 |
44 |
45 | 46 | 47 |

Index

48 | 49 |
50 | 51 |
52 | 53 | 54 |
55 |
56 |
57 |
58 |
59 |

Table Of Contents

60 | 75 | 76 | 88 | 89 |
90 |
91 |
92 |
93 | 102 | 106 | 115 | 116 | -------------------------------------------------------------------------------- /docs (help)/_build/html/objects.inv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GUI-Junkie/Schema.org-Generator/6e5f915bed963f7e1028927c28eb823ec30ded71/docs (help)/_build/html/objects.inv -------------------------------------------------------------------------------- /docs (help)/_build/html/search.html: -------------------------------------------------------------------------------- 1 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | Search — Schema Generator 0.1 documentation 10 | 11 | 12 | 13 | 14 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 47 | 48 |
49 |
50 |
51 |
52 | 53 |

Search

54 |
55 | 56 |

57 | Please activate JavaScript to enable the search 58 | functionality. 59 |

60 |
61 |

62 | From here you can search these documents. Enter your search 63 | words into the box below and click "search". Note that the search 64 | function will automatically search for all of the words. Pages 65 | containing fewer words won't appear in the result list. 66 |

67 |
68 | 69 | 70 | 71 |
72 | 73 |
74 | 75 |
76 | 77 |
78 |
79 |
80 | 101 |
102 |
103 | 112 | 116 | 125 | 126 | -------------------------------------------------------------------------------- /docs (help)/_build/html/searchindex.js: -------------------------------------------------------------------------------- 1 | Search.setIndex({envversion:47,filenames:["blog","donate","external","fields","find","generate","index","properties","save","why"],objects:{},objnames:{},objtypes:{},terms:{"class":9,"new":2,"public":1,"while":9,about:0,accountableperson:7,activ:9,add:[5,7],addit:[1,2],adjust:4,aim:9,all:[5,8,9],allow:9,alphacod:9,also:0,amp:9,app:9,appear:0,applic:[0,1,2,3,4,5,6,7,8,9],assum:6,back:[5,8],below:1,bill:1,block:9,blog:0,bodi:9,bot:[0,1,2,3,4,5,6,7,8,9],browser:8,button:[0,1,3],can:[0,1,5,6,7,8,9],cfm:9,chang:9,choos:4,chosen:0,clear:6,click:[0,1,7,8],client:4,collabor:9,common:9,commonspot:9,commun:9,consider:1,continu:8,contribut:1,control:[0,1,2,3,4,5,6,7,8,9],copi:5,could:9,creat:9,customcf:9,data:[0,1,2,3,4,5,6,7],delet:8,depend:9,develop:1,differ:[0,9],div:9,don:1,done:5,easili:5,effort:1,engin:[3,7,9],error:5,even:9,exampl:[0,6],exist:9,extern:0,familiar:6,featur:1,field:[3,5,7,8],financi:1,find:1,first:[0,9],follow:9,freelanc:1,from:9,further:0,gener:[0,1,2,3,4],geo:9,geocoordin:9,gnu:1,gone:1,good:5,gov:9,hasmap:9,have:[0,5],here:5,hesit:1,hidden:9,hide:9,highlight:5,href:9,htm:9,html:[0,1,2,3,4,5,6,7,8,9],http:9,icon:2,ifram:9,imag:0,improv:9,index:[6,9],info:3,inform:[0,2,7,8,9],instanc:[0,9],integr:9,internation:1,internet:9,itemprop:9,itemscop:9,itemtyp:9,javascript:[0,1,2,3,4,5,6,7,8,9],just:3,keyword:9,know:5,later:[0,7],latitud:9,lead:[0,2],let:9,level:4,licens:1,like:1,link:0,localbusi:9,localstorag:[3,6],longitud:9,look:9,maintain:9,make:1,mandatori:5,map:9,mark:2,markup:[5,9],meaning:9,mission:9,model:[0,1,2,3,4,5,6,7,8,9],modul:6,moment:5,more:[0,7,8],most:[4,7],multipl:9,name:9,navig:5,nbsp:5,need:[4,7,8,9],next:4,now:[0,3,5,7],observ:0,obtain:9,offercatalog:9,onc:5,open:2,option:7,org:[0,1,2,3,4,5,6,7,8,9],other:9,output:6,own:5,page:[0,6,9],park:9,parknam:9,past:5,person:7,possibl:[3,9],postaladdress:7,product:9,promot:9,properti:0,provid:9,quick:9,quot:9,reader:6,readm:6,recov:6,releas:1,right:8,save:[0,3,6],search:[3,6,7,9],see:[0,7],sell:9,seo:9,server:[0,1,2,3,4,5,6,7,8,9],share:7,show:[0,3,6],showmap:9,shown:5,simultan:9,site:9,softwar:[1,6],some:[5,9],span:9,src:9,start:[5,7],still:9,store:8,structur:[0,1,2,3,4,5,6,7,8,9],tab:[0,2],take:8,term:1,test:[0,1,2,3,4,5,6,7,8,9],text:7,thi:[0,1,2,5,6,8],thing:0,three:9,tool:[0,1,2,3,4,5],top:4,transform:9,trial:5,two:9,txt:6,type:3,under:1,url:9,user:[8,9],view:[0,1,2,3,4,5,6,7,8,9],visit:4,wai:[5,8],want:[3,7],web:[0,1,2,3,4,5,6,7,8,9],websit:[2,4,5,9],which:[1,4,5],why:6,without:0,work:8,would:[1,6],write:1,www:9,yell:9,yellowston:9,you:[1,3,5,6],your:[4,5,9]},titles:["Pick a schema","Donations","External links","Fill out the properties","Find a Schema","Generate Schema Button","Welcome to the Schema Generator help!","Show properties","Save Schema to LocalStorage","Why would you use this software?"],titleterms:{button:[5,8],clear:8,data:8,donat:1,exampl:9,extern:2,fill:3,find:4,gener:[5,6],help:6,indic:6,link:2,localstorag:8,out:3,output:9,pick:0,properti:[3,7],recov:8,save:8,schema:[0,4,5,6,8],show:7,softwar:9,tabl:6,thi:9,tool:6,valid:5,welcom:6,where:6,why:9,would:9,you:9}}) -------------------------------------------------------------------------------- /docs (help)/_templates/localtoc.html: -------------------------------------------------------------------------------- 1 | {# 2 | basic/localtoc.html 3 | ~~~~~~~~~~~~~~~~~~~ 4 | 5 | Sphinx sidebar template: local table of contents. 6 | 7 | :copyright: Copyright 2007-2014 by the Sphinx team, see AUTHORS. 8 | :license: BSD, see LICENSE for details. 9 | #} 10 | {%- if display_toc %} 11 |

{{ _('Page Contents') }}

12 | {{ toc }} 13 | {%- endif %} 14 | -------------------------------------------------------------------------------- /docs (help)/blog.rst: -------------------------------------------------------------------------------- 1 | Pick a schema 2 | ============= 3 | 4 | We'll pick ``Blog`` as an example 5 | 6 | .. raw:: html 7 | 8 | Blog 9 | 10 | Having chosen a schema, we can now see the properties of the schema. We can also observe the ``Save Schema`` and ``Generate Schema`` buttons appearing. More on these later. 11 | 12 | .. raw:: html 13 | 14 | Blog Properties 15 | 16 | Links with the |external_link| image will lead to a |schema.org| |external_link| page in a different tab for further information. :doc:`external` 17 | 18 | Links without this |external_link| image will show the properties of that schema. For instance the first property of ``Blog`` is ``about``. ``about`` is a ``Thing``. Clicking on ``Thing`` will show the properties of ``Thing``. 19 | 20 | :doc:`properties` 21 | 22 | -------------------------------------------------------------------------------- /docs (help)/donate.rst: -------------------------------------------------------------------------------- 1 | Donations 2 | ========= 3 | 4 | Considerable effort has gone into writing this software which I'm releasing under the terms of the GNU General Public License. 5 | 6 | If you find this software useful, don't hesitate to make a financial contribution by clicking on the **Donate** button below. 7 | 8 | If you would like additional features, I'm a freelance developer and I can bill internationally. 9 | -------------------------------------------------------------------------------- /docs (help)/external.rst: -------------------------------------------------------------------------------- 1 | External links 2 | ============== 3 | 4 | Links marked with the |external_link| icon will lead to the |schema.org| |external_link| website. 5 | 6 | .. raw:: html 7 | 8 | about link 9 | 10 | This will open a new tab with additional information. 11 | 12 | .. raw:: html 13 | 14 | Schema.org 'about' 15 | -------------------------------------------------------------------------------- /docs (help)/extra/Readme.txt: -------------------------------------------------------------------------------- 1 | Tool for generating a valid Scheme as proposed by Schema.org 2 | Copyright (C) 2016 - 2021 Hans Polak 3 | 4 | This program is free software: you can redistribute it and/or modify 5 | it under the terms of the GNU General Public License as published by 6 | the Free Software Foundation, either version 3 of the License, or 7 | (at your option) any later version. 8 | 9 | This program is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | GNU General Public License for more details. 13 | 14 | You should have received a copy of the GNU General Public License 15 | along with this program. If not, see . 16 | 17 | __author__ = "Hans Polak" 18 | __copyright__ = "Copyright 2016 - 2021" 19 | __credits__ = ["Hans Polak"] 20 | __license__ = "GNU GPL" 21 | __version__ = "3.0" 22 | __maintainer__ = "Hans Polak" 23 | __email__ = "info@polak.es" 24 | __status__ = "Beta testing" 25 | 26 | -------------------------------------------------------------------------------- /docs (help)/fields.rst: -------------------------------------------------------------------------------- 1 | Fill out the properties 2 | ======================= 3 | 4 | Just type the info in the fields you **want** to show (to the Search Engines) 5 | 6 | .. raw:: html 7 | 8 | Fields 9 | 10 | Now, it's possible to :doc:`save` or :doc:`generate` 11 | -------------------------------------------------------------------------------- /docs (help)/find.rst: -------------------------------------------------------------------------------- 1 | Find a Schema 2 | ============= 3 | 4 | Visit the |generator_tool| |external_link| website and choose the top level schema which is most adjusted to your (client's) needs. Next, we'll need to :doc:`blog` 5 | 6 | .. raw:: html 7 | 8 | Generator Tool 9 | 10 | .. |generator_tool| raw:: html 11 | 12 | Generator Tool 13 | -------------------------------------------------------------------------------- /docs (help)/generate.rst: -------------------------------------------------------------------------------- 1 | Generate Schema Button 2 | ====================== 3 | 4 | Once you have generated your schema's markup, you can then go and test it. 5 | 6 | .. raw:: html 7 | 8 | Generated output 9 | 10 | Test at |Structured Data Testing Tool| |external_link| 11 | 12 | .. raw:: html 13 | 14 | Link to the testing tool

15 | 16 | 17 | Validate the Schema 18 | =================== 19 | 20 | You can easily test your schema by copying it and paste it in the |Structured Data Testing Tool| |external_link| 21 | 22 | .. raw:: html 23 | 24 | The testing tool

25 | 26 | .. raw:: html 27 | 28 | Paste the generated output

29 | 30 | .. raw:: html 31 | 32 | Validated output 33 | 34 | |All good|? Done! 35 | 36 | .. |All good| raw:: html 37 | 38 | 42 | All good All good  43 | 44 | Now, you can start to add this markup to your own websites as |shown here| 45 | 46 | .. |shown here| raw:: html 47 | 48 | shown here 49 | 50 | Some schema's have mandatory fields. The |Structured Data Testing Tool| |external_link| will highlight these. You can add these fields by using the ``back`` button of the navigator you're using. At this moment, this tool has no way of knowing which fields are mandatory. It's trial and error. 51 | -------------------------------------------------------------------------------- /docs (help)/images/D1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GUI-Junkie/Schema.org-Generator/6e5f915bed963f7e1028927c28eb823ec30ded71/docs (help)/images/D1.png -------------------------------------------------------------------------------- /docs (help)/images/D10.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GUI-Junkie/Schema.org-Generator/6e5f915bed963f7e1028927c28eb823ec30ded71/docs (help)/images/D10.png -------------------------------------------------------------------------------- /docs (help)/images/D11.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GUI-Junkie/Schema.org-Generator/6e5f915bed963f7e1028927c28eb823ec30ded71/docs (help)/images/D11.png -------------------------------------------------------------------------------- /docs (help)/images/D12.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GUI-Junkie/Schema.org-Generator/6e5f915bed963f7e1028927c28eb823ec30ded71/docs (help)/images/D12.png -------------------------------------------------------------------------------- /docs (help)/images/D13.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GUI-Junkie/Schema.org-Generator/6e5f915bed963f7e1028927c28eb823ec30ded71/docs (help)/images/D13.png -------------------------------------------------------------------------------- /docs (help)/images/D14.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GUI-Junkie/Schema.org-Generator/6e5f915bed963f7e1028927c28eb823ec30ded71/docs (help)/images/D14.png -------------------------------------------------------------------------------- /docs (help)/images/D15.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GUI-Junkie/Schema.org-Generator/6e5f915bed963f7e1028927c28eb823ec30ded71/docs (help)/images/D15.png -------------------------------------------------------------------------------- /docs (help)/images/D16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GUI-Junkie/Schema.org-Generator/6e5f915bed963f7e1028927c28eb823ec30ded71/docs (help)/images/D16.png -------------------------------------------------------------------------------- /docs (help)/images/D17.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GUI-Junkie/Schema.org-Generator/6e5f915bed963f7e1028927c28eb823ec30ded71/docs (help)/images/D17.png -------------------------------------------------------------------------------- /docs (help)/images/D2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GUI-Junkie/Schema.org-Generator/6e5f915bed963f7e1028927c28eb823ec30ded71/docs (help)/images/D2.png -------------------------------------------------------------------------------- /docs (help)/images/D3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GUI-Junkie/Schema.org-Generator/6e5f915bed963f7e1028927c28eb823ec30ded71/docs (help)/images/D3.png -------------------------------------------------------------------------------- /docs (help)/images/D4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GUI-Junkie/Schema.org-Generator/6e5f915bed963f7e1028927c28eb823ec30ded71/docs (help)/images/D4.png -------------------------------------------------------------------------------- /docs (help)/images/D5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GUI-Junkie/Schema.org-Generator/6e5f915bed963f7e1028927c28eb823ec30ded71/docs (help)/images/D5.png -------------------------------------------------------------------------------- /docs (help)/images/D6.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GUI-Junkie/Schema.org-Generator/6e5f915bed963f7e1028927c28eb823ec30ded71/docs (help)/images/D6.png -------------------------------------------------------------------------------- /docs (help)/images/D7.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GUI-Junkie/Schema.org-Generator/6e5f915bed963f7e1028927c28eb823ec30ded71/docs (help)/images/D7.png -------------------------------------------------------------------------------- /docs (help)/images/D8.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GUI-Junkie/Schema.org-Generator/6e5f915bed963f7e1028927c28eb823ec30ded71/docs (help)/images/D8.png -------------------------------------------------------------------------------- /docs (help)/images/D9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GUI-Junkie/Schema.org-Generator/6e5f915bed963f7e1028927c28eb823ec30ded71/docs (help)/images/D9.png -------------------------------------------------------------------------------- /docs (help)/images/external_link.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GUI-Junkie/Schema.org-Generator/6e5f915bed963f7e1028927c28eb823ec30ded71/docs (help)/images/external_link.png -------------------------------------------------------------------------------- /docs (help)/images/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GUI-Junkie/Schema.org-Generator/6e5f915bed963f7e1028927c28eb823ec30ded71/docs (help)/images/favicon.ico -------------------------------------------------------------------------------- /docs (help)/index.rst: -------------------------------------------------------------------------------- 1 | .. Schema documentation master file, created by 2 | sphinx-quickstart on Sat Feb 13 13:27:50 2016. 3 | You can adapt this file completely to your liking, but it should at least 4 | contain the root `toctree` directive. 5 | 6 | Welcome to the `Schema Generator` help! 7 | ======================================= 8 | 9 | I'm assuming the reader is familiar with |html| |external_link| 10 | 11 | .. toctree:: 12 | :maxdepth: 3 13 | 14 | why 15 | find 16 | blog 17 | properties 18 | fields 19 | save 20 | generate 21 | external 22 | donate 23 | 24 | Where is the tool? 25 | ================== 26 | 27 | You can use the |Schema Generator| |external_link| 28 | 29 | Indices and tables 30 | ================== 31 | 32 | * :ref:`genindex` 33 | * :ref:`modindex` 34 | * :ref:`search` 35 | 36 | .. |Readme.txt| raw:: html 37 | 38 | Readme.txt 39 | 40 | -------------------------------------------------------------------------------- /docs (help)/properties.rst: -------------------------------------------------------------------------------- 1 | Show properties 2 | =============== 3 | 4 | ``accountablePerson`` is a ``Person`` 5 | 6 | .. raw:: html 7 | 8 | Person 9 | 10 | By clicking on ``Person``, we can now see the properties of the schema. 11 | 12 | .. raw:: html 13 | 14 | Person properties 15 | 16 | We can add more information as needed. ``Person`` has a ``PostalAddress`` 17 | 18 | .. raw:: html 19 | 20 | Person PostalAddress 21 | 22 | .. raw:: html 23 | 24 | Person PostalAddress properties 25 | 26 | Now, we can start to fill out the text fields with the information we **want** to share with the Search Engines. Most fields are optional, but we'll see that later. 27 | 28 | :doc:`fields` 29 | -------------------------------------------------------------------------------- /docs (help)/save.rst: -------------------------------------------------------------------------------- 1 | Save Schema to LocalStorage 2 | =========================== 3 | 4 | Schema Generator can store the data in the browser. This way, the user can continue to work on the schema, adding more fields as needed. 5 | 6 | .. raw:: html 7 | 8 | Saved 9 | 10 | 11 | Recover Data button 12 | =================== 13 | 14 | Clicking the ``Recover Data`` button will take us right back to :doc:`fields` 15 | 16 | Clear Data button 17 | ================= 18 | 19 | Clicking the ``Clear Data`` button will delete all information saved in LocalStorage. 20 | -------------------------------------------------------------------------------- /docs (help)/why.rst: -------------------------------------------------------------------------------- 1 | Why would you use this software? 2 | ================================ 3 | 4 | "|Schema.org| |external_link| *is a collaborative, community activity with a mission to create, maintain, and promote schema's for structured data on the Internet*" This '*structured data*' helps Search Engines to obtain meaningful information from your website, even if this is ``hidden`` from the user of the website. This can improve the SEO of the websites you maintain. 5 | 6 | Depending on your needs, you could use other, existing, tools for adding |Schema.org| |external_link| schemas to your website. *This tool* aims to provide valid |HTML| |external_link| markup that can be used to integrate these schema's into your website. 7 | 8 | Example output 9 | ============== 10 | 11 | Let's look at a quick example. The first HTML block is generated with this tool, the following two blocks are possible transformations. 12 | 13 | For instance 14 | 15 | .. raw:: html 16 | 17 |
<div itemscope itemtype="http://schema.org/Park">
18 |         <div itemprop=geo itemscope itemtype="http://schema.org/GeoCoordinates">
19 |             <span itemprop="latitude">44.4279668</span>
20 |             <span itemprop="longitude">-110.5906437</span>
21 |         </div>
22 |         <span itemprop="hasMap">http://www.nps.gov/common/commonspot/customcf/apps/maps/showmap.cfm?alphacode=yell&parkname=Yellowstone</span>
23 |         <span itemprop="name">Yellowstone</span>
24 |         <span itemprop="url">http://www.nps.gov/yell/index.htm</span>
25 |     </div>
26 |     
27 |
28 | 29 | can be changed into 30 | 31 | .. code-block:: html 32 | 33 | 34 |

Yellowstone

35 |
36 | Latitude: 44.4279668
37 | Longitude: -110.5906437
38 |
39 |
40 | 41 |
42 | 43 | 44 | 45 | The ``hidden`` keyword can be used to hide some information from the markup, while still allowing Search Engines to find this information. 46 | 47 | .. code-block:: html 48 | 49 | 50 |

Yellowstone

51 | 55 |
56 | 57 |
58 | 59 | 60 | 61 | All three HTML blocks can be validated with the |Structured Data Testing Tool| |external_link|. 62 | 63 | Multiple schemas can be used simultaneously on one page. For instance, a |LocalBusiness| |external_link| can sell different products (|OfferCatalog| |external_link|). 64 | 65 | .. |LocalBusiness| raw:: html 66 | 67 | LocalBusiness 68 | 69 | .. |OfferCatalog| raw:: html 70 | 71 | OfferCatalog 72 | -------------------------------------------------------------------------------- /docs (technical)/_build/doctrees/apache.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GUI-Junkie/Schema.org-Generator/6e5f915bed963f7e1028927c28eb823ec30ded71/docs (technical)/_build/doctrees/apache.doctree -------------------------------------------------------------------------------- /docs (technical)/_build/doctrees/controller.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GUI-Junkie/Schema.org-Generator/6e5f915bed963f7e1028927c28eb823ec30ded71/docs (technical)/_build/doctrees/controller.doctree -------------------------------------------------------------------------------- /docs (technical)/_build/doctrees/environment.pickle: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GUI-Junkie/Schema.org-Generator/6e5f915bed963f7e1028927c28eb823ec30ded71/docs (technical)/_build/doctrees/environment.pickle -------------------------------------------------------------------------------- /docs (technical)/_build/doctrees/index.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GUI-Junkie/Schema.org-Generator/6e5f915bed963f7e1028927c28eb823ec30ded71/docs (technical)/_build/doctrees/index.doctree -------------------------------------------------------------------------------- /docs (technical)/_build/doctrees/javascript.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GUI-Junkie/Schema.org-Generator/6e5f915bed963f7e1028927c28eb823ec30ded71/docs (technical)/_build/doctrees/javascript.doctree -------------------------------------------------------------------------------- /docs (technical)/_build/doctrees/model.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GUI-Junkie/Schema.org-Generator/6e5f915bed963f7e1028927c28eb823ec30ded71/docs (technical)/_build/doctrees/model.doctree -------------------------------------------------------------------------------- /docs (technical)/_build/doctrees/schema_bot.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GUI-Junkie/Schema.org-Generator/6e5f915bed963f7e1028927c28eb823ec30ded71/docs (technical)/_build/doctrees/schema_bot.doctree -------------------------------------------------------------------------------- /docs (technical)/_build/doctrees/view.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GUI-Junkie/Schema.org-Generator/6e5f915bed963f7e1028927c28eb823ec30ded71/docs (technical)/_build/doctrees/view.doctree -------------------------------------------------------------------------------- /docs (technical)/_build/html/.buildinfo: -------------------------------------------------------------------------------- 1 | # Sphinx build info version 1 2 | # This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done. 3 | config: 9b33ad886b9c2d9df2c1a0baaaa9a9a5 4 | tags: 645f666f9bcd5a90fca523b33c5a78b7 5 | -------------------------------------------------------------------------------- /docs (technical)/_build/html/Readme.txt: -------------------------------------------------------------------------------- 1 | Tool for generating a valid Scheme as proposed by Schema.org 2 | Copyright (C) 2016 - 2021 Hans Polak 3 | 4 | This program is free software: you can redistribute it and/or modify 5 | it under the terms of the GNU General Public License as published by 6 | the Free Software Foundation, either version 3 of the License, or 7 | (at your option) any later version. 8 | 9 | This program is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | GNU General Public License for more details. 13 | 14 | You should have received a copy of the GNU General Public License 15 | along with this program. If not, see . 16 | 17 | __author__ = "Hans Polak" 18 | __copyright__ = "Copyright 2016 - 2021" 19 | __credits__ = ["Hans Polak"] 20 | __license__ = "GNU GPL" 21 | __version__ = "3.0" 22 | __maintainer__ = "Hans Polak" 23 | __email__ = "info@polak.es" 24 | __status__ = "Beta testing" 25 | 26 | -------------------------------------------------------------------------------- /docs (technical)/_build/html/_images/external_link.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GUI-Junkie/Schema.org-Generator/6e5f915bed963f7e1028927c28eb823ec30ded71/docs (technical)/_build/html/_images/external_link.png -------------------------------------------------------------------------------- /docs (technical)/_build/html/_sources/apache.txt: -------------------------------------------------------------------------------- 1 | Apache2 configuration 2 | ===================== 3 | 4 | A Web Server can be configured to reduce the load of the |Application Server| by handling static content. It is recommended to do this, as ``/quit`` will shut-down the |Application Server|. 5 | 6 | Static content: 7 | 8 | * index.html - generated by the |Schema bot|. 9 | * schema.js - the |javascript| file 10 | * external_link.png - image file used to indicate the link will open a new tab 11 | * favicon.ico - branding image 12 | 13 | .conf 14 | ===== 15 | 16 | The ``.conf`` file is located in the ``/etc/apache2/sites-available/`` directory. 17 | 18 | .. code-block:: apache 19 | 20 | RewriteEngine On 21 | RewriteRule (quit$)|(restart$) /index.html 22 | 23 | ProxyPassMatch (/$)|(.png$)|(.html$)|(.htm$)|(.ico$)|(.js$) ! 24 | ProxyPass / http://localhost:8000/ 25 | ProxyPassReverse / http://localhost:8000/ 26 | 27 | This snippet blocks the ``/quit`` and ``/restart`` petitions that would shut-down or restart the |Application Server|. ``http://localhost:8000/quit`` will still work, so a systems administrator can manually shut-down or restart the Application Server(s). |Schema bot| will restart the Application Server(s) when needed. 28 | 29 | The Web Server will return the ``index.html``, ``schema.js``, ``external_link.png`` and ``favicon.ico`` directly. 30 | 31 | The Web Server will forward all other petitions to the |Application Server| at ``http://localhost:8000/`` 32 | 33 | ** TODO: Load balance Apache to different ports 34 | -------------------------------------------------------------------------------- /docs (technical)/_build/html/_sources/controller.txt: -------------------------------------------------------------------------------- 1 | Controller 2 | ========== 3 | 4 | .. automodule:: controller 5 | :members: 6 | 7 | Starting the server at default port 8000 8 | ======================================== 9 | 10 | The Application Server can be started directly from the command line 11 | 12 | .. code-block:: bash 13 | 14 | computer:~$ ./controller.py 15 | 16 | or 17 | 18 | .. code-block:: bash 19 | 20 | computer:~$ python3 controller.py 21 | 22 | Starting the server at another port 23 | =================================== 24 | 25 | A number of Application Servers can be started to serve at different ports. 26 | 27 | .. code-block:: bash 28 | 29 | computer:~$ ./controller.py 8001 & 30 | 31 | or 32 | 33 | .. code-block:: bash 34 | 35 | computer:~$ python3 controller.py 8001 & 36 | 37 | Shutting down the server 38 | ======================== 39 | 40 | The server can be shut down from a browser. 41 | 42 | .. code-block:: http 43 | 44 | http://localhost:port/quit 45 | 46 | or using Python 47 | 48 | .. code-block:: python 49 | 50 | from urllib.error import URLError 51 | from urllib.request import urlopen 52 | 53 | try: 54 | urlopen(f'http://localhost:{port}/quit') 55 | except URLError: 56 | pass 57 | 58 | Restarting the server 59 | ===================== 60 | 61 | The server can be shut down from a browser. 62 | 63 | .. code-block:: http 64 | 65 | http://localhost:port/restart 66 | 67 | or using Python 68 | 69 | .. code-block:: python 70 | 71 | from urllib.error import URLError 72 | from urllib.request import urlopen 73 | 74 | try: 75 | urlopen(f'http://localhost:{port}/restart') 76 | except URLError: 77 | pass 78 | -------------------------------------------------------------------------------- /docs (technical)/_build/html/_sources/index.txt: -------------------------------------------------------------------------------- 1 | .. Schema documentation master file, created by 2 | sphinx-quickstart on Sat Feb 13 13:27:50 2016. 3 | You can adapt this file completely to your liking, but it should at least 4 | contain the root `toctree` directive. 5 | 6 | Welcome to the `Schema Generator` documentation! 7 | ================================================ 8 | 9 | Contents: 10 | 11 | .. toctree:: 12 | :maxdepth: 2 13 | 14 | model 15 | view 16 | controller 17 | javascript 18 | apache 19 | schema_bot 20 | 21 | This software is meant to serve as a tool for creating valid |schema.org| |external_link| markups. These can then be used by web developers to improve the SEO of the websites they maintain. 22 | 23 | For instance 24 | 25 | .. raw:: html 26 | 27 |
<div itemscope itemtype="http://schema.org/Park">
28 |         <div itemprop=geo itemscope itemtype="http://schema.org/GeoCoordinates">
29 |             <span itemprop="latitude">44.4279668</span>
30 |             <span itemprop="longitude">-110.5906437</span>
31 |         </div>
32 |         <span itemprop="hasMap">http://www.nps.gov/common/commonspot/customcf/apps/maps/showmap.cfm?alphacode=yell&parkname=Yellowstone</span>
33 |         <span itemprop="name">Yellowstone</span>
34 |         <span itemprop="url">http://www.nps.gov/yell/index.htm</span>
35 |     </div>
36 |     
37 |
38 | 39 | To maintain an up-to-date version of the hierarchy, the |Schema bot| can be set-up with a ``cron`` job 40 | 41 | The |Application Server| can be started, concurrently, listening to different ports. The |Web Server| should be configured for load balancing to these different ports. 42 | 43 | Programming languages: 44 | 45 | * |Python 3.4| |external_link| - All server side code 46 | 47 | * |Javascript| |external_link| - AJAX functionality and persistence 48 | 49 | Copyright information 50 | ===================== 51 | 52 | Refer to the |Readme.txt| file for © copyright information 53 | 54 | 55 | Indices and tables 56 | ================== 57 | 58 | * :ref:`genindex` 59 | * :ref:`modindex` 60 | * :ref:`search` 61 | 62 | .. |Readme.txt| raw:: html 63 | 64 | Readme.txt 65 | 66 | .. |Python 3.4| raw:: html 67 | 68 | Python 3.4 69 | 70 | .. |Javascript| raw:: html 71 | 72 | Javascript 73 | -------------------------------------------------------------------------------- /docs (technical)/_build/html/_sources/javascript.txt: -------------------------------------------------------------------------------- 1 | Javascript 2 | ========== 3 | 4 | Located in the ``view`` subdirectory for development, the ``schema.js`` file should be located at the root of the |Web Server| together with all other static files. 5 | 6 | .. code-block:: javascript 7 | 8 | function onLoad(arg) 9 | 10 | This function shows the different buttons depending on the situation. 11 | 12 | * index.html (arg is empty) 13 | - the ``Recover Data`` button is shown if the LocalStorage has data 14 | - the ``Clear Data`` button is shown together with the ``Recover Data`` button 15 | * all other pages (arg is "schema") 16 | - the ``Save Schema`` button is shown only if LocalStorage is available 17 | - the ``Generate Schema`` button is shown 18 | - the ``Recover Data`` button is shown if the LocalStorage has data 19 | - the ``Clear Data`` button is shown together with the ``Recover Data`` button 20 | 21 | .. code-block:: javascript 22 | 23 | function ShowNextSchema(schema, id) 24 | 25 | This function will get the next level on the hierarchy through an AJAX call, only once. If the level has already been obtained, it will toggle the display setting between ``None`` and ``Block`` 26 | 27 | * schema - the next element in the hierarchy 28 | * id - the div where the content is to be shown 29 | 30 | .. code-block:: javascript 31 | 32 | function GenerateSchema() 33 | 34 | This function only executes the ``submit()`` action of the form, sending all the fields to the |Application Server| through the POST action. A syntactically correct schema.org schema will be returned. 35 | 36 | .. code-block:: javascript 37 | 38 | function SaveSchema() 39 | 40 | This function can only be called if LocalStorage is available. It will clear the old content of the LocalStorage and then will save all data on screen for later recovery. Then, it will show a confirmation the schema has been saved. 41 | 42 | ** TODO: The confirmation message might be improved using AJAX instead 43 | 44 | .. code-block:: javascript 45 | 46 | function RecoverData() 47 | 48 | This function will replace the ``innerHTML`` with the content stored in LocalStorage 49 | 50 | .. code-block:: javascript 51 | 52 | function ClearData() 53 | 54 | This function will delete the content stored in LocalStorage and hide the ``Recover Data`` and ``Clear Data`` buttons. 55 | 56 | .. code-block:: javascript 57 | 58 | $(document).ready(function() 59 | 60 | jQuery copied from schema.org. This will show the example tabs of the original schema.org example tabs. 61 | -------------------------------------------------------------------------------- /docs (technical)/_build/html/_sources/model.txt: -------------------------------------------------------------------------------- 1 | Model 2 | ===== 3 | 4 | .. automodule:: model.schema 5 | :members: 6 | -------------------------------------------------------------------------------- /docs (technical)/_build/html/_sources/schema_bot.txt: -------------------------------------------------------------------------------- 1 | Schema bot 2 | ========== 3 | 4 | .. automodule:: schema_bot 5 | :members: 6 | 7 | Starting the bot 8 | ================ 9 | 10 | .. code-block:: bash 11 | 12 | computer:~$ ./schema_bot.py 13 | 14 | or 15 | 16 | .. code-block:: bash 17 | 18 | computer:~$ python3 schema_bot.py 19 | 20 | Restarting the server(s) 21 | ======================== 22 | 23 | To restart the server(s), the ``restart(port)`` function should be called for each port as shown below 24 | If the ports are consecutive, a ``for-loop`` can be used, of course. 25 | 26 | This code is, naturally, inside the ``schema_bot.py`` file 27 | 28 | .. code-block:: python 29 | 30 | if __name__ == "__main__": 31 | from os import chdir 32 | 33 | print('Schema Bot - main') 34 | 35 | # Change the base dir to where this __file__ is located 36 | # Same location as the Hierarchy.pickle file 37 | # FILE_NAME = 'schema_bot.py' 38 | FILE_NAME = __file__[__file__.rindex("/") + 1:] 39 | if __file__ != FILE_NAME: 40 | BASE_DIR = __file__[:__file__.index(FILE_NAME)] 41 | chdir(BASE_DIR) 42 | 43 | # Start the Bot 44 | # Check if file exists 45 | # Check if version is correct 46 | b = Bot() 47 | 48 | # Everything happens while the bot is alive 49 | while b.is_alive(): 50 | pass 51 | 52 | # Restart the server(s) if the pickle file has been updated 53 | if b.updated: 54 | restart(8000) # Restart server at port 8000 55 | restart(8001) # Etc 56 | print('Schema Bot - main finished') 57 | -------------------------------------------------------------------------------- /docs (technical)/_build/html/_sources/view.txt: -------------------------------------------------------------------------------- 1 | View 2 | ==== 3 | 4 | .. automodule:: view.schema_view 5 | :members: 6 | -------------------------------------------------------------------------------- /docs (technical)/_build/html/_static/ajax-loader.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GUI-Junkie/Schema.org-Generator/6e5f915bed963f7e1028927c28eb823ec30ded71/docs (technical)/_build/html/_static/ajax-loader.gif -------------------------------------------------------------------------------- /docs (technical)/_build/html/_static/comment-bright.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GUI-Junkie/Schema.org-Generator/6e5f915bed963f7e1028927c28eb823ec30ded71/docs (technical)/_build/html/_static/comment-bright.png -------------------------------------------------------------------------------- /docs (technical)/_build/html/_static/comment-close.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GUI-Junkie/Schema.org-Generator/6e5f915bed963f7e1028927c28eb823ec30ded71/docs (technical)/_build/html/_static/comment-close.png -------------------------------------------------------------------------------- /docs (technical)/_build/html/_static/comment.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GUI-Junkie/Schema.org-Generator/6e5f915bed963f7e1028927c28eb823ec30ded71/docs (technical)/_build/html/_static/comment.png -------------------------------------------------------------------------------- /docs (technical)/_build/html/_static/default.css: -------------------------------------------------------------------------------- 1 | /* 2 | * default.css_t 3 | * ~~~~~~~~~~~~~ 4 | * 5 | * Sphinx stylesheet -- default theme. 6 | * 7 | * :copyright: Copyright 2007-2014 by the Sphinx team, see AUTHORS. 8 | * :license: BSD, see LICENSE for details. 9 | * 10 | */ 11 | 12 | @import url("basic.css"); 13 | 14 | /* -- page layout ----------------------------------------------------------- */ 15 | 16 | body { 17 | font-family: sans-serif; 18 | font-size: 100%; 19 | background-color: #11303d; 20 | color: #000; 21 | margin: 0; 22 | padding: 0; 23 | } 24 | 25 | div.document { 26 | background-color: #1c4e63; 27 | } 28 | 29 | div.documentwrapper { 30 | float: left; 31 | width: 100%; 32 | } 33 | 34 | div.bodywrapper { 35 | margin: 0 0 0 230px; 36 | } 37 | 38 | div.body { 39 | background-color: #ffffff; 40 | color: #000000; 41 | padding: 0 20px 30px 20px; 42 | } 43 | 44 | div.footer { 45 | color: #ffffff; 46 | width: 100%; 47 | padding: 9px 0 9px 0; 48 | text-align: center; 49 | font-size: 75%; 50 | } 51 | 52 | div.footer a { 53 | color: #ffffff; 54 | text-decoration: underline; 55 | } 56 | 57 | div.related { 58 | background-color: #133f52; 59 | line-height: 30px; 60 | color: #ffffff; 61 | } 62 | 63 | div.related a { 64 | color: #ffffff; 65 | } 66 | 67 | div.sphinxsidebar { 68 | } 69 | 70 | div.sphinxsidebar h3 { 71 | font-family: 'Trebuchet MS', sans-serif; 72 | color: #ffffff; 73 | font-size: 1.4em; 74 | font-weight: normal; 75 | margin: 0; 76 | padding: 0; 77 | } 78 | 79 | div.sphinxsidebar h3 a { 80 | color: #ffffff; 81 | } 82 | 83 | div.sphinxsidebar h4 { 84 | font-family: 'Trebuchet MS', sans-serif; 85 | color: #ffffff; 86 | font-size: 1.3em; 87 | font-weight: normal; 88 | margin: 5px 0 0 0; 89 | padding: 0; 90 | } 91 | 92 | div.sphinxsidebar p { 93 | color: #ffffff; 94 | } 95 | 96 | div.sphinxsidebar p.topless { 97 | margin: 5px 10px 10px 10px; 98 | } 99 | 100 | div.sphinxsidebar ul { 101 | margin: 10px; 102 | padding: 0; 103 | color: #ffffff; 104 | } 105 | 106 | div.sphinxsidebar a { 107 | color: #98dbcc; 108 | } 109 | 110 | div.sphinxsidebar input { 111 | border: 1px solid #98dbcc; 112 | font-family: sans-serif; 113 | font-size: 1em; 114 | } 115 | 116 | 117 | 118 | /* -- hyperlink styles ------------------------------------------------------ */ 119 | 120 | a { 121 | color: #355f7c; 122 | text-decoration: none; 123 | } 124 | 125 | a:visited { 126 | color: #355f7c; 127 | text-decoration: none; 128 | } 129 | 130 | a:hover { 131 | text-decoration: underline; 132 | } 133 | 134 | 135 | 136 | /* -- body styles ----------------------------------------------------------- */ 137 | 138 | div.body h1, 139 | div.body h2, 140 | div.body h3, 141 | div.body h4, 142 | div.body h5, 143 | div.body h6 { 144 | font-family: 'Trebuchet MS', sans-serif; 145 | background-color: #f2f2f2; 146 | font-weight: normal; 147 | color: #20435c; 148 | border-bottom: 1px solid #ccc; 149 | margin: 20px -20px 10px -20px; 150 | padding: 3px 0 3px 10px; 151 | } 152 | 153 | div.body h1 { margin-top: 0; font-size: 200%; } 154 | div.body h2 { font-size: 160%; } 155 | div.body h3 { font-size: 140%; } 156 | div.body h4 { font-size: 120%; } 157 | div.body h5 { font-size: 110%; } 158 | div.body h6 { font-size: 100%; } 159 | 160 | a.headerlink { 161 | color: #c60f0f; 162 | font-size: 0.8em; 163 | padding: 0 4px 0 4px; 164 | text-decoration: none; 165 | } 166 | 167 | a.headerlink:hover { 168 | background-color: #c60f0f; 169 | color: white; 170 | } 171 | 172 | div.body p, div.body dd, div.body li { 173 | text-align: justify; 174 | line-height: 130%; 175 | } 176 | 177 | div.admonition p.admonition-title + p { 178 | display: inline; 179 | } 180 | 181 | div.admonition p { 182 | margin-bottom: 5px; 183 | } 184 | 185 | div.admonition pre { 186 | margin-bottom: 5px; 187 | } 188 | 189 | div.admonition ul, div.admonition ol { 190 | margin-bottom: 5px; 191 | } 192 | 193 | div.note { 194 | background-color: #eee; 195 | border: 1px solid #ccc; 196 | } 197 | 198 | div.seealso { 199 | background-color: #ffc; 200 | border: 1px solid #ff6; 201 | } 202 | 203 | div.topic { 204 | background-color: #eee; 205 | } 206 | 207 | div.warning { 208 | background-color: #ffe4e4; 209 | border: 1px solid #f66; 210 | } 211 | 212 | p.admonition-title { 213 | display: inline; 214 | } 215 | 216 | p.admonition-title:after { 217 | content: ":"; 218 | } 219 | 220 | pre { 221 | padding: 5px; 222 | background-color: #eeffcc; 223 | color: #333333; 224 | line-height: 120%; 225 | border: 1px solid #ac9; 226 | border-left: none; 227 | border-right: none; 228 | } 229 | 230 | tt { 231 | background-color: #ecf0f3; 232 | padding: 0 1px 0 1px; 233 | font-size: 0.95em; 234 | } 235 | 236 | th { 237 | background-color: #ede; 238 | } 239 | 240 | .warning tt { 241 | background: #efc2c2; 242 | } 243 | 244 | .note tt { 245 | background: #d6d6d6; 246 | } 247 | 248 | .viewcode-back { 249 | font-family: sans-serif; 250 | } 251 | 252 | div.viewcode-block:target { 253 | background-color: #f4debf; 254 | border-top: 1px solid #ac9; 255 | border-bottom: 1px solid #ac9; 256 | } -------------------------------------------------------------------------------- /docs (technical)/_build/html/_static/down-pressed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GUI-Junkie/Schema.org-Generator/6e5f915bed963f7e1028927c28eb823ec30ded71/docs (technical)/_build/html/_static/down-pressed.png -------------------------------------------------------------------------------- /docs (technical)/_build/html/_static/down.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GUI-Junkie/Schema.org-Generator/6e5f915bed963f7e1028927c28eb823ec30ded71/docs (technical)/_build/html/_static/down.png -------------------------------------------------------------------------------- /docs (technical)/_build/html/_static/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GUI-Junkie/Schema.org-Generator/6e5f915bed963f7e1028927c28eb823ec30ded71/docs (technical)/_build/html/_static/favicon.ico -------------------------------------------------------------------------------- /docs (technical)/_build/html/_static/file.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GUI-Junkie/Schema.org-Generator/6e5f915bed963f7e1028927c28eb823ec30ded71/docs (technical)/_build/html/_static/file.png -------------------------------------------------------------------------------- /docs (technical)/_build/html/_static/minus.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GUI-Junkie/Schema.org-Generator/6e5f915bed963f7e1028927c28eb823ec30ded71/docs (technical)/_build/html/_static/minus.png -------------------------------------------------------------------------------- /docs (technical)/_build/html/_static/plus.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GUI-Junkie/Schema.org-Generator/6e5f915bed963f7e1028927c28eb823ec30ded71/docs (technical)/_build/html/_static/plus.png -------------------------------------------------------------------------------- /docs (technical)/_build/html/_static/pygments.css: -------------------------------------------------------------------------------- 1 | .highlight .hll { background-color: #ffffcc } 2 | .highlight { background: #eeffcc; } 3 | .highlight .c { color: #408090; font-style: italic } /* Comment */ 4 | .highlight .err { border: 1px solid #FF0000 } /* Error */ 5 | .highlight .k { color: #007020; font-weight: bold } /* Keyword */ 6 | .highlight .o { color: #666666 } /* Operator */ 7 | .highlight .cm { color: #408090; font-style: italic } /* Comment.Multiline */ 8 | .highlight .cp { color: #007020 } /* Comment.Preproc */ 9 | .highlight .c1 { color: #408090; font-style: italic } /* Comment.Single */ 10 | .highlight .cs { color: #408090; background-color: #fff0f0 } /* Comment.Special */ 11 | .highlight .gd { color: #A00000 } /* Generic.Deleted */ 12 | .highlight .ge { font-style: italic } /* Generic.Emph */ 13 | .highlight .gr { color: #FF0000 } /* Generic.Error */ 14 | .highlight .gh { color: #000080; font-weight: bold } /* Generic.Heading */ 15 | .highlight .gi { color: #00A000 } /* Generic.Inserted */ 16 | .highlight .go { color: #333333 } /* Generic.Output */ 17 | .highlight .gp { color: #c65d09; font-weight: bold } /* Generic.Prompt */ 18 | .highlight .gs { font-weight: bold } /* Generic.Strong */ 19 | .highlight .gu { color: #800080; font-weight: bold } /* Generic.Subheading */ 20 | .highlight .gt { color: #0044DD } /* Generic.Traceback */ 21 | .highlight .kc { color: #007020; font-weight: bold } /* Keyword.Constant */ 22 | .highlight .kd { color: #007020; font-weight: bold } /* Keyword.Declaration */ 23 | .highlight .kn { color: #007020; font-weight: bold } /* Keyword.Namespace */ 24 | .highlight .kp { color: #007020 } /* Keyword.Pseudo */ 25 | .highlight .kr { color: #007020; font-weight: bold } /* Keyword.Reserved */ 26 | .highlight .kt { color: #902000 } /* Keyword.Type */ 27 | .highlight .m { color: #208050 } /* Literal.Number */ 28 | .highlight .s { color: #4070a0 } /* Literal.String */ 29 | .highlight .na { color: #4070a0 } /* Name.Attribute */ 30 | .highlight .nb { color: #007020 } /* Name.Builtin */ 31 | .highlight .nc { color: #0e84b5; font-weight: bold } /* Name.Class */ 32 | .highlight .no { color: #60add5 } /* Name.Constant */ 33 | .highlight .nd { color: #555555; font-weight: bold } /* Name.Decorator */ 34 | .highlight .ni { color: #d55537; font-weight: bold } /* Name.Entity */ 35 | .highlight .ne { color: #007020 } /* Name.Exception */ 36 | .highlight .nf { color: #06287e } /* Name.Function */ 37 | .highlight .nl { color: #002070; font-weight: bold } /* Name.Label */ 38 | .highlight .nn { color: #0e84b5; font-weight: bold } /* Name.Namespace */ 39 | .highlight .nt { color: #062873; font-weight: bold } /* Name.Tag */ 40 | .highlight .nv { color: #bb60d5 } /* Name.Variable */ 41 | .highlight .ow { color: #007020; font-weight: bold } /* Operator.Word */ 42 | .highlight .w { color: #bbbbbb } /* Text.Whitespace */ 43 | .highlight .mb { color: #208050 } /* Literal.Number.Bin */ 44 | .highlight .mf { color: #208050 } /* Literal.Number.Float */ 45 | .highlight .mh { color: #208050 } /* Literal.Number.Hex */ 46 | .highlight .mi { color: #208050 } /* Literal.Number.Integer */ 47 | .highlight .mo { color: #208050 } /* Literal.Number.Oct */ 48 | .highlight .sb { color: #4070a0 } /* Literal.String.Backtick */ 49 | .highlight .sc { color: #4070a0 } /* Literal.String.Char */ 50 | .highlight .sd { color: #4070a0; font-style: italic } /* Literal.String.Doc */ 51 | .highlight .s2 { color: #4070a0 } /* Literal.String.Double */ 52 | .highlight .se { color: #4070a0; font-weight: bold } /* Literal.String.Escape */ 53 | .highlight .sh { color: #4070a0 } /* Literal.String.Heredoc */ 54 | .highlight .si { color: #70a0d0; font-style: italic } /* Literal.String.Interpol */ 55 | .highlight .sx { color: #c65d09 } /* Literal.String.Other */ 56 | .highlight .sr { color: #235388 } /* Literal.String.Regex */ 57 | .highlight .s1 { color: #4070a0 } /* Literal.String.Single */ 58 | .highlight .ss { color: #517918 } /* Literal.String.Symbol */ 59 | .highlight .bp { color: #007020 } /* Name.Builtin.Pseudo */ 60 | .highlight .vc { color: #bb60d5 } /* Name.Variable.Class */ 61 | .highlight .vg { color: #bb60d5 } /* Name.Variable.Global */ 62 | .highlight .vi { color: #bb60d5 } /* Name.Variable.Instance */ 63 | .highlight .il { color: #208050 } /* Literal.Number.Integer.Long */ -------------------------------------------------------------------------------- /docs (technical)/_build/html/_static/sidebar.js: -------------------------------------------------------------------------------- 1 | /* 2 | * sidebar.js 3 | * ~~~~~~~~~~ 4 | * 5 | * This script makes the Sphinx sidebar collapsible. 6 | * 7 | * .sphinxsidebar contains .sphinxsidebarwrapper. This script adds 8 | * in .sphixsidebar, after .sphinxsidebarwrapper, the #sidebarbutton 9 | * used to collapse and expand the sidebar. 10 | * 11 | * When the sidebar is collapsed the .sphinxsidebarwrapper is hidden 12 | * and the width of the sidebar and the margin-left of the document 13 | * are decreased. When the sidebar is expanded the opposite happens. 14 | * This script saves a per-browser/per-session cookie used to 15 | * remember the position of the sidebar among the pages. 16 | * Once the browser is closed the cookie is deleted and the position 17 | * reset to the default (expanded). 18 | * 19 | * :copyright: Copyright 2007-2014 by the Sphinx team, see AUTHORS. 20 | * :license: BSD, see LICENSE for details. 21 | * 22 | */ 23 | 24 | $(function() { 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | // global elements used by the functions. 34 | // the 'sidebarbutton' element is defined as global after its 35 | // creation, in the add_sidebar_button function 36 | var bodywrapper = $('.bodywrapper'); 37 | var sidebar = $('.sphinxsidebar'); 38 | var sidebarwrapper = $('.sphinxsidebarwrapper'); 39 | 40 | // for some reason, the document has no sidebar; do not run into errors 41 | if (!sidebar.length) return; 42 | 43 | // original margin-left of the bodywrapper and width of the sidebar 44 | // with the sidebar expanded 45 | var bw_margin_expanded = bodywrapper.css('margin-left'); 46 | var ssb_width_expanded = sidebar.width(); 47 | 48 | // margin-left of the bodywrapper and width of the sidebar 49 | // with the sidebar collapsed 50 | var bw_margin_collapsed = '.8em'; 51 | var ssb_width_collapsed = '.8em'; 52 | 53 | // colors used by the current theme 54 | var dark_color = $('.related').css('background-color'); 55 | var light_color = $('.document').css('background-color'); 56 | 57 | function sidebar_is_collapsed() { 58 | return sidebarwrapper.is(':not(:visible)'); 59 | } 60 | 61 | function toggle_sidebar() { 62 | if (sidebar_is_collapsed()) 63 | expand_sidebar(); 64 | else 65 | collapse_sidebar(); 66 | } 67 | 68 | function collapse_sidebar() { 69 | sidebarwrapper.hide(); 70 | sidebar.css('width', ssb_width_collapsed); 71 | bodywrapper.css('margin-left', bw_margin_collapsed); 72 | sidebarbutton.css({ 73 | 'margin-left': '0', 74 | 'height': bodywrapper.height() 75 | }); 76 | sidebarbutton.find('span').text('»'); 77 | sidebarbutton.attr('title', _('Expand sidebar')); 78 | document.cookie = 'sidebar=collapsed'; 79 | } 80 | 81 | function expand_sidebar() { 82 | bodywrapper.css('margin-left', bw_margin_expanded); 83 | sidebar.css('width', ssb_width_expanded); 84 | sidebarwrapper.show(); 85 | sidebarbutton.css({ 86 | 'margin-left': ssb_width_expanded-12, 87 | 'height': bodywrapper.height() 88 | }); 89 | sidebarbutton.find('span').text('«'); 90 | sidebarbutton.attr('title', _('Collapse sidebar')); 91 | document.cookie = 'sidebar=expanded'; 92 | } 93 | 94 | function add_sidebar_button() { 95 | sidebarwrapper.css({ 96 | 'float': 'left', 97 | 'margin-right': '0', 98 | 'width': ssb_width_expanded - 28 99 | }); 100 | // create the button 101 | sidebar.append( 102 | '
«
' 103 | ); 104 | var sidebarbutton = $('#sidebarbutton'); 105 | light_color = sidebarbutton.css('background-color'); 106 | // find the height of the viewport to center the '<<' in the page 107 | var viewport_height; 108 | if (window.innerHeight) 109 | viewport_height = window.innerHeight; 110 | else 111 | viewport_height = $(window).height(); 112 | sidebarbutton.find('span').css({ 113 | 'display': 'block', 114 | 'margin-top': (viewport_height - sidebar.position().top - 20) / 2 115 | }); 116 | 117 | sidebarbutton.click(toggle_sidebar); 118 | sidebarbutton.attr('title', _('Collapse sidebar')); 119 | sidebarbutton.css({ 120 | 'color': '#FFFFFF', 121 | 'border-left': '1px solid ' + dark_color, 122 | 'font-size': '1.2em', 123 | 'cursor': 'pointer', 124 | 'height': bodywrapper.height(), 125 | 'padding-top': '1px', 126 | 'margin-left': ssb_width_expanded - 12 127 | }); 128 | 129 | sidebarbutton.hover( 130 | function () { 131 | $(this).css('background-color', dark_color); 132 | }, 133 | function () { 134 | $(this).css('background-color', light_color); 135 | } 136 | ); 137 | } 138 | 139 | function set_position_from_cookie() { 140 | if (!document.cookie) 141 | return; 142 | var items = document.cookie.split(';'); 143 | for(var k=0; k 3 | 4 | 5 | 6 | 7 | 8 | 9 | Search — Schema Generator 0.1 documentation 10 | 11 | 12 | 13 | 14 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 50 | 51 |
52 |
53 |
54 |
55 | 56 |

Search

57 |
58 | 59 |

60 | Please activate JavaScript to enable the search 61 | functionality. 62 |

63 |
64 |

65 | From here you can search these documents. Enter your search 66 | words into the box below and click "search". Note that the search 67 | function will automatically search for all of the words. Pages 68 | containing fewer words won't appear in the result list. 69 |

70 |
71 | 72 | 73 | 74 |
75 | 76 |
77 | 78 |
79 | 80 |
81 |
82 |
83 | 104 |
105 |
106 | 118 | 122 | 123 | 124 | -------------------------------------------------------------------------------- /docs (technical)/_build/html/searchindex.js: -------------------------------------------------------------------------------- 1 | Search.setIndex({objnames:{"0":["py","module","Python module"],"1":["py","staticmethod","Python static method"],"2":["py","method","Python method"],"3":["py","class","Python class"],"4":["py","attribute","Python attribute"]},filenames:["apache","schema_bot","controller","javascript","index","model","view"],titleterms:{javascript:3,start:[1,2],server:[1,2],port:2,welcom:4,bot:1,restart:[1,2],anoth:2,copyright:4,"default":2,apache2:0,down:2,control:2,indic:4,inform:4,tabl:4,document:4,schema:[1,4],configur:0,model:5,shut:2,conf:0,gener:4,view:6},objects:{"":{schema_bot:[1,0,0,"-"],controller:[2,0,0,"-"]},"view.schema_view":{SchemaView:[6,3,1,""]},"model.schema.Hierarchy":{hierarchy:[5,4,1,""],get_schema:[5,2,1,""]},"model.schema.SchemaClassGenerator":{run:[5,2,1,""]},"model.schema.SchemaClass":{generator_callback:[5,2,1,""],start:[5,2,1,""],get_parent_class:[5,4,1,""],clean:[5,2,1,""],get_schema_body:[5,2,1,""]},controller:{EZContext:[2,3,1,""],EZQuit:[2,3,1,""],Controller:[2,3,1,""]},model:{schema:[5,0,0,"-"]},"model.schema":{SchemaClass:[5,3,1,""],Hierarchy:[5,3,1,""],SchemaClassGenerator:[5,3,1,""]},"controller.EZContext":{get_keys:[2,4,1,""],get:[2,2,1,""]},"controller.Controller":{run_this:[2,2,1,""],server_close:[2,2,1,""]},"view.schema_view.SchemaView":{get_index:[6,2,1,""],generate_schema_output:[6,2,1,""],ajax_properties:[6,1,1,""],show_schema_properties:[6,2,1,""],get_saved_output:[6,1,1,""]},view:{schema_view:[6,0,0,"-"]}},terms:{query_str:[2,6],urlopen:2,s_gen:5,later:3,actual:5,error:2,localstorag:[3,6],code:[1,4],cron:[1,4],begin:2,action:3,except:2,depend:3,schemaclassgener:5,command:2,after:[1,5],bot:[],forc:5,saveschema:3,messag:3,fetch:1,onli:3,creat:[4,5,6],file_nam:1,locat:[0,1,3],innerhtml:3,"_version":5,everi:1,properti:[5,6],insid:1,found:2,"while":[1,2],b_immedi:5,construct:2,retriev:5,everyth:1,schemaclass:[5,6],run:5,cannot:2,languag:4,"__main__":1,instanc:4,thei:4,toggl:3,get_parent_class:5,aliv:1,parent:5,form:3,geo:4,brand:0,browser:2,png:0,"class":[1,2,5,6],becom:5,chdir:1,python3:[1,2],obtain:[3,2,5],name:[4,5],level:[3,6],snippet:0,localhost:[0,2],correct:[1,3],commonspot:4,paramet:[2,5,6],togeth:3,softwar:4,fals:5,gov:4,app:4,hide:3,geocoordin:4,amp:4,view:[],dir:1,"_hierarchi":5,"_property_typ":5,instead:3,flow:2,show_schema_properti:[5,6],join:5,manag:2,improv:[3,4],invok:2,schema_view:6,comput:[1,2],is_al:[1,5],"_traverse_hierarchi":6,websit:4,site:0,"__file__":1,cours:1,secur:2,favicon:0,all:[0,3,4,2,5,6],"try":2,common:4,ezquit:2,where:[1,3,2],chang:1,park:4,yell:4,element:3,same:[1,5],callabl:2,here:2,file:[0,1,3,4,5],happen:1,alreadi:3,applic:[0,1,3,4,2,5,6],base:1,inform:[],structur:[0,1,3,4,2,5,6],size:5,effect:6,necessari:1,run_thi:2,thing:5,input:[2,5],modul:4,shown:[1,3],must:2,demon:2,"import":[1,2],quit:[0,2],www:4,manual:0,utf:5,span:4,complet:5,execut:3,concern:2,output:6,next:3,arg:3,indic:[],back:5,thread:[2,5],place:6,"function":[1,3,4,5,6],need:0,parknam:4,doesn:1,apach:0,concurr:[4,5],internet:5,repres:2,empti:[3,2],confirm:3,seo:4,displai:3,exampl:3,work:0,under:2,div:[3,4,6],content:[0,3,4],respons:2,more:2,callback:5,test:[0,1,3,4,2,5,6],method:[2,5,6],copi:3,petit:0,reduc:[0,5],would:0,consecut:1,call:[1,3,5,6],can:[0,1,3,4,2,5,6],job:[1,4],other:[0,3],javascript:[],cleardata:3,top:6,delet:3,txt:4,index:[0,1,3,4,6],button:3,field:3,storag:2,ezcontext:2,administr:0,finish:[1,5],meant:4,whether:5,submit:3,http:[0,4,2],persist:4,down:[],itemprop:4,contain:[2,5,6],yellowston:4,schema_nam:6,googl:[2,6],analyz:5,context:6,set:[3,4],recoverdata:3,print:1,recurs:6,version:[1,4,5],clean:5,root:3,hierarchi:[1,3,4,5,6],latitud:4,respect:6,proxypassrevers:0,generate_schema_output:6,done:5,get_kei:2,hasmap:4,via:1,dump:5,onc:3,balanc:[0,4],jqueri:3,avail:[0,3],main:1,program:4,directori:0,number:2,longitud:4,otherwis:5,thi:[0,1,3,4,5,6],recoveri:3,argument:6,etc:[0,1],readm:4,itemscop:4,onload:3,maintain:[4,5],save:3,side:4,schema:[],from:[1,3,2,5],noth:[2,5],subdirectori:3,safe:5,link:0,generator_callback:5,recommend:0,server:[],origin:3,refer:4,when:[0,5],todo:[0,3],between:3,alphacod:4,privat:6,url:[4,5],port:[],line:2,list:[5,6],"__name__":1,urlerror:2,urllib:2,access:2,cfm:4,object:2,org:[0,1,3,4,2,5,6],htm:[0,4],date:4,"return":[0,3,2,5,6],shownextschema:3,safeti:5,local:2,forward:0,get_saved_output:6,generateschema:3,reason:2,interchang:2,restart:[],recov:3,handl:[0,6],environ:2,whole:5,show:[3,6],customcf:4,send:3,get:[3,2,5,6],string:[2,5],screen:3,natur:1,less:2,model:[],shut:[],section:6,python:[4,2],kei:2,listen:4,"static":[0,1,3,6],see:5,system:0,decod:5,"_html":5,ajax_properti:6,tab:[0,3],independ:2,wsgi:2,full:[1,6],control:[],differ:[0,3,2,4],ico:0,"_callback":5,old:3,"_schema":5,ajax:[3,4],post:[3,2],rewriteengin:0,"public":5,data:[0,1,3,4,2,5,6],exist:1,serv:[4,2],outdat:1,store:[3,2,6],situat:3,"true":5,replac:3,get_schema_bodi:5,loop:1,below:1,itemtyp:4,check:[1,5],external_link:0,been:[1,3,5,6],still:0,develop:[3,4,2,6],load:[0,4],schemaview:[5,6],hour:1,schema_bot:1,stop:2,showmap:4,experi:6,ctx:6,"new":[0,1,5],str:6,clear:3,get_schema:5,publish:5,pickl:[1,5],tool:[0,1,3,4,2,5,6],httpd:2,page:[3,4,2],web:[0,1,3,4,2,5,6],goal:5,none:[3,5],syntact:3,block:[0,3],imag:0,valid:[4,2,6],order:5,markup:[4,5],pass:[1,2],proxypass:0,befor:5,gener:[],might:3,web_hierarchi:6,format:2,get_index:6,treat:2,updat:1,option:5,each:1,directli:[0,2],current:2,base_dir:1,proxypassmatch:0,server_clos:2,html:[0,1,3,5,6],through:[3,2],valu:2,rewriterul:0,type:[5,6],close:2,should:[1,3,4],map:[4,2],search:4,tri:5,readi:3,open:0,property_typ:[],request:2,quot:4,start_respons:2},titles:["Apache2 configuration","Schema bot","Controller","Javascript","Welcome to the Schema Generator documentation!","Model","View"],envversion:43,objtypes:{"0":"py:module","1":"py:staticmethod","2":"py:method","3":"py:class","4":"py:attribute"}}) -------------------------------------------------------------------------------- /docs (technical)/_templates/localtoc.html: -------------------------------------------------------------------------------- 1 | {# 2 | basic/localtoc.html 3 | ~~~~~~~~~~~~~~~~~~~ 4 | 5 | Sphinx sidebar template: local table of contents. 6 | 7 | :copyright: Copyright 2007-2014 by the Sphinx team, see AUTHORS. 8 | :license: BSD, see LICENSE for details. 9 | #} 10 | {%- if display_toc %} 11 |

{{ _('Page Contents') }}

12 | {{ toc }} 13 | {%- endif %} 14 | -------------------------------------------------------------------------------- /docs (technical)/apache.rst: -------------------------------------------------------------------------------- 1 | Apache2 configuration 2 | ===================== 3 | 4 | A Web Server can be configured to reduce the load of the |Application Server| by handling static content. It is recommended to do this, as ``/quit`` will shut-down the |Application Server|. 5 | 6 | Static content: 7 | 8 | * index.html - generated by the |Schema bot|. 9 | * schema.js - the |javascript| file 10 | * external_link.png - image file used to indicate the link will open a new tab 11 | * favicon.ico - branding image 12 | 13 | .conf 14 | ===== 15 | 16 | The ``.conf`` file is located in the ``/etc/apache2/sites-available/`` directory. 17 | 18 | .. code-block:: apache 19 | 20 | RewriteEngine On 21 | RewriteRule (quit$)|(restart$) /index.html 22 | 23 | ProxyPassMatch (/$)|(.png$)|(.html$)|(.htm$)|(.ico$)|(.js$) ! 24 | ProxyPass / http://localhost:8000/ 25 | ProxyPassReverse / http://localhost:8000/ 26 | 27 | This snippet blocks the ``/quit`` and ``/restart`` petitions that would shut-down or restart the |Application Server|. ``http://localhost:8000/quit`` will still work, so a systems administrator can manually shut-down or restart the Application Server(s). |Schema bot| will restart the Application Server(s) when needed. 28 | 29 | The Web Server will return the ``index.html``, ``schema.js``, ``external_link.png`` and ``favicon.ico`` directly. 30 | 31 | The Web Server will forward all other petitions to the |Application Server| at ``http://localhost:8000/`` 32 | 33 | ** TODO: Load balance Apache to different ports 34 | -------------------------------------------------------------------------------- /docs (technical)/controller.rst: -------------------------------------------------------------------------------- 1 | Controller 2 | ========== 3 | 4 | .. automodule:: controller 5 | :members: 6 | 7 | Starting the server at default port 8000 8 | ======================================== 9 | 10 | The Application Server can be started directly from the command line 11 | 12 | .. code-block:: bash 13 | 14 | computer:~$ ./controller.py 15 | 16 | or 17 | 18 | .. code-block:: bash 19 | 20 | computer:~$ python3 controller.py 21 | 22 | Starting the server at another port 23 | =================================== 24 | 25 | A number of Application Servers can be started to serve at different ports. 26 | 27 | .. code-block:: bash 28 | 29 | computer:~$ ./controller.py 8001 & 30 | 31 | or 32 | 33 | .. code-block:: bash 34 | 35 | computer:~$ python3 controller.py 8001 & 36 | 37 | Shutting down the server 38 | ======================== 39 | 40 | The server can be shut down from a browser. 41 | 42 | .. code-block:: http 43 | 44 | http://localhost:port/quit 45 | 46 | or using Python 47 | 48 | .. code-block:: python 49 | 50 | from urllib.error import URLError 51 | from urllib.request import urlopen 52 | 53 | try: 54 | urlopen('http://localhost:{0}/quit'.format(port)) 55 | except URLError: 56 | pass 57 | 58 | Restarting the server 59 | ===================== 60 | 61 | The server can be shut down from a browser. 62 | 63 | .. code-block:: http 64 | 65 | http://localhost:port/restart 66 | 67 | or using Python 68 | 69 | .. code-block:: python 70 | 71 | from urllib.error import URLError 72 | from urllib.request import urlopen 73 | 74 | try: 75 | urlopen('http://localhost:{0}/restart'.format(port)) 76 | except URLError: 77 | pass 78 | -------------------------------------------------------------------------------- /docs (technical)/extra/Readme.txt: -------------------------------------------------------------------------------- 1 | Tool for generating a valid Scheme as proposed by Schema.org 2 | Copyright (C) 2016 - 2021 Hans Polak 3 | 4 | This program is free software: you can redistribute it and/or modify 5 | it under the terms of the GNU General Public License as published by 6 | the Free Software Foundation, either version 3 of the License, or 7 | (at your option) any later version. 8 | 9 | This program is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | GNU General Public License for more details. 13 | 14 | You should have received a copy of the GNU General Public License 15 | along with this program. If not, see . 16 | 17 | __author__ = "Hans Polak" 18 | __copyright__ = "Copyright 2016 - 2021" 19 | __credits__ = ["Hans Polak"] 20 | __license__ = "GNU GPL" 21 | __version__ = "3.0" 22 | __maintainer__ = "Hans Polak" 23 | __email__ = "info@polak.es" 24 | __status__ = "Beta testing" 25 | 26 | -------------------------------------------------------------------------------- /docs (technical)/images/external_link.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GUI-Junkie/Schema.org-Generator/6e5f915bed963f7e1028927c28eb823ec30ded71/docs (technical)/images/external_link.png -------------------------------------------------------------------------------- /docs (technical)/images/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GUI-Junkie/Schema.org-Generator/6e5f915bed963f7e1028927c28eb823ec30ded71/docs (technical)/images/favicon.ico -------------------------------------------------------------------------------- /docs (technical)/index.rst: -------------------------------------------------------------------------------- 1 | .. Schema documentation master file, created by 2 | sphinx-quickstart on Sat Feb 13 13:27:50 2016. 3 | You can adapt this file completely to your liking, but it should at least 4 | contain the root `toctree` directive. 5 | 6 | Welcome to the `Schema Generator` documentation! 7 | ================================================ 8 | 9 | Contents: 10 | 11 | .. toctree:: 12 | :maxdepth: 2 13 | 14 | model 15 | view 16 | controller 17 | javascript 18 | apache 19 | schema_bot 20 | 21 | This software is meant to serve as a tool for creating valid |schema.org| |external_link| markups. These can then be used by web developers to improve the SEO of the websites they maintain. 22 | 23 | For instance 24 | 25 | .. raw:: html 26 | 27 |
<div itemscope itemtype="http://schema.org/Park">
28 |         <div itemprop=geo itemscope itemtype="http://schema.org/GeoCoordinates">
29 |             <span itemprop="latitude">44.4279668</span>
30 |             <span itemprop="longitude">-110.5906437</span>
31 |         </div>
32 |         <span itemprop="hasMap">http://www.nps.gov/common/commonspot/customcf/apps/maps/showmap.cfm?alphacode=yell&parkname=Yellowstone</span>
33 |         <span itemprop="name">Yellowstone</span>
34 |         <span itemprop="url">http://www.nps.gov/yell/index.htm</span>
35 |     </div>
36 |     
37 |
38 | 39 | To maintain an up-to-date version of the hierarchy, the |Schema bot| can be set-up with a ``cron`` job 40 | 41 | The |Application Server| can be started, concurrently, listening to different ports. The |Web Server| should be configured for load balancing to these different ports. 42 | 43 | Programming languages: 44 | 45 | * |Python 3.4| |external_link| - All server side code 46 | 47 | * |Javascript| |external_link| - AJAX functionality and persistence 48 | 49 | Copyright information 50 | ===================== 51 | 52 | Refer to the |Readme.txt| file for © copyright information 53 | 54 | 55 | Indices and tables 56 | ================== 57 | 58 | * :ref:`genindex` 59 | * :ref:`modindex` 60 | * :ref:`search` 61 | 62 | .. |Readme.txt| raw:: html 63 | 64 | Readme.txt 65 | 66 | .. |Python 3.4| raw:: html 67 | 68 | Python 3.4 69 | 70 | .. |Javascript| raw:: html 71 | 72 | Javascript 73 | -------------------------------------------------------------------------------- /docs (technical)/javascript.rst: -------------------------------------------------------------------------------- 1 | Javascript 2 | ========== 3 | 4 | Located in the ``view`` subdirectory for development, the ``schema.js`` file should be located at the root of the |Web Server| together with all other static files. 5 | 6 | .. code-block:: javascript 7 | 8 | function onLoad(arg) 9 | 10 | This function shows the different buttons depending on the situation. 11 | 12 | * index.html (arg is empty) 13 | - the ``Recover Data`` button is shown if the LocalStorage has data 14 | - the ``Clear Data`` button is shown together with the ``Recover Data`` button 15 | * all other pages (arg is "schema") 16 | - the ``Save Schema`` button is shown only if LocalStorage is available 17 | - the ``Generate Schema`` button is shown 18 | - the ``Recover Data`` button is shown if the LocalStorage has data 19 | - the ``Clear Data`` button is shown together with the ``Recover Data`` button 20 | 21 | .. code-block:: javascript 22 | 23 | function ShowNextSchema(schema, id) 24 | 25 | This function will get the next level on the hierarchy through an AJAX call, only once. If the level has already been obtained, it will toggle the display setting between ``None`` and ``Block`` 26 | 27 | * schema - the next element in the hierarchy 28 | * id - the div where the content is to be shown 29 | 30 | .. code-block:: javascript 31 | 32 | function GenerateSchema() 33 | 34 | This function only executes the ``submit()`` action of the form, sending all the fields to the |Application Server| through the POST action. A syntactically correct schema.org schema will be returned. 35 | 36 | .. code-block:: javascript 37 | 38 | function SaveSchema() 39 | 40 | This function can only be called if LocalStorage is available. It will clear the old content of the LocalStorage and then will save all data on screen for later recovery. Then, it will show a confirmation the schema has been saved. 41 | 42 | ** TODO: The confirmation message might be improved using AJAX instead 43 | 44 | .. code-block:: javascript 45 | 46 | function RecoverData() 47 | 48 | This function will replace the ``innerHTML`` with the content stored in LocalStorage 49 | 50 | .. code-block:: javascript 51 | 52 | function ClearData() 53 | 54 | This function will delete the content stored in LocalStorage and hide the ``Recover Data`` and ``Clear Data`` buttons. 55 | 56 | .. code-block:: javascript 57 | 58 | $(document).ready(function() 59 | 60 | jQuery copied from schema.org. This will show the example tabs of the original schema.org example tabs. 61 | -------------------------------------------------------------------------------- /docs (technical)/model.rst: -------------------------------------------------------------------------------- 1 | Model 2 | ===== 3 | 4 | .. automodule:: model.schema 5 | :members: 6 | -------------------------------------------------------------------------------- /docs (technical)/schema_bot.rst: -------------------------------------------------------------------------------- 1 | Schema bot 2 | ========== 3 | 4 | .. automodule:: schema_bot 5 | :members: 6 | 7 | Starting the bot 8 | ================ 9 | 10 | .. code-block:: bash 11 | 12 | computer:~$ ./schema_bot.py 13 | 14 | or 15 | 16 | .. code-block:: bash 17 | 18 | computer:~$ python3 schema_bot.py 19 | 20 | Restarting the server(s) 21 | ======================== 22 | 23 | To restart the server(s), the ``restart(port)`` function should be called for each port as shown below 24 | If the ports are consecutive, a ``for-loop`` can be used, of course. 25 | 26 | This code is, naturally, inside the ``schema_bot.py`` file 27 | 28 | .. code-block:: python 29 | 30 | if __name__ == "__main__": 31 | from os import chdir 32 | 33 | print('Schema Bot - main') 34 | 35 | # Change the base dir to where this __file__ is located 36 | # Same location as the Hierarchy.pickle file 37 | FILE_NAME = 'schema_bot.py' 38 | if __file__ != FILE_NAME: 39 | BASE_DIR = __file__[:__file__.index(FILE_NAME)] 40 | chdir(BASE_DIR) 41 | 42 | # Start the Bot 43 | # Check if file exists 44 | # Check if version is correct 45 | b = Bot() 46 | 47 | # Everything happens while the bot is alive 48 | while b.is_alive(): 49 | pass 50 | 51 | # Restart the server(s) if the pickle file has been updated 52 | if b.updated: 53 | restart(8000) # Restart server at port 8000 54 | restart(8001) # Etc 55 | print('Schema Bot - main finished') 56 | -------------------------------------------------------------------------------- /docs (technical)/view.rst: -------------------------------------------------------------------------------- 1 | View 2 | ==== 3 | 4 | .. automodule:: view.schema_view 5 | :members: 6 | -------------------------------------------------------------------------------- /src/Hierarchy.pickle: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GUI-Junkie/Schema.org-Generator/6e5f915bed963f7e1028927c28eb823ec30ded71/src/Hierarchy.pickle -------------------------------------------------------------------------------- /src/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GUI-Junkie/Schema.org-Generator/6e5f915bed963f7e1028927c28eb823ec30ded71/src/__init__.py -------------------------------------------------------------------------------- /src/__pycache__/controller.cpython-34.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GUI-Junkie/Schema.org-Generator/6e5f915bed963f7e1028927c28eb823ec30ded71/src/__pycache__/controller.cpython-34.pyc -------------------------------------------------------------------------------- /src/__pycache__/nqparser.cpython-36.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GUI-Junkie/Schema.org-Generator/6e5f915bed963f7e1028927c28eb823ec30ded71/src/__pycache__/nqparser.cpython-36.pyc -------------------------------------------------------------------------------- /src/__pycache__/nqparser.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GUI-Junkie/Schema.org-Generator/6e5f915bed963f7e1028927c28eb823ec30ded71/src/__pycache__/nqparser.cpython-37.pyc -------------------------------------------------------------------------------- /src/__pycache__/schema_bot.cpython-34.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GUI-Junkie/Schema.org-Generator/6e5f915bed963f7e1028927c28eb823ec30ded71/src/__pycache__/schema_bot.cpython-34.pyc -------------------------------------------------------------------------------- /src/__pycache__/schema_bot.cpython-35.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GUI-Junkie/Schema.org-Generator/6e5f915bed963f7e1028927c28eb823ec30ded71/src/__pycache__/schema_bot.cpython-35.pyc -------------------------------------------------------------------------------- /src/__pycache__/schema_bot.cpython-36.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GUI-Junkie/Schema.org-Generator/6e5f915bed963f7e1028927c28eb823ec30ded71/src/__pycache__/schema_bot.cpython-36.pyc -------------------------------------------------------------------------------- /src/__pycache__/schema_bot.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GUI-Junkie/Schema.org-Generator/6e5f915bed963f7e1028927c28eb823ec30ded71/src/__pycache__/schema_bot.cpython-37.pyc -------------------------------------------------------------------------------- /src/controller.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GUI-Junkie/Schema.org-Generator/6e5f915bed963f7e1028927c28eb823ec30ded71/src/controller.pyc -------------------------------------------------------------------------------- /src/model/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GUI-Junkie/Schema.org-Generator/6e5f915bed963f7e1028927c28eb823ec30ded71/src/model/__init__.py -------------------------------------------------------------------------------- /src/model/__pycache__/__init__.cpython-34.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GUI-Junkie/Schema.org-Generator/6e5f915bed963f7e1028927c28eb823ec30ded71/src/model/__pycache__/__init__.cpython-34.pyc -------------------------------------------------------------------------------- /src/model/__pycache__/__init__.cpython-35.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GUI-Junkie/Schema.org-Generator/6e5f915bed963f7e1028927c28eb823ec30ded71/src/model/__pycache__/__init__.cpython-35.pyc -------------------------------------------------------------------------------- /src/model/__pycache__/__init__.cpython-36.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GUI-Junkie/Schema.org-Generator/6e5f915bed963f7e1028927c28eb823ec30ded71/src/model/__pycache__/__init__.cpython-36.pyc -------------------------------------------------------------------------------- /src/model/__pycache__/__init__.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GUI-Junkie/Schema.org-Generator/6e5f915bed963f7e1028927c28eb823ec30ded71/src/model/__pycache__/__init__.cpython-37.pyc -------------------------------------------------------------------------------- /src/model/__pycache__/schema.cpython-34.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GUI-Junkie/Schema.org-Generator/6e5f915bed963f7e1028927c28eb823ec30ded71/src/model/__pycache__/schema.cpython-34.pyc -------------------------------------------------------------------------------- /src/model/__pycache__/schema.cpython-35.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GUI-Junkie/Schema.org-Generator/6e5f915bed963f7e1028927c28eb823ec30ded71/src/model/__pycache__/schema.cpython-35.pyc -------------------------------------------------------------------------------- /src/model/__pycache__/schema.cpython-36.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GUI-Junkie/Schema.org-Generator/6e5f915bed963f7e1028927c28eb823ec30ded71/src/model/__pycache__/schema.cpython-36.pyc -------------------------------------------------------------------------------- /src/model/__pycache__/schema.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GUI-Junkie/Schema.org-Generator/6e5f915bed963f7e1028927c28eb823ec30ded71/src/model/__pycache__/schema.cpython-37.pyc -------------------------------------------------------------------------------- /src/model/schema.py: -------------------------------------------------------------------------------- 1 | """ 2 | Model of the |Model View Controller| |external_link| 3 | 4 | Contains the classes for the 5 | 6 | * Hierarchy 7 | 8 | * Schemas 9 | """ 10 | from pickle import load 11 | 12 | # Constants 13 | HIERARCHY_FILE = 'Hierarchy.pickle' 14 | PROPERTY_TYPES = {'Date', 'URL', 'Number', 'Integer', 'Text', 'Boolean', 'Time', 'DateTime'} 15 | READ_BINARY = 'rb' 16 | WRITE_BINARY = 'wb' 17 | FILE_NAME = 'model/schema.py' 18 | SCHEMA_ORG = 'http://schema.org/' 19 | # SCHEMA_ORG = 'http://webschemas.org/' 20 | 21 | 22 | class Hierarchy: 23 | """ 24 | Class: Hierarchy 25 | 26 | Goal: Get the whole hierarchy of Schema.org 27 | 28 | * _schemas contains the actual schemas 29 | 30 | * _hierarchy contains a list of lists to maintain the same order as Schema.org 31 | 32 | * _property_types contains the input types 33 | 34 | * _version check to see whether a new version of Schema.org has been published 35 | """ 36 | 37 | def __init__(self): 38 | base_dir = '' 39 | if __file__ != FILE_NAME: 40 | base_dir = __file__[:__file__.index(FILE_NAME)] 41 | 42 | self.version = 0.0 # Version of Schema.org 43 | self._schemas = {} # Dictionary for rapid access 44 | self._hierarchy = [] # Hierarchy, list of lists for ordering output 45 | self._property_types = PROPERTY_TYPES # Set of basic properties that should be rendered as inputs 46 | 47 | try: 48 | # First load the existing HIERARCHY_FILE 49 | with open(f'{base_dir}{HIERARCHY_FILE}', READ_BINARY) as f: 50 | pickle_list = load(f) 51 | 52 | # HIERARCHY_FILE is created by schema_bot 53 | self.version = pickle_list[0] 54 | self._schemas = pickle_list[1] 55 | self._hierarchy = pickle_list[2] 56 | 57 | except FileNotFoundError: 58 | # HIERARCHY_FILE does not exist, shut down 59 | exit('HIERARCHY_FILE does not exist') 60 | 61 | def get_schema(self, thing): 62 | """ 63 | Public function to obtain one schema 64 | 65 | :param thing: string, name of the schema to retrieve 66 | 67 | :return: schema 68 | """ 69 | try: 70 | # Get the schema from the dictionary 71 | return self._schemas[thing] 72 | except KeyError: 73 | # Maybe the schema exists with another case 74 | thing = thing.lower() 75 | for schema in self._schemas.keys(): 76 | if thing == schema.lower(): 77 | return self._schemas[schema] 78 | 79 | raise SchemaNotFoundError 80 | 81 | def get_hierarchy(self, breadcrumb): 82 | if 'Thing' == breadcrumb: 83 | return self._hierarchy[1], '' 84 | 85 | if '.' in breadcrumb: 86 | parents = breadcrumb.split('.') 87 | else: 88 | parents = list(self._schemas[breadcrumb].get_parent_class[0]) 89 | parents.append(breadcrumb) 90 | 91 | hierarchy = self._hierarchy 92 | for x in range(0, len(parents)): 93 | # Walk the hierarchy until found 94 | hierarchy = hierarchy[hierarchy.index(parents[x]) + 1] 95 | 96 | return hierarchy, '.'.join(parents) 97 | 98 | @property 99 | def hierarchy(self): 100 | """ 101 | Public function to obtain the hierarchy 102 | 103 | :return: hierarchy- list 104 | """ 105 | return self._hierarchy 106 | 107 | 108 | class SchemaClass: 109 | """ 110 | Class: SchemaClass 111 | """ 112 | def __init__(self, thing): 113 | self._html = '' 114 | self.parent = None 115 | self.properties = {} 116 | self.name = thing 117 | self.url = SCHEMA_ORG 118 | 119 | @property 120 | def get_parent_class(self): 121 | """ 122 | Class method to get all parents of one schema used by |Schema bot| to create the hierarchy 123 | 124 | :return: list of lists 125 | """ 126 | return self.parent 127 | 128 | 129 | class SchemaNotFoundError(Exception): 130 | pass 131 | -------------------------------------------------------------------------------- /src/ontology.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | Schema.org Ontology Generator 12 | 13 | 15 | 16 | 17 |
18 |
19 |

20 |
21 |
22 |
23 | 24 | 25 |
26 |
27 | 28 | 29 | 30 | 31 |
32 | 33 | 34 | 35 | 36 |
37 | 38 | 39 | -------------------------------------------------------------------------------- /src/schema_bot.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/python3 2 | """ 3 | Bot for fetching the |Schema.org| |external_link| full hierarchy to generate the ``Hierarchy.pickle`` file 4 | 5 | The Bot class will check for the existence of the pickle file and for the version 6 | 7 | * If the file doesn't exist, it will be generated by the Bot 8 | 9 | * If the file is outdated, it will be updated by the Bot 10 | 11 | After updating the ``Hierarchy.pickle`` file, a new static ``index.html`` will be generated 12 | 13 | The Bot should be called via a ``cron`` job every 24 hours 14 | 15 | * The Application Server |Controller| (or Controllers) will be restarted if necessary 16 | """ 17 | from os import remove, makedirs 18 | # Refer to the Readme.txt file for © copyright information 19 | from pickle import load 20 | from shutil import rmtree 21 | from threading import Thread 22 | from time import sleep 23 | from urllib.error import URLError, HTTPError 24 | from urllib.request import urlopen 25 | from zlib import decompress, MAX_WBITS 26 | 27 | from model.schema import SCHEMA_ORG 28 | from nqparser import treat_file 29 | 30 | HIERARCHY_FILE = 'Hierarchy.pickle' 31 | READ_BINARY = 'rb' 32 | WRITE = 'w' 33 | WRITE_BINARY = 'wb' 34 | 35 | 36 | class Bot(Thread): 37 | def __init__(self): 38 | Thread.__init__(self) 39 | # Public attributes 40 | self.debug = False # Running locally 41 | self.updated = False 42 | self.error = None 43 | self.version = 0.0 # Version of Schema.org 44 | 45 | # Private attributes 46 | self._is_alive = True 47 | self._schemas = {} # Dictionary for rapid access 48 | 49 | def run(self): 50 | is_dirty = False 51 | try: 52 | # First load the existing HIERARCHY_FILE 53 | with open(HIERARCHY_FILE, READ_BINARY) as f: 54 | pickle_list = load(f) 55 | self.version = pickle_list[0] 56 | except FileNotFoundError: 57 | # HIERARCHY_FILE is not there 58 | is_dirty = True 59 | 60 | if self.debug: 61 | is_dirty = True 62 | self.version = 0.0 63 | 64 | # Check the version of the Hierarchy against the known version 65 | i_tries = 0 66 | txt = None 67 | while i_tries < 9 and txt is None: 68 | i_tries += 1 69 | try: 70 | with urlopen(f'{SCHEMA_ORG}docs/releases.html') as f: 71 | txt = f.read() 72 | if 31 == txt[0]: # If the txt is compressed, decompress 73 | txt = decompress(txt, 16 + MAX_WBITS) 74 | except URLError: 75 | # Wait a millisecond before trying again 76 | print('Sleeping Schema_bot... waiting for version') 77 | sleep(0.1) 78 | 79 | if txt is None: 80 | # Abandon ship 81 | self.error = 'Schema bot abandoned. Check Internet connection' 82 | return 83 | 84 | # Check the version 85 | # 2.1
sdo-ganymede
(2015-08-06) 86 | txt = txt.decode() 87 | ind = txt.index('class="release"') 88 | ind += txt[ind:].index('href="') + len('href="/version/') 89 | version = float(txt[ind:ind + txt[ind:].index('/')]) 90 | if version > self.version: 91 | self.version = version 92 | is_dirty = True 93 | 94 | if is_dirty: 95 | # Get the new release all-layers.nq file 96 | # https://raw.githubusercontent.com/schemaorg/schemaorg/master/data/releases/3.0/all-layers.nq 97 | try: 98 | with urlopen('https://raw.githubusercontent.com/schemaorg/schemaorg/master/data/releases/' 99 | f'{version}/all-layers.nq') as f: 100 | txt = f.read() 101 | except HTTPError: 102 | with urlopen('https://raw.githubusercontent.com/schemaorg/schemaorg/sdo-makemake/data/releases/' 103 | f'{version}/all-layers.nq') as f: 104 | txt = f.read() 105 | 106 | with open('all-layers.nq', WRITE) as f: 107 | f.write(txt.decode()) 108 | 109 | # Delete index.html 110 | try: 111 | remove('view/index.html') 112 | except FileNotFoundError: 113 | pass 114 | 115 | # Delete all schemas 116 | rmtree('schemas/') 117 | makedirs('schemas/') 118 | 119 | # Let's do *everything* 120 | treat_file(version) 121 | self.updated = True 122 | 123 | self._is_alive = False 124 | 125 | def is_alive(self): 126 | return self._is_alive 127 | 128 | 129 | def restart(port): 130 | try: 131 | urlopen(f'http://localhost:{port}/restart') 132 | except URLError: 133 | pass 134 | 135 | 136 | if __name__ == "__main__": 137 | from os import chdir 138 | from datetime import datetime 139 | 140 | start_time = datetime.now() 141 | 142 | print('Schema Bot - main') 143 | 144 | # Change the base dir to where this __file__ is located 145 | # Same location as the Hierarchy.pickle file 146 | # FILE_NAME = 'schema_bot.py' 147 | FILE_NAME = __file__[__file__.rindex("/") + 1:] 148 | if __file__ != FILE_NAME: 149 | BASE_DIR = __file__[:__file__.index(FILE_NAME)] 150 | chdir(BASE_DIR) 151 | 152 | # Start the Bot 153 | # Check if file exists 154 | # Check if version is correct 155 | b = Bot() 156 | b.debug = True 157 | b.start() 158 | b.join() 159 | 160 | # Everything happens while the bot is alive 161 | while b.is_alive(): 162 | pass 163 | 164 | # Restart the server(s) if the pickle file has been updated 165 | if b.updated: 166 | restart(8000) # Restart server at port 8000 167 | # restart(8001) # Etc 168 | print('Schema Bot - main finished') 169 | 170 | stop_time = datetime.now() 171 | time_delta = stop_time - start_time 172 | 173 | hours, remainder = divmod(time_delta.seconds, 3600) 174 | minutes, seconds = divmod(remainder, 60) 175 | print("\nDuration:", f'{hours:02d}:{minutes:02d}:{seconds:02d} and {time_delta.microseconds} microseconds') 176 | -------------------------------------------------------------------------------- /src/test.py: -------------------------------------------------------------------------------- 1 | from time import sleep 2 | from urllib.error import URLError 3 | from urllib.request import urlopen 4 | 5 | i = 0 6 | i_found = 0 7 | while i < 100: 8 | i += 1 9 | try: 10 | with urlopen("http://schema.org/docs/releases.html") as f: 11 | txt = f.read(5) 12 | if 31 == txt[0]: # If the txt is compressed, decompress 13 | i_found += 1 14 | except URLError: 15 | print('URLError') 16 | 17 | sleep(0.1) 18 | 19 | print(i_found) 20 | 21 | from socket import gethostbyname_ex, gaierror, getaddrinfo 22 | 23 | 24 | def get_ips_for_host(host): 25 | try: 26 | ips = gethostbyname_ex(host) 27 | print(ips) 28 | except gaierror: 29 | print('Error') 30 | 31 | # get_ips_for_host('schema.org') 32 | 33 | print(getaddrinfo('schema.org', 80)) -------------------------------------------------------------------------------- /src/view/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GUI-Junkie/Schema.org-Generator/6e5f915bed963f7e1028927c28eb823ec30ded71/src/view/__init__.py -------------------------------------------------------------------------------- /src/view/__pycache__/__init__.cpython-34.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GUI-Junkie/Schema.org-Generator/6e5f915bed963f7e1028927c28eb823ec30ded71/src/view/__pycache__/__init__.cpython-34.pyc -------------------------------------------------------------------------------- /src/view/__pycache__/__init__.cpython-35.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GUI-Junkie/Schema.org-Generator/6e5f915bed963f7e1028927c28eb823ec30ded71/src/view/__pycache__/__init__.cpython-35.pyc -------------------------------------------------------------------------------- /src/view/__pycache__/__init__.cpython-36.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GUI-Junkie/Schema.org-Generator/6e5f915bed963f7e1028927c28eb823ec30ded71/src/view/__pycache__/__init__.cpython-36.pyc -------------------------------------------------------------------------------- /src/view/__pycache__/__init__.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GUI-Junkie/Schema.org-Generator/6e5f915bed963f7e1028927c28eb823ec30ded71/src/view/__pycache__/__init__.cpython-37.pyc -------------------------------------------------------------------------------- /src/view/__pycache__/schema_view.cpython-34.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GUI-Junkie/Schema.org-Generator/6e5f915bed963f7e1028927c28eb823ec30ded71/src/view/__pycache__/schema_view.cpython-34.pyc -------------------------------------------------------------------------------- /src/view/__pycache__/schema_view.cpython-35.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GUI-Junkie/Schema.org-Generator/6e5f915bed963f7e1028927c28eb823ec30ded71/src/view/__pycache__/schema_view.cpython-35.pyc -------------------------------------------------------------------------------- /src/view/__pycache__/schema_view.cpython-36.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GUI-Junkie/Schema.org-Generator/6e5f915bed963f7e1028927c28eb823ec30ded71/src/view/__pycache__/schema_view.cpython-36.pyc -------------------------------------------------------------------------------- /src/view/__pycache__/schema_view.cpython-37.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GUI-Junkie/Schema.org-Generator/6e5f915bed963f7e1028927c28eb823ec30ded71/src/view/__pycache__/schema_view.cpython-37.pyc -------------------------------------------------------------------------------- /src/view/external_link.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GUI-Junkie/Schema.org-Generator/6e5f915bed963f7e1028927c28eb823ec30ded71/src/view/external_link.png -------------------------------------------------------------------------------- /src/view/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GUI-Junkie/Schema.org-Generator/6e5f915bed963f7e1028927c28eb823ec30ded71/src/view/favicon.ico -------------------------------------------------------------------------------- /src/view/gen_style.css: -------------------------------------------------------------------------------- 1 | *{margin:0;padding:0} 2 | html{max-width: 1200px;margin-left:auto;margin-right:auto;font-family:"Lucida Grande" , "Lucida Sans Unicode" , Verdana, Tahoma, 3 | "Helvetica Neue",Helvetica,Arial,sans-serif;font-size:1.1em} 4 | body{background-color:rgba(255,255,255,0.7)} 5 | 6 | @media screen 7 | { 8 | html{background: url(/gredos.jpg) no-repeat center center fixed; 9 | -webkit-background-size: cover; 10 | -moz-background-size: cover; 11 | -o-background-size: cover; 12 | background-size: cover;} 13 | } 14 | p{padding:0.5em} 15 | ol{padding-left:2em} 16 | a.headerlink{visibility:hidden} 17 | textarea{width:99%;height:26em} 18 | 19 | /* Responsive design */ 20 | img.resize{width:100%;height:auto} 21 | .logo{display:block;margin-left:auto;margin-right:auto;width:100%;height:auto} 22 | 23 | /* :after to adjust height automatically */ 24 | .wrapper::after{content:".";display:block;height:0;clear:both;visibility:hidden} 25 | 26 | nav{font-size:0.9em;padding:1em} 27 | nav span{padding-left: 1em} 28 | nav .buttons ul{display:flex;flex-direction:column} 29 | nav ul li, .buttons ul li{list-style:none;flex-grow:1;color:#8A7581;width:14em;line-height:2em} 30 | nav ul li a, .buttons ul li a{color:#4C3441;text-decoration:none;display:block;padding-left:1em} 31 | nav ul li a:hover, .buttons ul li a:hover, .delete_button a:hover{background-color:#858E98;color:white;} 32 | 33 | .language{grid-column-start:1;grid-column-end:3;text-align:right;font-size:.8em;background-color:rgba(255,255,255,0.7)} 34 | .language a{text-decoration:none;color:grey} 35 | 36 | .right_col ul{margin-left:2em} 37 | .right_col ul::after{content:".";display:block;height:1em;clear:both;visibility:hidden} 38 | .right_col ul li{color:#8A7581;line-height:2em} 39 | .right_col ul li a{color:#4C3441;text-decoration:none;padding-left:1em} 40 | .right_col ul li a:hover{background-color:#858E98;color:white} 41 | .right_col_img{width:99%;} 42 | 43 | #image_mask{width:90%;margin-left:auto;margin-right:auto;display:none;overflow:hidden} 44 | #image_mask h1{color:white;text-shadow:black 0.0625em 0.0625em 0.0625em;font-size:1.5em} 45 | 46 | #image_div{width:200%;margin-left:0em; 47 | -webkit-transform: translateZ(0); /* Chrome, Safari, Opera */ 48 | -moz-transform: translateZ(0); /* Mozilla */ 49 | transform: translateZ(0);} 50 | #image_left{width:49.5%;float:left;vertical-align:middle} 51 | #image_right{width:49.5%;float:right;vertical-align:middle} 52 | 53 | .footer, .under_footer{background-color:rgba(100,100,100,0.6);font-size:0.75em} 54 | .footer_item{text-align:center;margin:.5em 1em .5em 1em} 55 | .footer_item a{text-decoration:none} 56 | .under_footer{text-align:center} 57 | 58 | #cookie_warning{display:none;grid-column-start:1;grid-column-end:3} 59 | #cookie_warning{width:100%;background-color:rgba(184,191,197,0.7);line-height:2em;text-align:right} 60 | 61 | .wrap_release{width:100%;height:1.5em} 62 | .release{float:right;padding-right:1em} 63 | 64 | .properties{float:left} 65 | .properties::after{content:".";display:block;height:1em;clear:both;visibility:hidden} 66 | 67 | .table{display:table;width:98%} 68 | .tr_odd, .tr_even{display:table-row;width:auto;clear:both} 69 | .tr_odd{background:beige} 70 | .tr_even{background:ivory} 71 | .td{float:left;display:table-column} 72 | 73 | .buttons{font-size:0.9em;clear:both} 74 | .buttons ul{margin-left:0em;background:beige} 75 | .buttons ul li a{border-radius:12px;border:2px solid #517EBF;width:6em;text-align:center;padding:initial;} 76 | .delete_button a{border-radius:12px;border:2px solid #517EBF;text-decoration:none} 77 | 78 | .page-title, .breadcrumbs{color:#660000;line-height:2em} 79 | .breadcrumbs::after{content:".";display:block;height:1em;clear:both;visibility:hidden} 80 | #mainContent a{color: #660000;text-decoration: none;border-bottom: dotted 1px #660000} 81 | 82 | #morecheck{outline:none} 83 | #morecheck:checked + div {display: none;} 84 | #infomsg ul{padding-left:1em} 85 | 86 | #saved{margin-left:auto;margin-right:auto;background-color:#dbdb7d;position:absolute} 87 | 88 | .version{color: #3F4750;text-align: right;font-size: x-small;} 89 | 90 | .breadcrumb li{display:inline} 91 | 92 | @media screen and (min-width:750px) 93 | { 94 | body{display:grid;grid-template-rows:1fr auto;height:100vh} 95 | nav{position:absolute} 96 | .wrapper{display:grid;grid-template-columns:1fr 4fr;overflow:auto;min-height:40em} 97 | .right_col{grid-column-start:2} 98 | 99 | #image_mask{width:60%;float:right;margin:.5em} 100 | #image_mask h1{left:1em;position:relative;z-index:1;font-size:2.25em} 101 | #image_div{top:-2.5em;position:relative} 102 | 103 | .footer{display:grid;grid-template-columns:repeat(7, 1fr)} 104 | 105 | .buttons ul{flex-direction:row} 106 | .buttons ul li{width:30em} 107 | .buttons ul li a{display:inline-block} 108 | .td{width:15em;padding-right:1em} 109 | .td_property{width:50em;margin-left:1em;margin-top:1em} 110 | .td_property .tr_odd{background:azure} 111 | .td_property .tr_even{background:burlywood} 112 | } 113 | -------------------------------------------------------------------------------- /src/view/gredos.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GUI-Junkie/Schema.org-Generator/6e5f915bed963f7e1028927c28eb823ec30ded71/src/view/gredos.jpg -------------------------------------------------------------------------------- /src/view/hierarchy.tpl: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | {title} 10 | 11 | 12 | 13 | 14 |
15 | 16 | 17 | 18 |
19 | schema.org release: {version} 20 |
21 | 22 |
23 |
24 | 55 |
56 |
57 | {form} 58 |
59 |
60 | {output} 61 |
62 | 63 |
64 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 92 | 93 | 96 | 97 | 98 | -------------------------------------------------------------------------------- /src/view/logo_gen.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GUI-Junkie/Schema.org-Generator/6e5f915bed963f7e1028927c28eb823ec30ded71/src/view/logo_gen.jpg -------------------------------------------------------------------------------- /src/view/logo_gen.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GUI-Junkie/Schema.org-Generator/6e5f915bed963f7e1028927c28eb823ec30ded71/src/view/logo_gen.png -------------------------------------------------------------------------------- /src/view/robots.txt: -------------------------------------------------------------------------------- 1 | # robots.txt for http://schema.pythonanywhere.com/ 2 | 3 | User-agent: * 4 | Allow: / 5 | -------------------------------------------------------------------------------- /src/view/schema_bot.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | SchemaBot 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 |
18 | 31 |
32 |

Schema Bot

33 |

Updating the schema version.

34 |

Just a second...

35 |
36 | 37 |
38 | 39 | 40 | -------------------------------------------------------------------------------- /src/view/schema_bot.js: -------------------------------------------------------------------------------- 1 | function onLoad() 2 | { 3 | setTimeout(function(){CheckResult();}, 1000); 4 | } 5 | 6 | function CheckResult() 7 | { 8 | // Get the next level with AJAX (but only once) 9 | var div = document.getElementById("result"); 10 | 11 | // This code gets executed only once per level 12 | var params = "check=true"; 13 | 14 | var http; 15 | if(window.XMLHttpRequest) // code for IE7+, Firefox, Chrome, Opera, Safari 16 | http=new XMLHttpRequest(); 17 | else // code for IE6, IE5 18 | http=new ActiveXObject("Microsoft.XMLHTTP"); 19 | 20 | // Prepare the request 21 | http.open("POST", "/schema_bot", true); 22 | 23 | // Prepare the proper header information to send along with the request 24 | http.setRequestHeader("Content-type", "application/x-www-form-urlencoded"); 25 | http.setRequestHeader("Content-length", params.length); 26 | http.setRequestHeader("Connection", "close"); 27 | 28 | // Prepare function for asynchronous reception 29 | http.onreadystatechange=function() 30 | { 31 | if (http.readyState==4 && http.status==200) 32 | { 33 | if(http.responseText === "Busy") 34 | { 35 | div.innerHTML+="." 36 | setTimeout(function(){CheckResult();}, 5000); 37 | } 38 | else 39 | div.innerHTML=http.responseText; 40 | } 41 | } 42 | 43 | // Send the request 44 | http.send(params); 45 | } 46 | -------------------------------------------------------------------------------- /src/view/schema_header.html: -------------------------------------------------------------------------------- 1 | 2 |

3 | schema.org 4 |

5 |
6 | 17 |
18 | 19 | -------------------------------------------------------------------------------- /src/wsgi.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/python3 2 | from controller import app 3 | 4 | 5 | if __name__ == "__main__": 6 | from os import chdir 7 | 8 | print('Schema Controller - main') 9 | 10 | # Change the base dir to where this __file__ is located 11 | # Needed for testing 12 | # FILE_NAME = 'wsgi.py' 13 | FILE_NAME = __file__[__file__.rindex("/") + 1:] 14 | if __file__ != FILE_NAME: 15 | BASE_DIR = __file__[:__file__.index(FILE_NAME)] 16 | chdir(BASE_DIR) 17 | 18 | try: 19 | # This will setup the server and start the serve_forever() loop 20 | # This will block the script until the serve_forever() loop is interrupted 21 | app.run(cloud=True) 22 | 23 | except KeyboardInterrupt: 24 | # Silence KeyboardInterrupt exception 25 | pass 26 | except Exception as e: 27 | print(e) 28 | exit(-1) 29 | -------------------------------------------------------------------------------- /tests/__pycache__/test_controller.cpython-34.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GUI-Junkie/Schema.org-Generator/6e5f915bed963f7e1028927c28eb823ec30ded71/tests/__pycache__/test_controller.cpython-34.pyc -------------------------------------------------------------------------------- /tests/test_controller.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/python3 2 | from cProfile import run, Profile 3 | from http import client 4 | from os import getcwd 5 | from pstats import Stats 6 | from subprocess import Popen, PIPE 7 | from time import sleep 8 | from unittest import TestCase, main 9 | from urllib.error import URLError 10 | from urllib.parse import urlencode 11 | from urllib.request import urlopen 12 | 13 | WRITE = 'w' 14 | 15 | 16 | def get_connection(): 17 | sleep(1) # It's necessary to wait a second for Popen or /restart to do it's thing 18 | try: 19 | urlopen('http://localhost:8000') 20 | except URLError: 21 | return False 22 | return True 23 | 24 | 25 | class Test(TestCase): 26 | cli = None 27 | is_running = None 28 | profiler = None 29 | pipe = None 30 | 31 | @classmethod 32 | def setUpClass(cls): 33 | cls.profiler = Profile() 34 | cls.profiler.enable() 35 | 36 | # Check if the server is running 37 | pipe1 = Popen(["ps", "aux"], stdout=PIPE) 38 | pipe1.wait() 39 | 40 | pipe2 = Popen(["grep", "doController.py"], stdin=pipe1.stdout, stdout=PIPE) 41 | pipe1.stdout.close() 42 | 43 | pipe1 = Popen(["grep", "-v", "grep"], stdin=pipe2.stdout, stdout=PIPE) 44 | pipe1.wait() 45 | pipe2.wait() 46 | pipe2.stdout.close() 47 | 48 | procs = pipe1.communicate()[0] 49 | # If the server is running, we keep it running 50 | if b"doController.py" in procs: 51 | urlopen('http://localhost:8000/restart') 52 | cls.is_running = True 53 | else: 54 | # If the server is not running, start it for the duration of the tests 55 | cls.pipe = Popen(['python3', f'{BASE_DIR}/src/controller.py']) 56 | 57 | i = 0 58 | while not get_connection() and i < 100: 59 | i += 1 60 | cls.cli = client.HTTPConnection('localhost:8000', timeout=100) 61 | 62 | @classmethod 63 | def tearDownClass(cls): 64 | if cls.is_running: 65 | return 66 | urlopen('http://localhost:8000/quit') 67 | cls.cli.close() 68 | cls.pipe.wait() 69 | p = Stats(cls.profiler) 70 | p.strip_dirs() 71 | p.sort_stats('cumtime') 72 | # p.print_stats() 73 | # print("\n--->>>") 74 | 75 | def testURLOpen(self): 76 | with urlopen('http://localhost:8000') as f: 77 | txt = f.read() 78 | self.assertIn(b'/Thing', txt, "Oh, bloody hell!") 79 | 80 | def testQuery(self): 81 | d = {'DateTime': '', 'URL': '', 'Text': '', 'next_element': 'ActionStatusType'} 82 | t = d['next_element'] 83 | self.assertEqual(t, 'ActionStatusType', f'testQuery: {t}') 84 | 85 | def testAjax(self): 86 | test_file = f'{TEST_DIR}/ajax.html' 87 | txt_html = '' 88 | if not CHANGED_FILES: 89 | with open(test_file) as f: 90 | txt_html = f.read() 91 | 92 | data = {'next_element': 'ActionStatusType', 93 | 'id': 'LoseAction_actionStatus_ActionStatusType', 94 | 'select_id': 0} 95 | data = bytes(urlencode(data).encode()) 96 | with urlopen('http://localhost:8000/ActionStatusType', data) as f: 97 | txt = f.read().decode() 98 | 99 | # If the output doesn't coincide, there may be another version of Schema.org 100 | if CHANGED_FILES: 101 | with open(test_file, WRITE) as f: 102 | f.write(txt) 103 | else: 104 | self.assertEqual(txt, txt_html, 'test_Ajax') 105 | 106 | 107 | if __name__ == "__main__": 108 | # CHANGED_FILES = True 109 | CHANGED_FILES = False 110 | BASE_DIR = getcwd() 111 | BASE_DIR = BASE_DIR[:BASE_DIR.index('/tests')] 112 | TEST_DIR = f'{BASE_DIR}/tests/test_files' 113 | 114 | # Try to connect to the server 115 | # If a connection can be made, tell the server to restart 116 | try: 117 | cli = client.HTTPConnection('localhost:8000', timeout=1) 118 | cli.connect() 119 | cli.request("GET", '/restart') 120 | cli.getresponse() 121 | sleep(0.1) 122 | except ConnectionRefusedError: 123 | pass 124 | 125 | main() 126 | 127 | # python3 -m cProfile -s cumtime doController.py 128 | # python3 -m cProfile -s cumtime doController.py | grep controller 129 | # python3 -m cProfile -s cumtime doController.py | grep schema 130 | -------------------------------------------------------------------------------- /tests/test_files/ajax.html: -------------------------------------------------------------------------------- 1 |
2 |
3 | Add property: 19 |
20 |
21 | -------------------------------------------------------------------------------- /tests/test_files/mo_better_levels.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | Generated Schema 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 |
19 | 50 |
51 |
52 | schema.org release: 3.1 53 |
54 |
55 | 73 |
74 |
75 |
76 |
77 |

You can check the generated Schema here.

78 |
79 | 80 |
81 | 93 | 104 | 112 | 113 | 114 | 115 | -------------------------------------------------------------------------------- /tests/test_files/one_level.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | Generated Schema 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 |
19 | 50 |
51 |
52 | schema.org release: 3.1 53 |
54 |
55 | 61 |
62 |
63 |
64 |
65 |

You can check the generated Schema here.

66 |
67 | 68 |
69 | 81 | 92 | 100 | 101 | 102 | 103 | -------------------------------------------------------------------------------- /tests/test_files/test_get_breadcrumbs.html: -------------------------------------------------------------------------------- 1 | Canonical URL: http://schema.org/Dentist external link

2 | 18 | 34 | 55 | 76 | 92 |
93 | -------------------------------------------------------------------------------- /tests/test_files/three_level.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | Generated Schema 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 |
19 | 50 |
51 |
52 | schema.org release: 3.1 53 |
54 |
55 | 70 |
71 |
72 |
73 |
74 |

You can check the generated Schema here.

75 |
76 | 77 |
78 | 90 | 101 | 109 | 110 | 111 | 112 | -------------------------------------------------------------------------------- /tests/test_files/two_level.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | Generated Schema 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 |
19 | 50 |
51 |
52 | schema.org release: 3.1 53 |
54 |
55 | 64 |
65 |
66 |
67 |
68 |

You can check the generated Schema here.

69 |
70 | 71 |
72 | 84 | 95 | 103 | 104 | 105 | 106 | -------------------------------------------------------------------------------- /tests/test_schema.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/python3 2 | from unittest import TestCase, main 3 | # from unittest import skip 4 | from urllib.error import URLError 5 | 6 | from model.schema import Hierarchy 7 | 8 | 9 | # @skip("Skip TestHierarchy") 10 | class TestHierarchy(TestCase): 11 | schema = None 12 | 13 | @classmethod 14 | def setUpClass(cls): 15 | cls.schema = Hierarchy() 16 | 17 | @classmethod 18 | def tearDownClass(cls): 19 | del cls.schema 20 | 21 | def test_get_parent_class_WearAction_from_Hierarchy(self): 22 | func = self._testMethodName 23 | # print(self.schema.hierarchy) 24 | try: 25 | schema_class = self.schema.get_schema('WearAction') 26 | 27 | rs = schema_class.get_parent_class # Get the parent 28 | test_list = [['Thing', 'Action', 'ConsumeAction', 'UseAction']] 29 | 30 | self.assertEqual(test_list, rs, f'Value: {func}') 31 | except URLError as e: 32 | raise e 33 | 34 | def test_get_schema_class_from_Hierarchy(self): 35 | func = self._testMethodName 36 | try: 37 | schema_class = self.schema.get_schema('Thing') 38 | 39 | self.assertEqual('Thing', schema_class.name, f'Value: {func}') 40 | except URLError as e: 41 | raise e 42 | 43 | def test_check_properties(self): 44 | func = self._testMethodName 45 | try: 46 | schema_class = self.schema.get_schema('Thing') 47 | 48 | rs = sorted(schema_class.properties.keys()) 49 | # print(rs) 50 | self.assertTrue('url' in rs, f'Value: {func}') 51 | except URLError as e: 52 | raise e 53 | 54 | def test_get_properties(self): 55 | func = self._testMethodName 56 | try: 57 | schema_class = self.schema.get_schema('Thing') 58 | 59 | rs = sorted(schema_class.properties.keys()) 60 | 61 | self.assertEqual('additionalType', rs[0], f'Value: {func}') 62 | except URLError as e: 63 | raise e 64 | 65 | 66 | # @skip("Skip TestPropertyTypes") 67 | class TestPropertyTypes(TestCase): 68 | def testAddProperties(self): 69 | p = set() 70 | p.add('URL') 71 | p.add('Text') 72 | p.add('URL') 73 | p.add('Text') 74 | p.add('URL') 75 | p.add('Text') 76 | p.add('URL') 77 | p.add('Text') 78 | 79 | # print(p) 80 | self.assertEqual(p, {'Text', 'URL'}, 'testAddProperties') 81 | 82 | 83 | if __name__ == "__main__": 84 | from os import chdir 85 | 86 | BASE_DIR = f'{__file__[:__file__.index("tests")]}src/' 87 | chdir(BASE_DIR) 88 | 89 | main() 90 | --------------------------------------------------------------------------------