A Datasette plugin for commenting on tables, rows, and values
Project description
datasette-comments
A Datasette plugin for commenting on tables, rows, and values. Work in progress, not ready yet!
Installation
Install this plugin in the same environment as Datasette.
datasette install datasette-comments
Usage
Once installed, users with the datasette-comments-access
will be able to view and add comments on rows within their Datasette instance.
Plugin hooks
This plugin provies the following plugin hook which can be used to customize its behavior:
datasette_comments_users(datasette)
This hook should return a list of dictionaries, each representing a user that should be made available to the plugin. Each dictionary should have the following keys:
id
: A unique ID of the user, same as the actor ID.username
: A unique string that is used in searches and @ mentions.name
: A string of the user's natural name.profile_photo_url
: Optional URL to the user's profile pic.email
: Optional email used for gravatar profile photo, if enabled.
The plugin hook can return a list, or it can return an awaitable function that returns a list.
Development
To set up this plugin locally, first checkout the code. Then create a new virtual environment:
cd datasette-comments
python3 -m venv venv
source venv/bin/activate
Now install the dependencies and test dependencies:
pip install -e '.[test]'
And for the JavaScript dependencies (needed to run a JavaScript build):
npm install
To run the tests:
pytest
To rebuild the minified JavaScript after making a change to a .ts
or .tsx
file:
just js
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
Hashes for datasette-comments-0.0.1a18.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5643cb8ea26be2771df0de83a9ea53a132b76813fe91d3e7298477b18d77cdf7 |
|
MD5 | 631e3bbc77ef0be0c136731644e38508 |
|
BLAKE2b-256 | 7a3b8b6f51d441d4692b919f883381d88bf8d5e6ac565855107c996a474870f4 |
Hashes for datasette_comments-0.0.1a18-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 34e0782e481202cd14efec3d22a358e4d4bd8aaaf30a464d4cd1c31b8b083e0d |
|
MD5 | cda6aa78b22c905389c9c649e064aa2d |
|
BLAKE2b-256 | daa80f1420213ee60b475deef75e683ea6fae986a5286eb9813f687746f80546 |