GithubHelp home page GithubHelp logo

ppfeufer / aa-fleetpings Goto Github PK

View Code? Open in Web Editor NEW
2.0 3.0 6.0 3.93 MB

App for Alliance Auth that can format your fleet pings and also ping for you to Discord.

Home Page: https://pypi.org/project/aa-fleetpings/

License: GNU General Public License v3.0

Python 71.00% JavaScript 22.17% HTML 6.18% Makefile 0.58% CSS 0.07%
allianceauth plugin discord eve-online

aa-fleetpings's Introduction

AA Fleet Pings

Version License Python Django pre-commit pre-commit.ci status Code Style: black Discord Checks codecov Translation status Contributor Covenant

ko-fi

App for Alliance Auth that can format your fleet pings and also ping for you to Discord.



Installation

Note

AA Fleet Pings >= 3.0.0 needs at least Alliance Auth v4.0.0!

Please make sure to update your Alliance Auth instance before you install this module or update to the latest version, otherwise an update to Alliance Auth will be pulled in unsupervised.

The last version of AA Fleet Pings that supports Alliance Auth v3 is 2.26.3.

This app is a plugin for Alliance Auth. If you don't have Alliance Auth running already, please install it first before proceeding. (See the official AA installation guide for details)

Note

You also want to make sure that you have the Discord service installed, configured and activated before installing this app.

Step 1: Install the App

Make sure you're in the virtual environment (venv) of your Alliance Auth installation. Then install the latest version:

pip install aa-fleetpings

Step 2: Update Your AA Settings

Configure your AA settings (local.py) as follows:

  • Add 'fleetpings', to INSTALLED_APPS

Step 3: Finalizing the Installation

Copy static files and run migrations

python manage.py collectstatic
python manage.py migrate

Restart your supervisor services for AA

Step 4: Setting up Permission

Now you can set up permissions in Alliance Auth for your users. Add fleetpings | aa fleetpings | Can access this app to the states and/or groups you would like to have access.

Step 5: Setting up the App

In your admin backend you'll find a new section called Fleet Pings. This is where you set all your stuff up, like the webhooks you want to ping and who can ping them, fleet types, comms, formup locations, and so on. It's pretty straight forward, so you shouldn't have any issues. Go nuts!

Updating

To update your existing installation of AA Discord Ping Formatter, first enable your virtual environment.

Then run the following commands from your AA project directory (the one that contains manage.py).

pip install -U aa-fleetpings

python manage.py collectstatic
python manage.py migrate

Finally, restart your AA supervisor services.

Screenshots

View in Alliance Auth

View in Alliance Auth

Discord Ping Example

Discord Ping Example

Configuration

The following settings are available in the Django Admin Backend under /admin/fleetpings/setting/:

Use Default Fleet Types

Enable or disable the default fleet types (Roaming, Home Defense, StratOP, and CTA) that are shown in the fleet type dropdown in addition to your own.

Default: True

Use Default Ping Targets

Enable or disable the default ping targets (@everyone and @here) that are shown in the ping target dropdown in addition to your own.

Default: True

Use Doctrines From Fittings Module

If you have the Fittings and Doctrines module installed, and your doctrines configured there, you don't have to re-build your doctrine list for this module. You can simply use the doctrines you already have configured in the Fittings and Doctrines module.

Default: True

Webhook Verification

If you require your pings to be sent to a webhook, that is not a standard discord webhook.

When disabling webhook verification and using non-Discord webhooks, it is up to you to make sure your webhook understands a payload that is formatted for Discord webhooks.

Default: True

Default Embed Color

The default highlight for the embed, that is used when no other highlight color is defined.

Default: #FAA61A

Changelog

See CHANGELOG.md

Translation Status

Translation status

Do you want to help translate this app into your language or improve the existing translation? - Join our team of translators!

Contributing

You want to contribute to this project? That's cool!

