From 7581320823d542fd827cb6788be87e6d51aa96dd Mon Sep 17 00:00:00 2001 From: Simon Willison Date: Wed, 18 Apr 2018 08:05:06 -0700 Subject: [PATCH] Documentation for --install option, refs #223 --- README.md | 2 ++ docs/plugins.rst | 10 ++++++++++ 2 files changed, 12 insertions(+) diff --git a/README.md b/README.md index 21ef6c68..aca1c404 100644 --- a/README.md +++ b/README.md @@ -173,6 +173,7 @@ This will create a docker image containing both the datasette application and th --plugins-dir DIRECTORY Path to directory containing custom plugins --static STATIC MOUNT mountpoint:path-to-directory for serving static files + --install TEXT Additional packages (e.g. plugins) to install --title TEXT Title for metadata --license TEXT License label for metadata --license_url TEXT License URL for metadata @@ -199,6 +200,7 @@ If you have docker installed you can use `datasette package` to create a new Doc --plugins-dir DIRECTORY Path to directory containing custom plugins --static STATIC MOUNT mountpoint:path-to-directory for serving static files + --install TEXT Additional packages (e.g. plugins) to install --title TEXT Title for metadata --license TEXT License label for metadata --license_url TEXT License URL for metadata diff --git a/docs/plugins.rst b/docs/plugins.rst index c7181172..e5ad1857 100644 --- a/docs/plugins.rst +++ b/docs/plugins.rst @@ -19,6 +19,16 @@ You can also define one-off per-project plugins by saving them as ``plugin_name.py`` functions in a ``plugins/`` folder and then passing that folder to ``datasette serve``. +The ``datasette publish`` and ``datasette package`` commands both take an +optional ``--install`` argument. You can use this one or more times to tell +Datasette to ``pip install`` specific plugins as part of the process. You can +use the name of a package on PyPI or any of the other valid arguments to ``pip +install`` such as a URL to a ``.zip`` file:: + + datasette publish now mydb.db \ + --install=datasette-plugin-demos \ + --install=https://url-to-my-package.zip + Writing plugins ---------------