From 9486099167ffe639c4c9d11a7a24752849516d5b Mon Sep 17 00:00:00 2001 From: Johannes Wilm Date: Thu, 4 Jan 2024 18:32:11 +0100 Subject: [PATCH] add DATA_UPLOAD_MAX_MEMORY_SIZE to instructions --- README.md | 34 +++++++++++++++++++++++++++++----- 1 file changed, 29 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 66eef9b..32c6635 100644 --- a/README.md +++ b/README.md @@ -4,16 +4,27 @@ fiduswriter-gitrepo-export A plugin to export books to GitLab/GitHub. To install: +----------- 1. Make sure you have installed the `fiduswriter-books` plugin and you have updated both `fiduswriter` and `fiduswriter-books` to the latest patch release. 2. Install this plugin (for example by running ``pip install fiduswriter-gitrepo-export``). -3. In your configuration.py file, add "gitrepo_export" and "allauth.socialaccount.providers.github" and/or "allauth.socialaccount.providers.gitlab" to ``INSTALLED_APPS``. +3. Enter the configuration file in an editor. If you have installed the Snap, you do this by running ``sudo fiduswriter.configure``. Otherwise open the file `configuration.py` in a text editor. -4a. Set up GitHub as one of the connected login options. See instructions here: https://docs.allauth.org/en/latest/socialaccount/providers/github.html . The callback URL will be in the format https://DOMAIN.NAME/api/github/github/login/callback/ +4. The default maximum size of a book is 2.5 MB. If some of your files will be larger than that, adjust ``DATA_UPLOAD_MAX_MEMORY_SIZE`` to something higher, for example 10MiB:: -5a. In your configuration.py file, make sure to add repo rights for the github connector like this:: +```python +DATA_UPLOAD_MAX_MEMORY_SIZE = 10485760 +``` + +5. Add "gitrepo_export" to ``INSTALLED_APPS``. + +*For GitHub* + +6a. Add "allauth.socialaccount.providers.github" to ``INSTALLED_APPS``. + +7a. Add repo rights for the github connector like this:: ```python SOCIALACCOUNT_PROVIDERS = { @@ -26,9 +37,15 @@ SOCIALACCOUNT_PROVIDERS = { } ``` -4b. Set up GitLab as one of the connected login options. See instructions here: https://docs.allauth.org/en/latest/socialaccount/providers/gitlab.html . The callback URL will be in the format https://DOMAIN.NAME/api/gitlab/gitlab/login/callback/ +8a. Exit the editor and save the configuration file. + +9a. Set up GitHub as one of the connected login options. See instructions here: https://docs.allauth.org/en/latest/socialaccount/providers/github.html . The callback URL will be in the format https://DOMAIN.NAME/api/github/github/login/callback/ -5b. In your configuration.py file, make sure to add repo rights for the gitlab connector like this:: +*For GitLab* + +6b. Add "allauth.socialaccount.providers.gitlab" to ``INSTALLED_APPS``. + +7b. Add repo rights for the gitlab connector like this:: ```python SOCIALACCOUNT_PROVIDERS = { @@ -40,7 +57,14 @@ SOCIALACCOUNT_PROVIDERS = { } ``` +8b. Exit the editor and save the configuration file. + +9b. Set up GitLab as one of the connected login options. See instructions here: https://docs.allauth.org/en/latest/socialaccount/providers/gitlab.html . The callback URL will be in the format https://DOMAIN.NAME/api/gitlab/gitlab/login/callback/ + + + To use: +------- 1. Login to your Fidus Writer instance using GitHub/GitLab, or login with a regular account and connect a Gitlab/Github account on the profile page (https://DOMAIN.NAME/user/profile/)