Skip to main content

Character/Corporation Ledger

Project description

Ledger module for AllianceAuth.

pre-commit.ci status Code style: black Tests

Features

  • Graphical Overview
  • Ratting,Mining,Trading
  • Character Ledger
  • Corporation Ledger

Upcoming

  • Corp Tax System (Tracks specific amount that transfer'd to specific division)
  • Events Calender

Installation

[!NOTE] AA Ledger needs at least Alliance Auth v4.0.0 Please make sure to update your Alliance Auth before you install this APP

Step 1 - Install the Package

Make sure you're in your virtual environment (venv) of your Alliance Auth then install the pakage.

pip install aa-ledger

Step 2 - Configure Alliance Auth

Configure your Alliance Auth settings (local.py) as follows:

  • Add 'allianceauth.corputils', to INSTALLED_APPS
  • Add 'eveuniverse', to INSTALLED_APPS
  • Add 'ledger', to INSTALLED_APPS

Step 3 - Add the Scheduled Tasks

To set up the Scheduled Tasks add following code to your local.py

CELERYBEAT_SCHEDULE["ledger_character_audit_update_all"] = {
    "task": "ledger.tasks.update_all_characters",
    "schedule": crontab(hour="*/1"),
}
CELERYBEAT_SCHEDULE["ledger_corporation_audit_update_all"] = {
    "task": "ledger.tasks.update_all_corps",
    "schedule": crontab(hour="*/1"),
}

Step 4 - Migration to AA

python manage.py collectstatic
python manage.py migrate

Step 5 - Setting up Permissions

With the Following IDs you can set up the permissions for the Ledger

ID Description
basic_access Can access the Ledger module All Members with the Permission can access the Ledger.
moderator_access Has access to moderation tools Not Implemented yet.
admin_access Has access to all Administration tools Not Implemented yet.
char_audit_admin_access Can Manage Character Audit Module Can Manage Character Audit Module, Like Add Memeberaudit Chars, View Character Journals
corp_audit_admin_access Can Manage Corporation Audit Module Can Manage Corporation Audit Module, Like Add Corp, View Corporation Journals

Step 6 - (Optional) Setting up Compatibilies

The Following Settings can be setting up in the local.py

  • LEDGER_APP_NAME: "YOURNAME" - Set the name of the APP

  • LEDGER_CORP_TAX: 15 - Set Tax Value for ESS Payout Calculation

  • LEDGER_MEMBERAUDIT_USE: True / False - Set to use the Memberaudit Journal to Fetch Statistics

  • LEDGER_LOGGER_USE: True / False - Set to use own Logger File

  • LEDGER_CORPSTATS_TWO: True / False - Set to use Corp Stats Two APP to Fetch Members that are not registred

If you set up LEDGER_LOGGER_USE to True you need to add the following code below:

LOGGING_LEDGER = {
    "handlers": {
        "ledger_file": {
            "level": "INFO",
            "class": "logging.handlers.RotatingFileHandler",
            "filename": os.path.join(BASE_DIR, "log/ledger.log"),
            "formatter": "verbose",
            "maxBytes": 1024 * 1024 * 5,
            "backupCount": 5,
        },
    },
    "loggers": {
        "ledger": {
            "handlers": ["ledger_file", "console"],
            "level": "INFO",
        },
    },
}
LOGGING["handlers"].update(LOGGING_LEDGER["handlers"])
LOGGING["loggers"].update(LOGGING_LEDGER["loggers"])

Highlights

Screenshot 2024-05-14 121014

Screenshot 2024-05-14 121025

Screenshot 2024-05-14 120944

Screenshot 2024-05-14 121001

[!NOTE] Contributing You want to improve the project? Just Make a Pull Request with the Guidelines. We Using pre-commit

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

aa_ledger-0.4.1.tar.gz (303.7 kB view hashes)

Uploaded Source

Built Distribution

aa_ledger-0.4.1-py3-none-any.whl (332.7 kB view hashes)

Uploaded Python 3

Supported by

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