Metadata-Version: 2.1
Name: aa-contacts
Version: 0.2.0
Summary: Contacts tool for AllianceAuth
Keywords: allianceauth,eveonline,allianceauth_contacts,contacts,aa-contacts
Author-email: Matteo Ghia <matteo.ghia@yahoo.it>
Requires-Python: ~=3.8
Description-Content-Type: text/markdown
Classifier: Environment :: Web Environment
Classifier: Framework :: Django
Classifier: Framework :: Django :: 4
Classifier: Framework :: Django :: 4.2
Classifier: Operating System :: POSIX :: Linux
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: GNU General Public License v3 (GPLv3)
Classifier: Natural Language :: English
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Internet :: WWW/HTTP
Classifier: Topic :: Internet :: WWW/HTTP :: Dynamic Content
Requires-Dist: allianceauth~=4.0
Project-URL: Changelog, https://github.com/Maestro-Zacht/aa-contacts/releases
Project-URL: Homepage, https://github.com/Maestro-Zacht/aa-contacts
Project-URL: Source, https://github.com/Maestro-Zacht/aa-contacts
Project-URL: Tracker, https://github.com/Maestro-Zacht/aa-contacts/issues

# AllianceAuth Contacts

[![PyPI](https://img.shields.io/pypi/v/aa-contacts)](https://pypi.org/project/aa-contacts/)

This is a plugin for [AllianceAuth](https://gitlab.com/allianceauth/allianceauth) that lets alliances and corporations track and manage their contacts (i.e. standings).

## Overview

### Tracking an Alliance or Corporation

Users with the right [permission](#permissions) can add an alliance or corporation just by clicking on the + button in the index page.

### Viewing Contacts

The index page shows all the alliances and corporations that have been added and are available for that user, that means every alliance or corporation in which the user has a character. Superusers can see all the alliances and corporations.

In every alliance or corporation view, the user can see the contacts and their standings. If it has the right [permissions](#permissions), the user can see and edit notes or trigger a manual update of the contacts.

## Installation

1. Install the package. If you have a traditional installation, run the following command in your terminal:

    ```bash
    pip install aa-contacts
    ```

    If you have a Docker installation instead, add  to your `requirements.txt` file:

    ```pip
    aa-contacts==x.y.z
    ```

    with the desired version and rebuild the Docker stack.

2. Add `'aa_contacts',` to your `INSTALLED_APPS` in `local.py`.

3. Run migrations and collectstatic:

    ```bash
    python manage.py migrate
    python manage.py collectstatic
    ```

    or, if you are on docker:

    ```bash
    auth migrate
    auth collectstatic
    ```

4. Add the update task at the end of the `local.py`:

    ```python
    # AA Contacts
    CELERYBEAT_SCHEDULE['aa_contacts_update_all_contacts'] = {
        'task': 'aa_contacts.tasks.update_all_contacts',
        'schedule': crontab(minute='24'),
    }
    ```

5. Restart Supervisor if you are on a traditional install or the docker stack if you are on docker. 

## Permissions

| Permission                    | Description                                                                                                           |
| ----------------------------- | --------------------------------------------------------------------------------------------------------------------- |
| `manage_alliance_contacts`    | Can add tokens for the alliance and trigger manual updates                                                            |
| `manage_corporation_contacts` | Can add tokens for the corporation and trigger manual updates                                                         |
| `view_alliance_notes`         | Can view contact notes for alliance contacts. If combined with `manage_alliance_contacts`, can also edit notes.       |
| `view_corporation_notes`      | Can view contact notes for corporation contacts. If combined with `manage_corporation_contacts`, can also edit notes. |

