Metadata-Version: 2.1
Name: django-sitemapcheck
Version: 0.1.0
Summary: Check various things about every page mounted in your sitemap.xml
Author: Keryn Knight
Author-email: python-package@kerynknight.com
License: BSD License
Keywords: django sitemaps
Platform: OS Independent
Classifier: Development Status :: 3 - Alpha
Classifier: Environment :: Web Environment
Classifier: Framework :: Django
Classifier: Intended Audience :: Developers
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 2.6
Classifier: Programming Language :: Python :: 2.7
Classifier: Programming Language :: Python :: 3.3
Classifier: Programming Language :: Python :: Implementation :: PyPy
Classifier: Natural Language :: English
Classifier: Topic :: Text Processing :: Markup :: HTML
Classifier: License :: OSI Approved :: BSD License
License-File: LICENSE
Requires-Dist: Django>=1.6.0

===================
django-sitemapcheck
===================

Runs through your `Django`_ sitemaps, and fetching the response for each URL
therein, running a number of configurable checks against the response.

Writes a report to stdout and an HTML file when invoked.

.. image:: https://travis-ci.org/kezabelle/django-sitemapcheck.svg?branch=master
  :target: https://travis-ci.org/kezabelle/django-sitemapcheck

Usage
-----

Simple, shove ``sitemapcheck`` into your ``INSTALLED_APPS`` and run the
following::

    python manage.py sitemapcheck

You can use either one or many processes, by setting
``SITEMAPCHECK_MULTIPROCESSING`` to ``True`` or ``False``

Checks
------

Currently checks exist for:

* The HTTP response code (200 is good, 3xx is a caution, everything else is an
  error)
* The presence of an HTML5 doctype (``<!doctype html>``)
* The presence of the HTML ``<title>`` element
* The presence of an HTML ``<meta name="description" ...``
* The presence of an HTML ``<meta name="keywords" ...``
* The presence of a rel-canonical URL
* The presence of an HTML ``<meta name="theme-color" ...`` for new
  Chrome/Android combos.
* The presence of an HTML ``<meta charset="...">``
* The presence of an HTML ``<meta name="viewport" ...``
* The presence of an ``<meta name="mobile-web-app-capable" ...`` (used by
  Android devices to decide if a website may be added to the homescreen)
* The presence of an ``<meta name="apple-mobile-web-app-capable" ...`` (used by
  iOS devices to decide if a website may be added to the homescreen)
* If the page returns an ``Allow`` HTTP header defining HTTP verbs available.
* If the page has a `Content-Security-Policy`_ header.
* If the page as a `X-Frame-Options`_ header.
* If the page has an `X-Content-Type-Options`_ header, (`django-secure`_ can
  provide one)
* If the page makes use of the `rel="home"`_ microformat.
* If the page makes use of `Schema.org`_ breadcrumbs structured data.

Third party support
-------------------

Should support `django-fastsitemaps`_ and `django-static-sitemaps`_, assuming
their views are used in lieu of the normal
``django.contrib.sitemaps.views.sitemap``.


.. _Django: https://www.djangoproject.com/
.. _django-fastsitemaps: https://github.com/litchfield/django-fastsitemaps
.. _django-static-sitemaps: https://github.com/xaralis/django-static-sitemaps
.. _Content-Security-Policy: http://en.wikipedia.org/wiki/Content_Security_Policy
.. _X-Frame-Options: https://docs.djangoproject.com/en/stable/ref/clickjacking/
.. _X-Content-Type-Options: https://www.owasp.org/index.php/List_of_useful_HTTP_headers
.. _django-secure: https://readthedocs.org/projects/django-secure/
.. _rel="home": http://microformats.org/wiki/rel-home
.. _Schema.org: http://schema.org/docs/gs.html


----

License
-------

``django-sitemapcheck 0.1.0`` is available under the terms of the
Simplified BSD License (alternatively known as the FreeBSD License, or
the 2-clause License)::

    Copyright (c) 2014, Keryn Knight
    All rights reserved.

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

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

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

    The views and conclusions contained in the software and documentation are those
    of the authors and should not be interpreted as representing official policies,
    either expressed or implied, of the FreeBSD Project.

