Skip to main content

A Fidus Writer plugin to allow publishing of books to a Gitlab/Github repository.

Project description

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. 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.

  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::

DATA_UPLOAD_MAX_MEMORY_SIZE = 10485760
  1. 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::

SOCIALACCOUNT_PROVIDERS = {
    'github': {
        'SCOPE': [
            'repo',
            'user:email',
        ],
    }
}

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/

For GitLab

6b. Add "allauth.socialaccount.providers.gitlab" to INSTALLED_APPS.

7b. Add repo rights for the gitlab connector like this::

SOCIALACCOUNT_PROVIDERS = {
    'gitlab': {
        'SCOPE': [
            'api',
        ],
    }
}

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/)

  2. Go to the books overview page.

  3. Enter a book to set the gitrepo settings for the book.

  4. Select the book in the overview and export to gitrepo via the dropdown menu.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

fiduswriter_gitrepo_export-4.1.2.tar.gz (91.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

fiduswriter_gitrepo_export-4.1.2-py3-none-any.whl (158.5 kB view details)

Uploaded Python 3

File details

Details for the file fiduswriter_gitrepo_export-4.1.2.tar.gz.

File metadata

File hashes

Hashes for fiduswriter_gitrepo_export-4.1.2.tar.gz
Algorithm Hash digest
SHA256 390bc688e9bc8c3bab296f3480ed2b310b65b205b364b57dbed0edf0706216fd
MD5 aa049d32874343f2ee97db490e2e891d
BLAKE2b-256 d0b1a90c70a3d0a61cd6eb9db0ac0e10831e797eca4a0345584170d1b8e43cc5

See more details on using hashes here.

File details

Details for the file fiduswriter_gitrepo_export-4.1.2-py3-none-any.whl.

File metadata

File hashes

Hashes for fiduswriter_gitrepo_export-4.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 b3d69eeedd72d06cb903fc8fbdd3b9e8f567b4abac056f01d4bf563d86cd9228
MD5 25efa3efd739340933e6cbf21579c092
BLAKE2b-256 f4a1d2c4983ad8970db5ac0bde34b715611e9343ac759be59fad8da278a1dfee

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page