Please make sure to read the Contribution Guidelines.
(I promise, it's not much, just some basics)

aa-fleetpings's People

Contributors

dependabot[bot] avatar ppfeufer avatar pre-commit-ci[bot] avatar pvyparts avatar transifex-integration[bot] avatar weblate avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar

aa-fleetpings's Issues

[Feature Request] AFat Integration

Context

Add the creation of ESI FATLinks through allianceauth-afat module when creating a ping.

Describe the feature you have in mind

Add a checkbox or button (similar to SRP checkbox) to allow auto-creation of ESI Fatlinks from a formatted ping.
Fleet Name & Fleet Type are already populated within both modules.
Obviously the FC Name would need to be activated from the ESI Character Select screen.
When the check box for ESI FATLink is checked, after a user has clicked "Create Ping", open a new browser tab of the ESI Character Select page.
The character selected on that screen would dictate the FC the FATLink is under (not the FC name in Fleet Pings).

Since each FATLink uses a unique Callback key, the callback would need to be processed locally within the Fleet Pings module, unless there was some way to to have AFAT do the processing of the callback creation?
https://[URL].com/fleet-tracker/fatlink/create/esi-fatlink/callback/[CALLBACKKEY]/

Thanks in advance for looking into this feature request!

[Feature Request] Relative time for Discord pings

Context

In which context would you expect your suggested feature to be useful?

Seeing the relative time is quite nice, esp when you expect a fleet later this afternoon but you've missed that the date is for tomorrow (based on real events).

Describe the feature you have in mind

A clear and concise description of what you want to happen.

When generating the ping text, just append the relative time to the end of the local time string.

**Formup (Local Time):** <t:1710532800:F> <t:1710532800:R>

Additional context

Add any other context or screenshots/mockups about the feature request here.

image

1st has a space between, 2nd doesn't.

[Feature Request] Quick Response Templates

Context

In which context would you expect your suggested feature to be useful?
Quickly responding to situations without having to prefill all the info, such as ess defense, quick response fleet to a coalition fleet, etc, the templates would ideally be pre-configured by the individual auth owners

Describe the feature you have in mind

A clear and concise description of what you want to happen.
When you first go into the fleet pings module, there would be buttons that would either auto-post or prefill the form for you depending on pre determined values

Additional context

Add any other context or screenshots/mockups about the feature request here.
image

Do not access INSTALLED_APPS directly

While reviewing the fix for the Discord migration bug I noticed that this app does not check for installed apps correctly. Directly accessing INSTALLED_APPS is strongly discouraged. To ensure that this fix works reliably Django's apps API should be used instead.

From the official docs here:

Your code should never access INSTALLED_APPS directly. Use django.apps.apps instead.

Sanitize inputs

Double quotes in fields cause pings not no pass to discord. Should sanitize all fields and remove weird and possible harmful characters.

Noticed when tried to add ingame channel name in additional details in double quotes.

[Feature Request] Adding some more Fleet options

i have had a few corp mates annoying me with this and they want to add a feature where they can select "Mining Fleet" As an option for the Fleet Type selection. is it possible you can add this simple humble request for me so i can shut up my corp mates ? :) i told them to just edit the text themselfs before they paste it but nopp, too hard for them to do -.-

[Feature Request] Allow for additional custom ping targets

Context

Currently the app only supports pinging targets that are groups. It does not support custom discord roleIDs or states (which are also auto synced as groups to discord)

Describe the feature you have in mind

In the ping targets configuration, you should have the option to see states as a choice of roles to pick from, as well as potentially a way to have a custom discord roleID you would like pinged.

Additional context

My main group of members use the state "Corp Member" (renamed from member) as all their base roles throughout 3rd party tools. (Discord, wikijs, etc)

The app however only currently lets me select from groups themselves, even though states are essentially treated as groups by every other external 3rd party app such as discord.

Weird encoding when typing > in Doctrine field (and others)

Bug Description

