aa-ledger


Nameaa-ledger JSON
Version 0.5.1 PyPI version JSON
download
home_pageNone
SummaryCharacter/Corporation Ledger
upload_time2024-06-14 13:21:03
maintainerNone
docs_urlNone
authorNone
requires_python>=3.8
licenseMIT License Copyright (c) [2024] [Geuthur] Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage
            # Ledger module for AllianceAuth.<a name="aa-ledger"></a>

[![pre-commit.ci status](https://results.pre-commit.ci/badge/github/Geuthur/aa-ledger/master.svg)](https://results.pre-commit.ci/latest/github/Geuthur/aa-ledger/master)
[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)
[![Tests](https://github.com/Geuthur/aa-ledger/actions/workflows/autotester.yml/badge.svg)](https://github.com/Geuthur/aa-ledger/actions/workflows/autotester.yml)
[![codecov](https://codecov.io/gh/Geuthur/aa-ledger/graph/badge.svg?token=5CWREOQKGZ)](https://codecov.io/gh/Geuthur/aa-ledger)

- [AA Ledger](#aa-ledger)
  - [Features](#features)
  - [Upcoming](#upcoming)
  - [Installation](#features)
    - [Step 1 - Install the Package](#step1)
    - [Step 2 - Configure Alliance Auth](#step2)
    - [Step 3 - Add the Scheduled Tasks and Settings](#step3)
    - [Step 4 - Migration to AA](#step4)
    - [Step 5 - Setting up Permissions](#step5)
    - [Step 6 - (Optional) Setting up Compatibilies](#step6)
  - [Highlights](#highlights)

## Features<a name="features"></a>

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

## Upcoming<a name="upcoming"></a>

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

## Installation<a name="installation"></a>

> \[!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<a name="step1"></a>

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

```shell
pip install aa-ledger
```

### Step 2 - Configure Alliance Auth<a name="step2"></a>

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<a name="step3"></a>

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

```python
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<a name="step4"></a>

```shell
python manage.py collectstatic
python manage.py migrate
```

### Step 5 - Setting up Permissions<a name="step5"></a>

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.                                   |
| `admin_access`            | Has access to all Administration tools    | Has Access to all Modules.                                                               |
| `char_audit_manager`      | Has Access to all characters for own Corp | Has Access to all characters for own Corp.                                               |
| `corp_audit_manager`      | Has Access to own Corporation             | Has Access to own Corporation.                                                           |
| `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<a name="step6"></a>

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:

```python
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<a name="highlights"></a>

![Screenshot 2024-05-14 121014](https://github.com/Geuthur/aa-ledger/assets/761682/d0604260-b672-4bf5-a16a-d1b90557744d)

![Screenshot 2024-05-14 121025](https://github.com/Geuthur/aa-ledger/assets/761682/f8f20e6a-d37d-4a50-a1aa-8615c0f8e88b)

![Screenshot 2024-05-14 120944](https://github.com/Geuthur/aa-ledger/assets/761682/2d695369-1331-4be9-8adf-9c6dabf80dda)

![Screenshot 2024-05-14 121001](https://github.com/Geuthur/aa-ledger/assets/761682/463b9921-150c-42c1-8c3e-eee0f5cfc2bb)

> \[!NOTE\]
> Contributing
> You want to improve the project?
> Just Make a [Pull Request](https://github.com/Geuthur/aa-ledger/pulls) with the Guidelines.
> We Using pre-commit

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "aa-ledger",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.8",
    "maintainer_email": null,
    "keywords": null,
    "author": null,
    "author_email": "Geuthur <devgeuthur@gmail.com>",
    "download_url": "https://files.pythonhosted.org/packages/39/17/7c12a9395fe92ee2add4235c7a387a976dab28040fc29fc8c5a75b2eb180/aa_ledger-0.5.1.tar.gz",
    "platform": null,
    "description": "# Ledger module for AllianceAuth.<a name=\"aa-ledger\"></a>\n\n[![pre-commit.ci status](https://results.pre-commit.ci/badge/github/Geuthur/aa-ledger/master.svg)](https://results.pre-commit.ci/latest/github/Geuthur/aa-ledger/master)\n[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)\n[![Tests](https://github.com/Geuthur/aa-ledger/actions/workflows/autotester.yml/badge.svg)](https://github.com/Geuthur/aa-ledger/actions/workflows/autotester.yml)\n[![codecov](https://codecov.io/gh/Geuthur/aa-ledger/graph/badge.svg?token=5CWREOQKGZ)](https://codecov.io/gh/Geuthur/aa-ledger)\n\n- [AA Ledger](#aa-ledger)\n  - [Features](#features)\n  - [Upcoming](#upcoming)\n  - [Installation](#features)\n    - [Step 1 - Install the Package](#step1)\n    - [Step 2 - Configure Alliance Auth](#step2)\n    - [Step 3 - Add the Scheduled Tasks and Settings](#step3)\n    - [Step 4 - Migration to AA](#step4)\n    - [Step 5 - Setting up Permissions](#step5)\n    - [Step 6 - (Optional) Setting up Compatibilies](#step6)\n  - [Highlights](#highlights)\n\n## Features<a name=\"features\"></a>\n\n- Graphical Overview\n- Ratting,Mining,Trading\n- Character Ledger\n- Corporation Ledger\n\n## Upcoming<a name=\"upcoming\"></a>\n\n- Corp Tax System (Tracks specific amount that transfer'd to specific division)\n- Events Calender\n\n## Installation<a name=\"installation\"></a>\n\n> \\[!NOTE\\]\n> AA Ledger needs at least Alliance Auth v4.0.0\n> Please make sure to update your Alliance Auth before you install this APP\n\n### Step 1 - Install the Package<a name=\"step1\"></a>\n\nMake sure you're in your virtual environment (venv) of your Alliance Auth then install the pakage.\n\n```shell\npip install aa-ledger\n```\n\n### Step 2 - Configure Alliance Auth<a name=\"step2\"></a>\n\nConfigure your Alliance Auth settings (`local.py`) as follows:\n\n- Add `'allianceauth.corputils',` to `INSTALLED_APPS`\n- Add `'eveuniverse',` to `INSTALLED_APPS`\n- Add `'ledger',` to `INSTALLED_APPS`\n\n### Step 3 - Add the Scheduled Tasks<a name=\"step3\"></a>\n\nTo set up the Scheduled Tasks add following code to your `local.py`\n\n```python\nCELERYBEAT_SCHEDULE[\"ledger_character_audit_update_all\"] = {\n    \"task\": \"ledger.tasks.update_all_characters\",\n    \"schedule\": crontab(hour=\"*/1\"),\n}\nCELERYBEAT_SCHEDULE[\"ledger_corporation_audit_update_all\"] = {\n    \"task\": \"ledger.tasks.update_all_corps\",\n    \"schedule\": crontab(hour=\"*/1\"),\n}\n```\n\n### Step 4 - Migration to AA<a name=\"step4\"></a>\n\n```shell\npython manage.py collectstatic\npython manage.py migrate\n```\n\n### Step 5 - Setting up Permissions<a name=\"step5\"></a>\n\nWith the Following IDs you can set up the permissions for the Ledger\n\n| ID                        | Description                               |                                                                                          |\n| :------------------------ | :---------------------------------------- | :--------------------------------------------------------------------------------------- |\n| `basic_access`            | Can access the Ledger module              | All Members with the Permission can access the Ledger.                                   |\n| `admin_access`            | Has access to all Administration tools    | Has Access to all Modules.                                                               |\n| `char_audit_manager`      | Has Access to all characters for own Corp | Has Access to all characters for own Corp.                                               |\n| `corp_audit_manager`      | Has Access to own Corporation             | Has Access to own Corporation.                                                           |\n| `char_audit_admin_access` | Can Manage Character Audit Module         | Can Manage Character Audit Module, Like Add Memeberaudit Chars, View Character Journals. |\n| `corp_audit_admin_access` | Can Manage Corporation Audit Module       | Can Manage Corporation Audit Module, Like Add Corp, View Corporation Journals.           |\n\n### Step 6 - (Optional) Setting up Compatibilies<a name=\"step6\"></a>\n\nThe Following Settings can be setting up in the `local.py`\n\n- LEDGER_APP_NAME:          `\"YOURNAME\"`     - Set the name of the APP\n\n- LEDGER_CORP_TAX:          `15`             - Set Tax Value for ESS Payout Calculation\n\n- LEDGER_MEMBERAUDIT_USE:   `True / False`   - Set to use the Memberaudit Journal to Fetch Statistics\n\n- LEDGER_LOGGER_USE:        `True / False`   - Set to use own Logger File\n\n- LEDGER_CORPSTATS_TWO:     `True / False`   - Set to use Corp Stats Two APP to Fetch Members that are not registred\n\nIf you set up LEDGER_LOGGER_USE to `True` you need to add the following code below:\n\n```python\nLOGGING_LEDGER = {\n    \"handlers\": {\n        \"ledger_file\": {\n            \"level\": \"INFO\",\n            \"class\": \"logging.handlers.RotatingFileHandler\",\n            \"filename\": os.path.join(BASE_DIR, \"log/ledger.log\"),\n            \"formatter\": \"verbose\",\n            \"maxBytes\": 1024 * 1024 * 5,\n            \"backupCount\": 5,\n        },\n    },\n    \"loggers\": {\n        \"ledger\": {\n            \"handlers\": [\"ledger_file\", \"console\"],\n            \"level\": \"INFO\",\n        },\n    },\n}\nLOGGING[\"handlers\"].update(LOGGING_LEDGER[\"handlers\"])\nLOGGING[\"loggers\"].update(LOGGING_LEDGER[\"loggers\"])\n```\n\n## Highlights<a name=\"highlights\"></a>\n\n![Screenshot 2024-05-14 121014](https://github.com/Geuthur/aa-ledger/assets/761682/d0604260-b672-4bf5-a16a-d1b90557744d)\n\n![Screenshot 2024-05-14 121025](https://github.com/Geuthur/aa-ledger/assets/761682/f8f20e6a-d37d-4a50-a1aa-8615c0f8e88b)\n\n![Screenshot 2024-05-14 120944](https://github.com/Geuthur/aa-ledger/assets/761682/2d695369-1331-4be9-8adf-9c6dabf80dda)\n\n![Screenshot 2024-05-14 121001](https://github.com/Geuthur/aa-ledger/assets/761682/463b9921-150c-42c1-8c3e-eee0f5cfc2bb)\n\n> \\[!NOTE\\]\n> Contributing\n> You want to improve the project?\n> Just Make a [Pull Request](https://github.com/Geuthur/aa-ledger/pulls) with the Guidelines.\n> We Using pre-commit\n",
    "bugtrack_url": null,
    "license": "MIT License  Copyright (c) [2024] [Geuthur]  Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:  The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.",
    "summary": "Character/Corporation Ledger",
    "version": "0.5.1",
    "project_urls": {
        "Changelog": "https://github.com/Geuthur/aa-ledger/blob/master/CHANGELOG.md",
        "Homepage": "https://github.com/Geuthur/aa-ledger",
        "Source": "https://github.com/Geuthur/aa-ledger",
        "Tracker": "https://github.com/Geuthur/aa-ledger/issues"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "bcaf7afaf81b96bf9229ce9fb95981de4b8ae466e790ab6ad5980b5939ebf0d0",
                "md5": "45eb307f25fc4a534bce97743e98fe67",
                "sha256": "ed6b8085f5f556181d0a960f2e145e60ed84adeece96c6b6a1df2bfeb2477eb2"
            },
            "downloads": -1,
            "filename": "aa_ledger-0.5.1-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "45eb307f25fc4a534bce97743e98fe67",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8",
            "size": 372762,
            "upload_time": "2024-06-14T13:21:00",
            "upload_time_iso_8601": "2024-06-14T13:21:00.721724Z",
            "url": "https://files.pythonhosted.org/packages/bc/af/7afaf81b96bf9229ce9fb95981de4b8ae466e790ab6ad5980b5939ebf0d0/aa_ledger-0.5.1-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "39177c12a9395fe92ee2add4235c7a387a976dab28040fc29fc8c5a75b2eb180",
                "md5": "4b551ade769a0071cee7b12fcb6620cf",
                "sha256": "09446f43b0af11c17ebc5ce6e5ddb35cb81ef83d05ec3794311d4dee3f908124"
            },
            "downloads": -1,
            "filename": "aa_ledger-0.5.1.tar.gz",
            "has_sig": false,
            "md5_digest": "4b551ade769a0071cee7b12fcb6620cf",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8",
            "size": 323262,
            "upload_time": "2024-06-14T13:21:03",
            "upload_time_iso_8601": "2024-06-14T13:21:03.629756Z",
            "url": "https://files.pythonhosted.org/packages/39/17/7c12a9395fe92ee2add4235c7a387a976dab28040fc29fc8c5a75b2eb180/aa_ledger-0.5.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-06-14 13:21:03",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "Geuthur",
    "github_project": "aa-ledger",
    "travis_ci": false,
    "coveralls": true,
    "github_actions": true,
    "tox": true,
    "lcname": "aa-ledger"
}
        
Elapsed time: 0.26011s