[ckan-dev] how may I add a new harvesting source?

Adrià Mercader adria.mercader at okfn.org
Fri Oct 11 17:05:55 UTC 2013


Hi Elena,

Don't worry about the "sources" command not showing the type, it's just a bug.

Creating a source via the CLI works for me, for example using:

paster harvester source test-csw-source http://url.for.the.csw csw -c
../ckan/development.ini

Note the order of the params (You can get help for the command running
"paster harvester -h -c ../ckan/development.ini")

harvester source {name} {url} {type} [{title}] [{active}]
[{owner_org}] [{frequency}] [{config}]
    - create new harvest source

Does this work for you?

The CLI is not very maintained, so there may be some bug somewhere.

Adrià



On 11 October 2013 13:45, Elena Camossi
<elena.camossi at ext.jrc.ec.europa.eu> wrote:
> Hi everyone,
>
>> There should be a page for inserting new harvesting sources at
>>   ... /harvest/new
>
> I inserted a new CSW harvesting source using the form from this page.
> I can see it from http://mysite/harvest under the csw type, and going to the
> details of the source, I check that the source type is correctly set to CSW.
> However, if I run the following command from the python virtual environment
> pyenv to list all the sources
>
> paster --plugin=ckanext-harvest harvester sources
>
> I see that every CSW source has source type set to None.
>
> So, If I want to use the CLI to add a new source instead, running harvester
> source , I still don't know how to specify this source type and getting
> either error
>
> 'Please provide a source type'
> or
> 'ckan.logic.ValidationError: {'name': ['Url must be purely lowercase
> alphanumeric (ascii) characters and these symbols: -_'], 'source_type':
> [u'Unknown harvester type: None. Have you registered a harvester for this
> type?']}'
>
> Can someone add something on this? It's not a problem anymore, I have added
> the source already, but I would like to be able to do it from the CLI too.
>
> Kind regards,
> .e
>
>
>
> _______________________________________________
> ckan-dev mailing list
> ckan-dev at lists.okfn.org
> http://lists.okfn.org/mailman/listinfo/ckan-dev
> Unsubscribe: http://lists.okfn.org/mailman/options/ckan-dev




More information about the ckan-dev mailing list