When trying to use < or > in the Fleet comms, Doctrine, or Formup Location fields (tested FC name, Fleet name, and Additional information fields and they don't exhibit this behavior), it toggles into a weird encoding loop.
Test text&amp;amp;amp;amp;amp;amp;amp;amp;amp;amp;gt; dje

Steps to Reproduce

Steps to reproduce the behavior:

  1. Click into one of the affected fields.
  2. Press Shift+. to insert a >
  3. Watch as each key press (including releasing . and Shift are converted into &amp;amp;gt;)

Expected behavior

>

Screenshots

If applicable, add screenshots to help explain your problem.

Please complete the following information:

  • App Version: (will get from site host)
  • Alliance Auth Version: (will get from site host)
  • Browser and Version: Chrome 123.0.6312.58

Additional context

Oh whoa it does it for ' as well.

The only way to escape this mode is to triple-click left-mouse until you've highlighted all text, then backspace to delete.

Custom ping targets not auto-linking in Discord properly.

Bug Description

When using a custom ping target, the @group doesn't actually get auto linked to create the ping.

Steps to Reproduce

Steps to reproduce the behavior:

  1. Create custom ping target
  2. Go to Fleet pings app
  3. Design a fleet ping and add your custom ping group to the fleet notification
  4. Ping goes out normally except the @ target isn't auto linked.
    Our last known good fleet ping was on the 18th.

Expected behavior

When a ping goes out using the ping group, it auto links the group properly.

Screenshots

image

Please complete the following information:

  • App Version: 2.13.1
  • Alliance Auth Version: 2.11.2
  • Browser and Version: Brave V1.37.116

Additional context

If I copy and paste from the "Formatted Ping Text" into the channel it works properly.

[Bug] Dropdowns - Acting As Search instead of Dropdown

Bug Description

After the 2.22.1 update fixing the dropdowns, the fields that are supposed to be selectable dropdowns are instead acting as text box search fields. When selecting the field, nothing happens until text is typed in to bring up the list of available selections from the admin pages.

Steps to Reproduce

Steps to reproduce the behavior:

  1. Start creating fleet ping
  2. Try to drop down and select an option for Formup Location, Fleet Comms or Doctrine.
  3. Selections do not show up until text is input into the field

Expected behavior

Would be great to have similar functionality to previous versions that had selectable options regardless if text was typed in the field.

Screenshots

image

Please complete the following information:

  • App Version: 2.22.3
  • Alliance Auth Version: 3.4.0
  • Browser and Version: Chrome 114.0.5735.110 64-bit

DM Fleet pings

Would be nice to be able to clear up the our Discord server. Have the ability to be able to DM Fleet pings to a selected states in AA so that members can decide to mute or not

Enchantment: No ping target and default selections

We are trying to keep the amount of pings to minimum on our discord and would prefer to have a no ping target option as well on the default options. This would allow us to send pre pings without pings :)

Also the ability to select the default option for ping target and ping channel would be awesome or ability to disable format ping for me option as we have no use for this

Edit: And yes for anyone who wants to do this until and if this is implemented you can always do these changes locally on the template files until that

Ping multiple groups

Ability to select multiple ping targets in the ping to ping multiple groups with one message. Would be helpful in an area where SIGs are used and fleet is relevant to both. Maybe also add the ability to select multiple ping channels while you are on it.

[Feature Request] Discord timestamp conversion support.

Rather then having a link to the timezone conversion page (or just dealing with EVE time conversions which some people seem to have trouble with) using the Discord timestamp conversion would show the time in the viewers current timezone.

Not sure if it can be used in embeds. But entering <t:1649212436:F> in Discord for myself returns "Wednesday, 6 April 2022 10:33"
The relative flag can also be used to return "in 32 minutes" <t:1649215376:R> and updates as time goes on (See https://hammertime.djdavid98.art/ for available formats).

I'm envisioning the pings to be updated to show:

Formup EVE Time: 2022-04-12 10:00 ( <t:1649757600:R> ) - relative timestamp (in 6 days)
Formup Local Time: <t:1649757600:F> - Full timestamp of Tuesday, 12 April 2022 18:00 )

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.