Resource URL checker
Project description
ckanext-check-link
Link checker for CKAN.
Provides API, CLI commands, and views for:
- checking availability of the file, refereed by resource
- checking availability of any arbitrary link.
- storing results of these checks
- visualizing stored results
Index
Requirements
Compatibility with core CKAN versions:
CKAN version | Compatible? |
---|---|
2.9 | yes |
2.10 | yes |
Installation
-
Install
ckanext-check-link
pip install ckanext-check-link
-
Add
check_link
to theckan.plugins
setting in your CKAN config file.
Config settings
# Allow any logged-in user to check links. This implies specific security issues,
# thus disabled by default.
# (optional, default: false).
ckanext.check_link.user_can_check_url = yes
# URL for the "Link availability" page.
# (optional, default: /check-link/report/global)
ckanext.check_link.report.base_template = /ckan-admin/link-state
# A base template that is extended by the "Link availability" page.
# (optional, default: check_link/base_admin.html)
ckanext.check_link.report.base_template = check_link/base.html
UI
Link availability
Endpoint: check_link.report
Path: /check-link/report/global
Paginated listing of all the "broken" links. Access is controlled by the
check_link_view_report_page
auth function, which can be bypassed only by
sysadmin.
CLI
CLI commands are registered under ckan check-link
route.
check-packages
Check every resource inside each package.
The scope can be narrowed via arbitrary number of arguments, specifying the package's ID or name.
# check all the public packages
$ ckan check-link check-packages
# check all the active packages
$ ckan check-link check-packages --include-private
# check all the public and draft pacakges
$ ckan check-link check-packages --include-draft
# check only two specified packages
$ ckan check-link check-packages pkg-id-one pkg-name-two
check-resources
Check every resource on the portal.
Scope can be narrowed via arbitary number of arguments, specifying resource's ID
delete-reports
Delete check-link reports.
# delete all reports
$ ckan check-link delete-reports
# drop reports that point to an unexisting resource
$ ckan check-link delete-reports --orphans-only
Scope can be narrowed via arbitary number of arguments, specifying resource's ID
API
check_link_url_check
check_link_resource_check
check_link_package_check
check_link_organization_check
check_link_group_check
check_link_user_check
check_link_search_check
check_link_report_save
check_link_report_show
check_link_report_search
check_link_report_delete
TBA
License
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file ckanext-check-link-0.1.2.tar.gz
.
File metadata
- Download URL: ckanext-check-link-0.1.2.tar.gz
- Upload date:
- Size: 33.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.8.13
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | a74dc086cff2fb6d3bbcccd26db77c889653733a7591c4f4cb9c8746549a4699 |
|
MD5 | 94de795d23e58fd2fd81e0999835e7d0 |
|
BLAKE2b-256 | 69e64abd23b71aa41d676193ff7790443c42393bd23331a0249daed687d00f0a |
File details
Details for the file ckanext_check_link-0.1.2-py3-none-any.whl
.
File metadata
- Download URL: ckanext_check_link-0.1.2-py3-none-any.whl
- Upload date:
- Size: 39.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.8.13
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4205ab05d1c30f80aefd10601c9933ec5d06907f9bc9dc79bf07a3f77b623ed2 |
|
MD5 | 60e0ef7d9c8a6007e2566a1f62b8156e |
|
BLAKE2b-256 | 2e9899726429f7f54e59bfb29e8e048e67123c659218f0139135fc40f2bfd84d |