Skip to main content

Jay's Army Tools plugin for Alliance Auth.

Project description

Jay's Army Tools for Alliance Auth

aa-jays-tools is an Alliance Auth plugin that currently provides:

  • Discord recruiter helper commands (via allianceauth-discordbot cogs)
  • Secure Groups smart filters for recruitment activity and low skill points

release python django license

Contents

Overview

This plugin extends Alliance Auth with small operational tools used by Jay's Army workflows. It integrates through Alliance Auth hooks in jaystools/auth_hooks.py and keeps optional integrations guarded by install checks.

Features

  • Registers a Discord cog (jaystools.cogs.me_recruter) through the discord_cogs_hook
  • Registers Secure Groups smart filters through secure_group_filters when securegroups is installed
  • Provides a RecruitmentFilter based on approved HR applications in a configurable time window
  • Provides a CharacterSkillPointFilter (when memberaudit is installed) to match users below a skillpoint threshold

Requirements

  • Alliance Auth 4.x
  • allianceauth-discordbot (optional, required for Discord cog usage)
  • allianceauth-secure-groups (optional, required for smart filters)
  • aa-memberaudit (optional, required for CharacterSkillPointFilter)

Installation

1 - Install the package

pip install aa-jays-tools

2 - Add app to Alliance Auth

Add jaystools to INSTALLED_APPS in your local.py:

INSTALLED_APPS += [
    "jaystools",
]

3 - Run migrations and collect static files

python manage.py migrate
python manage.py collectstatic

4 - Restart services

Restart web and worker processes so hooks and app registration are loaded.

Configuration

Required settings for Discord recruiter cog

If you use the recruiter cog, define these settings in your host AA local.py:

# Command scope (single guild or list)
DISCORD_GUILD_ID = "1234567890"
# DISCORD_GUILD_IDS = [1234567890, 9876543210]

# Recruiter workflow channels/roles
RECRUIT_CHANNEL_ID = 123456789012345678
RECRUITER_GROUP_ID = 987654321098765432

jaystools.app_settings.get_all_servers() merges DISCORD_GUILD_IDS and DISCORD_GUILD_ID for command registration.

Optional integration behavior

  • If securegroups is not installed, no smart filter hook is exported.
  • If memberaudit is not installed, CharacterSkillPointFilter is not exported.

Smart filters

RecruitmentFilter

Model: jaystools.models.smart_filters.RecruitmentFilter

Checks whether a user approved at least recruitments_needed HR applications within the last days.

CharacterSkillPointFilter

Model: jaystools.models.smart_filters.CharacterSkillPointFilter

Available only with memberaudit installed. Matches users with at least one character at or below sp_threshold. Can optionally ignore alts (ignore_alts=True) and evaluate mains only.

Discord recruiter cog

Cog module: jaystools.cogs.me_recruter

Registered commands include:

  • slash command: me_recruter
  • message context command: Créer un fil de recrutement
  • user context command: Me Recruter

Each command creates a private recruitment thread in RECRUIT_CHANNEL_ID and pings RECRUITER_GROUP_ID.

Development

This repository includes a standard Alliance Auth plugin test layout:

  • tox.ini
  • runtests.py
  • testauth/
  • jaystools/tests/

Run tests:

python -u runtests.py jaystools.tests -v 2

Run lint:

pylint jaystools

If tox is installed:

tox -e py312-django42
tox -e pylint

Changelog

See CHANGELOG.md.

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_jays_tools-1.0.3.tar.gz (14.6 kB view details)

Uploaded Source

Built Distribution

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

aa_jays_tools-1.0.3-py3-none-any.whl (21.4 kB view details)

Uploaded Python 3

File details

Details for the file aa_jays_tools-1.0.3.tar.gz.

File metadata

  • Download URL: aa_jays_tools-1.0.3.tar.gz
  • Upload date:
  • Size: 14.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for aa_jays_tools-1.0.3.tar.gz
Algorithm Hash digest
SHA256 46c44c8e875b0da2921921c7ebc3e7da4f3a07d973d6e6c25a3cae10ae443a79
MD5 8f09625259526174c68263b4ab4239d1
BLAKE2b-256 97c0cf29d28b92f294c8b6ee12d6ddade90174390761a40e0f78a3e726122b1f

See more details on using hashes here.

Provenance

The following attestation bundles were made for aa_jays_tools-1.0.3.tar.gz:

Publisher: publish.yml on hermesdj/aa-jays-tools

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file aa_jays_tools-1.0.3-py3-none-any.whl.

File metadata

  • Download URL: aa_jays_tools-1.0.3-py3-none-any.whl
  • Upload date:
  • Size: 21.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for aa_jays_tools-1.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 c41a291bfae8a2e77485faff9cdc39d1619f7a5c0c43483df36613e127b50c45
MD5 e2e9c3972628e7b3b421f0a29e19e2f6
BLAKE2b-256 101d3057173665cfa4a22e8bcc82ff217a484eb37d5eefb4ca6ec0043e6e82cd

See more details on using hashes here.

Provenance

The following attestation bundles were made for aa_jays_tools-1.0.3-py3-none-any.whl:

Publisher: publish.yml on hermesdj/aa-jays-tools

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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