ckanext-check-link


Nameckanext-check-link JSON
Version 0.2.2 PyPI version JSON
download
home_pageNone
SummaryResource URL checker
upload_time2024-11-11 13:36:02
maintainerNone
docs_urlNone
authorNone
requires_pythonNone
licenseAGPL
keywords ckan
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage
            [![Tests](https://github.com/DataShades/ckanext-check-link/workflows/Tests/badge.svg?branch=main)](https://github.com/DataShades/ckanext-check-link/actions)

# 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

<!-- * downloading a report based on the stored results -->

### Index

* [Requirements](#requirements)
* [Installation](#installation)
* [Config settings](#config-settings)
* [UI](#ui)
* [CLI](#cli)
* [API](#api)

## Requirements

Compatibility with core CKAN versions:

| CKAN version | Compatible? |
|--------------|-------------|
| 2.9          | yes         |
| 2.10         | yes         |

## Installation

1. Install `ckanext-check-link`
   ```
   pip install ckanext-check-link
   ```

1. Add `check_link` and `collection` to the `ckan.plugins` setting in your CKAN config file.


## Config settings

```ini
# 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.

```sh
# 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.

```sh
# 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

[AGPL](https://www.gnu.org/licenses/agpl-3.0.en.html)

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "ckanext-check-link",
    "maintainer": null,
    "docs_url": null,
    "requires_python": null,
    "maintainer_email": "DataShades <datashades@linkdigital.com.au>",
    "keywords": "CKAN",
    "author": null,
    "author_email": "DataShades <datashades@linkdigital.com.au>, Sergey Motornyuk <sergey.motornyuk@linkdigital.com.au>",
    "download_url": "https://files.pythonhosted.org/packages/3e/1b/2d3f9af11c8df01edb7658ebccaff9677249333110e86846fa72d9bc8bb4/ckanext_check_link-0.2.2.tar.gz",
    "platform": null,
    "description": "[![Tests](https://github.com/DataShades/ckanext-check-link/workflows/Tests/badge.svg?branch=main)](https://github.com/DataShades/ckanext-check-link/actions)\n\n# ckanext-check-link\n\nLink checker for CKAN.\n\nProvides API, CLI commands, and views for:\n\n* checking availability of the file, refereed by resource\n* checking availability of any arbitrary link.\n* storing results of these checks\n* visualizing stored results\n\n<!-- * downloading a report based on the stored results -->\n\n### Index\n\n* [Requirements](#requirements)\n* [Installation](#installation)\n* [Config settings](#config-settings)\n* [UI](#ui)\n* [CLI](#cli)\n* [API](#api)\n\n## Requirements\n\nCompatibility with core CKAN versions:\n\n| CKAN version | Compatible? |\n|--------------|-------------|\n| 2.9          | yes         |\n| 2.10         | yes         |\n\n## Installation\n\n1. Install `ckanext-check-link`\n   ```\n   pip install ckanext-check-link\n   ```\n\n1. Add `check_link` and `collection` to the `ckan.plugins` setting in your CKAN config file.\n\n\n## Config settings\n\n```ini\n# Allow any logged-in user to check links. This implies specific security issues,\n# thus disabled by default.\n# (optional, default: false).\nckanext.check_link.user_can_check_url = yes\n\n# URL for the \"Link availability\" page.\n# (optional, default: /check-link/report/global)\nckanext.check_link.report.base_template = /ckan-admin/link-state\n\n# A base template that is extended by the \"Link availability\" page.\n# (optional, default: check_link/base_admin.html)\nckanext.check_link.report.base_template = check_link/base.html\n\n```\n\n## UI\n\n### Link availability\n#### Endpoint: `check_link.report`\n#### Path: `/check-link/report/global`\n\nPaginated listing of all the \"broken\" links. Access is controlled by the\n`check_link_view_report_page` auth function, which can be bypassed only by\nsysadmin.\n\n## CLI\n\nCLI commands are registered under `ckan check-link` route.\n\n\n### `check-packages`\n\nCheck every resource inside each package.\n\nThe scope can be narrowed via arbitrary number of arguments, specifying the package's ID or name.\n\n```sh\n# check all the public packages\n$ ckan check-link check-packages\n\n# check all the active packages\n$ ckan check-link check-packages --include-private\n\n# check all the public and draft pacakges\n$ ckan check-link check-packages --include-draft\n\n# check only two specified packages\n$ ckan check-link check-packages pkg-id-one pkg-name-two\n\n```\n\n### `check-resources`\nCheck every resource on the portal.\n\nScope can be narrowed via arbitary number of arguments, specifying resource's ID\n\n### `delete-reports`\nDelete check-link reports.\n\n```sh\n# delete all reports\n$ ckan check-link delete-reports\n\n# drop reports that point to an unexisting resource\n$ ckan check-link delete-reports --orphans-only\n```\n\nScope can be narrowed via arbitary number of arguments, specifying resource's ID\n\n## API\n\n### `check_link_url_check`\n### `check_link_resource_check`\n### `check_link_package_check`\n### `check_link_organization_check`\n### `check_link_group_check`\n### `check_link_user_check`\n### `check_link_search_check`\n\n### `check_link_report_save`\n### `check_link_report_show`\n### `check_link_report_search`\n### `check_link_report_delete`\n\nTBA\n\n## License\n\n[AGPL](https://www.gnu.org/licenses/agpl-3.0.en.html)\n",
    "bugtrack_url": null,
    "license": "AGPL",
    "summary": "Resource URL checker",
    "version": "0.2.2",
    "project_urls": {
        "Homepage": "https://github.com/DataShades/ckanext-check-link"
    },
    "split_keywords": [
        "ckan"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "cb56ece08efa69ba037c3fe8ab964f0522f556cba7d3ce1b40e7c81aefc8890d",
                "md5": "e6da3cf4046fd7e865070e3f9927505c",
                "sha256": "6547aa5732c81de54eef7be6fb85fb8ad22498b020286a782f7f53a140aaa310"
            },
            "downloads": -1,
            "filename": "ckanext_check_link-0.2.2-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "e6da3cf4046fd7e865070e3f9927505c",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 44201,
            "upload_time": "2024-11-11T13:36:00",
            "upload_time_iso_8601": "2024-11-11T13:36:00.322338Z",
            "url": "https://files.pythonhosted.org/packages/cb/56/ece08efa69ba037c3fe8ab964f0522f556cba7d3ce1b40e7c81aefc8890d/ckanext_check_link-0.2.2-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "3e1b2d3f9af11c8df01edb7658ebccaff9677249333110e86846fa72d9bc8bb4",
                "md5": "46e0b11eac49da3443c830091349b393",
                "sha256": "206d5c26a0eecf4e688828da1c40e869e63f41cded4c7ffe5360f7ccf366cd67"
            },
            "downloads": -1,
            "filename": "ckanext_check_link-0.2.2.tar.gz",
            "has_sig": false,
            "md5_digest": "46e0b11eac49da3443c830091349b393",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 36535,
            "upload_time": "2024-11-11T13:36:02",
            "upload_time_iso_8601": "2024-11-11T13:36:02.062325Z",
            "url": "https://files.pythonhosted.org/packages/3e/1b/2d3f9af11c8df01edb7658ebccaff9677249333110e86846fa72d9bc8bb4/ckanext_check_link-0.2.2.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-11-11 13:36:02",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "DataShades",
    "github_project": "ckanext-check-link",
    "travis_ci": false,
    "coveralls": true,
    "github_actions": true,
    "lcname": "ckanext-check-link"
}
        
Elapsed time: 0.34043s