Thanks to visit codestin.com
Credit goes to github.com

Skip to content

open-data/ckanext-citeproc

Repository files navigation

Tests

CKANEXT CiteProc

CKAN plugin to add citations to datasets and resources. This plugin uses https://github.com/citeproc-py/citeproc-py to generate citations in different formats.

Requirements

Compatibility with core CKAN versions:

CKAN version Compatible?
2.6 and earlier no
2.7 no
2.8 no
2.9 no
2.10 yes
2.11 yes

Compatibility with Python versions:

Python version Compatible?
2.7 and earlier no
3.7 and later yes

Prerequisites

citeproc-py currently only contains harvard1.csl for the styles. To allow for more styles, you will need to put any desired CSL files from https://github.com/citation-style-language/styles onto your server and define the citeproc style path with ckanext.citeproc.citation_styles_path in your CKAN INI file. The available citation formats will be built from any CSL files in this directory.

Installation

To install ckanext-citeproc:

  1. Activate your CKAN virtual environment, for example:

    . /usr/lib/ckan/default/bin/activate

  2. Clone the source and install it on the virtualenv:

git clone https://github.com/open-data/ckanext-citeproc.git
cd ckanext-citeproc
pip install -e .
  pip install -r requirements.txt
  1. Add citeproc to the ckan.plugins setting in your CKAN config file (by default the config file is located at /etc/ckan/default/ckan.ini).

  2. Restart CKAN. For example if you've deployed CKAN with Apache on Ubuntu:

    sudo service apache2 reload

Config settings

ckanext.citeproc.citation_styles_path specifies the absolute path on the server to the directory containing the CSL files:

# (required, default: None).
ckanext.citeproc.citation_styles_path = /path/to/csl/styles/directory/

ckanext.citeproc._show_citations controls citations showing for datasets of a given package type:

# (optional, default: true).
ckanext.citeproc.dataset_show_citations = false

ckanext.citeproc._resource_show_citations controls citations showing for resources of a given package type:

# (optional, default: true).
ckanext.citeproc.dataset_resource_show_citations = false

About

CKAN plugin to add citations to datasets and resources

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published