# -*- coding: iso8859-1 -*- # # Copyright (C) 2006 CSIRO Australia # All rights reserved. # # This software is licensed as described in the file COPYING, which # you should have received as part of this distribution. # # This software consists of voluntary contributions made by many # individuals. For exact contribution history, see the revision # history and logs. # # Author: Conrad Parker import commands import string from anxvalidator.cmmlvalidate import cmml_types, cmml_errs, cmml_sloppy from anxvalidator.oggzvalidate import ogg_types from anxvalidator.pipeoutput import PipeOutput, pipe_limit class About (object): def __init__(self): e = commands.getoutput ('oggz-validate --help-errors') self.oggz_errs = e.splitlines() def title (self): return 'Annodex media validation service: About' def __str__(self): def li(item): return '
  • ' + item + '
  • ' def li_code(item): return '
  • ' + item + '
  • ' def make_list (list, code=False, clear=True): if code: s = '' else: s = '' if clear: s += '
    ' s += '

    ' return s def make_x_type (type): (major, minor) = type.split ('/', 1) return major + '/x-' + minor s = '''

    Overview

    This service can be used to validate Web-accessible Ogg, CMML and Annodex resources.

    HTTP reporting

    The following HTTP actions are reported:

    ''' s += '''

    Ogg media validation

    This service recognizes Ogg media resources of the following content types:

    ''' s += make_list (ogg_types, code=True, clear=False) s += make_list (map (make_x_type, ogg_types), code=True) s += '''

    The following types of errors can be detected in Ogg framing:

    ''' s += make_list (self.oggz_errs) s += '''

    Please note that only the first %dKB of the media resource are retrieved. Validation of media content is performed by oggz-validate.

    ''' % (pipe_limit/1024) s += '''

    CMML Markup validation

    This service recognizes CMML resources of content type:

    ''' s += make_list (cmml_types, code=True, clear=False) s += make_list (map (make_x_type, cmml_types), code=True) s += '''

    The following types of errors can be detected in CMML markup:

    ''' s += make_list (cmml_errs) s += '''

    Additionally, the following warnings will be given for CMML markup:

    ''' s += make_list (cmml_sloppy) s += '''

    Validation of CMML content is performed by cmml-validate.

    ''' s += '''

    Source code

    Source code for this service is available from:

    http://svn.annodex.net/annodex-validator/trunk

    ''' return s