Link integrity support for guillotina
Project description
Guillotina link integrity
The package aims to provide link integrity support for Guillotina.
Features:
- Ability to check for linked content
- Automatically redirect requests when content is renamed or moved
- Manage aliases to content
- Translate resolveuid urls in text
Dependencies
- Python >= 3.6
- Guillotina
- PG/Cockroachdb
Installation
This example will use virtualenv:
python -m venv .
./bin/pip install .[test]
Running
Running Postgresql Server:
docker run --rm -e POSTGRES_DB=guillotina -e POSTGRES_USER=guillotina -p 127.0.0.1:5432:5432 --name postgres postgres:9.6
Most simple way to get running:
./bin/guillotina
API
The package provides some high level APIs for interacting with content.
Working with linked content:
import guillotina_linkintegrity as li
await li.get_links(ob)
await li.add_links(ob, [ob2, ob3])
await li.remove_links(ob, [ob2, ob3])
await li.update_links_from_html(ob, content)
How about aliases:
import guillotina_linkintegrity as li
await li.get_aliases(ob)
await li.add_aliases(ob, ['/foo/bar'])
await li.remove_aliases(ob, ['/foo/bar'])
# what about aliases from parents that might affect it?
await li.get_inherited_aliases(ob)
Translate uid linked content:
import guillotina_linkintegrity as li
result = await li.translate_links(content)
1.0.0 (2018-09-25)
- initial release
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
Close
Hashes for guillotina_linkintegrity-1.0.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5a60f068700db2e8c6cba26b9b1feedf12b0062e48f791841a6b0d72cb2ea66f |
|
MD5 | ef9235e030bf5b847510377c147be57e |
|
BLAKE2b-256 | 49c03e96dcfc0766f9473b29cc7abff0f5474664754f50ce7160e9b602c226d1 |
Close
Hashes for guillotina_linkintegrity-1.0.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 93597690f17ba8b97e82a36771221ca56db92b5a3ae072d649e9f9c37a95f5ec |
|
MD5 | 1bd47bc94716403b1822953d56020262 |
|
BLAKE2b-256 | 694be77b37d560bd8fa0555535e13556f1dafcd9f64b711cf0c187379b8e9973 |