Skip to content

Commit

Permalink
add DATA_UPLOAD_MAX_MEMORY_SIZE to instructions
Browse files Browse the repository at this point in the history
  • Loading branch information
johanneswilm authored Jan 4, 2024
1 parent a8a1fec commit 9486099
Showing 1 changed file with 29 additions and 5 deletions.
34 changes: 29 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 = {
Expand All @@ -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 = {
Expand All @@ -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/)

Expand Down

0 comments on commit 9486099

Please sign in to comment.