Skip to content
This repository has been archived by the owner on May 8, 2021. It is now read-only.

The extension provides a way to summarize the resource download event. Customized template snippets and summary information pages are also supported.

License

Notifications You must be signed in to change notification settings

jiankaiwang/ckanext-download

Repository files navigation

ckanext-download

The extension provides a way to summarize the resource download event. Customized template snippets and summary information pages are also supported.

Requirements

The extension is compatible with CKAN core 2.3 or later.

Configuration

Set the configuration to use the plugin :

ckan.plugins = download

# postgresql database to record downloading information
ckan.download.psqlUrl = postgresql://(dbuser):(dbpass)@(dbhost)/(dbname)

Resource Summary

After installing the extension, the url path /download and /download_date on the browser show the download summary.

  • url /download

/download

  • url /download_date

/download_date

Template snippets

The extension also customizes the template on several sections.

  • on dataset, url /dataset

/dataset

  • on dataset info, url /dataset/(dataset)

/dataset/(dataset)

  • on resource, url /dataset/(dataset)/resource/(id)

/dataset/(dataset)/resource/(id)

Set the configuration to customize the template.

# postgresql database to record downloading information
ckan.download.template = true

Traking_summary supported

[app:main]
ckan.tracking_enabled = true

Development Installation

To install ckanext-download for development, activate your CKAN virtualenv and do :

git clone https://github.com/jiankaiwang/ckanext-download.git
cd ckanext-download
python ./setup.py develop

# run in the develop environment
# assume the development.ini located at /etc/ckan/default
paster serve /etc/ckan/default/development.ini

Installation

To install ckanext-download:

  1. Activate your CKAN virtual environment, for example::
. /usr/lib/ckan/default/bin/activate
  1. Install the ckanext-download Python package into your virtual environment::
git clone https://github.com/jiankaiwang/ckanext-download.git
cd ckanext-download
python setup.py install
  1. Add download to the ckan.plugins setting in your CKAN config file (by default the config file is located at /etc/ckan/default/production.ini).

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

# restart ckan service
sudo service ckan restart

# restart server service
sudo service nginx restart

3rd Party Javascript Libraries

  • jquery.tablesorter : v.2.0.3
  • jquery : v.1.12.4
  • plotly : v.1.16.2

About

The extension provides a way to summarize the resource download event. Customized template snippets and summary information pages are also supported.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published