harvester_odt/comunweb/converter.py
def _fix_resource_format_case(self, resources):
        """
        Hack to set the case of the resource format.

        Ckan will convert certain formats to uppercase and certain
        others to lowercase, but the client will complain about this..

        - todo: apply a workaround for this in the client?
        - todo: make the client just issue warnings if updated dataset
                doesn't match? -> warnings.warn() + logger.warn()
        - todo: maybe that should be made configurable (in development
                we want to make sure we catch any inconsistencies!)
        """

        must_upper = ['CSV', 'KML', 'ZIP']
        for res in resources:
            if res['format'].upper() in must_upper:
                res['format'] = res['format'].upper()
            else:
                res['format'] = res['format'].lower()

        Hack to set the case of the resource format.

        Ckan will convert certain formats to uppercase and certain
        others to lowercase, but the client will complain about this..

        - todo: apply a workaround for this in the client?
        - todo: make the client just issue warnings if updated dataset
                doesn't match? -> warnings.warn() + logger.warn()
        - todo: maybe that should be made configurable (in development
                we want to make sure we catch any inconsistencies!)
        
Hack to set the case of the resource format.
Ckan will convert certain formats to uppercase and certain
others to lowercase, but the client will complain about this

apply a workaround for this in the client.
todo: make the client just issue warnings if updated dataset
doesn't match. -> warnings.warn() + logger.warn()
todo: maybe that should be made configurable (in development
we want to make sure we catch any inconsistencies!)
Hack to set the case of the resource format . Ckan will convert certain formats to uppercase and certain others to lowercase but the client will complain about this apply a workaround for this in the client . todo : make the client just issue warnings if updated dataset doesn ' t match . - > warnings . warn () + logger . warn () todo : maybe that should be made configurable ( in development we want to make sure we catch any inconsistencies! )
def _fix_resource_format_case(self, resources):
        must_upper = ['CSV', 'KML', 'ZIP']
        for res in resources:
            if res['format'].upper() in must_upper:
                res['format'] = res['format'].upper()
            else:
                res['format'] = res['format'].lower()
def _fix_resource_format_case ( self , resources ) : must_upper = [ 'CSV' , 'KML' , 'ZIP' ] for res in resources : if res [ 'format' ] . upper ( ) in must_upper : res [ 'format' ] = res [ 'format' ] . upper ( ) else : res [ 'format' ] = res [ 'format' ] . lower ( )
Hack to set the case of the resource format.
Hack to set the case of the resource format .
"""
        Hack to set the case of the resource format.

        Ckan will convert certain formats to uppercase and certain
        others to lowercase, but the client will complain about this..

        - todo: apply a workaround for this in the client?
        - todo: make the client just issue warnings if updated dataset
                doesn't match? -> warnings.warn() + logger.warn()
        - todo: maybe that should be made configurable (in development
                we want to make sure we catch any inconsistencies!)
        """
self
resources