aa-intel-tool 2.6.3__py3-none-any.whl → 2.7.1__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (43) hide show
  1. aa_intel_tool/__init__.py +1 -1
  2. aa_intel_tool/constants.py +0 -17
  3. aa_intel_tool/exceptions.py +14 -4
  4. aa_intel_tool/locale/cs_CZ/LC_MESSAGES/django.po +15 -12
  5. aa_intel_tool/locale/de/LC_MESSAGES/django.mo +0 -0
  6. aa_intel_tool/locale/de/LC_MESSAGES/django.po +17 -14
  7. aa_intel_tool/locale/django.pot +16 -13
  8. aa_intel_tool/locale/es/LC_MESSAGES/django.po +17 -12
  9. aa_intel_tool/locale/fr_FR/LC_MESSAGES/django.po +15 -12
  10. aa_intel_tool/locale/it_IT/LC_MESSAGES/django.po +15 -12
  11. aa_intel_tool/locale/ja/LC_MESSAGES/django.po +17 -12
  12. aa_intel_tool/locale/ko_KR/LC_MESSAGES/django.po +17 -12
  13. aa_intel_tool/locale/nl_NL/LC_MESSAGES/django.po +15 -12
  14. aa_intel_tool/locale/pl_PL/LC_MESSAGES/django.po +15 -12
  15. aa_intel_tool/locale/ru/LC_MESSAGES/django.po +17 -12
  16. aa_intel_tool/locale/sk/LC_MESSAGES/django.po +15 -12
  17. aa_intel_tool/locale/uk/LC_MESSAGES/django.mo +0 -0
  18. aa_intel_tool/locale/uk/LC_MESSAGES/django.po +20 -21
  19. aa_intel_tool/locale/zh_Hans/LC_MESSAGES/django.po +17 -12
  20. aa_intel_tool/parser/general.py +5 -3
  21. aa_intel_tool/parser/module/chatlist.py +6 -4
  22. aa_intel_tool/parser/module/dscan.py +1 -1
  23. aa_intel_tool/parser/module/fleetcomp.py +1 -1
  24. aa_intel_tool/templates/aa_intel_tool/bundles/aa-intel-tool-chatscan-highlight-js.html +2 -2
  25. aa_intel_tool/templates/aa_intel_tool/bundles/aa-intel-tool-chatscan-js.html +2 -2
  26. aa_intel_tool/templates/aa_intel_tool/bundles/aa-intel-tool-css.html +2 -2
  27. aa_intel_tool/templates/aa_intel_tool/bundles/aa-intel-tool-dscan-highlight-js.html +2 -2
  28. aa_intel_tool/templates/aa_intel_tool/bundles/aa-intel-tool-dscan-js.html +2 -2
  29. aa_intel_tool/templates/aa_intel_tool/bundles/aa-intel-tool-fleetcomp-js.html +2 -2
  30. aa_intel_tool/templates/aa_intel_tool/bundles/aa-intel-tool-fleetcomposition-highlight-js.html +2 -2
  31. aa_intel_tool/templates/aa_intel_tool/bundles/aa-intel-tool-js.html +2 -2
  32. aa_intel_tool/templates/aa_intel_tool/bundles/aa-intel-tool-scan-result-common-js.html +2 -2
  33. aa_intel_tool/templates/aa_intel_tool/views/index.html +0 -7
  34. aa_intel_tool/tests/test_access.py +1 -7
  35. aa_intel_tool/tests/test_auth_hooks.py +1 -7
  36. {aa_intel_tool-2.6.3.dist-info → aa_intel_tool-2.7.1.dist-info}/METADATA +1 -1
  37. {aa_intel_tool-2.6.3.dist-info → aa_intel_tool-2.7.1.dist-info}/RECORD +39 -43
  38. aa_intel_tool/helper/static_files.py +0 -42
  39. aa_intel_tool/templatetags/__init__.py +0 -3
  40. aa_intel_tool/templatetags/aa_intel_tool.py +0 -88
  41. aa_intel_tool/tests/test_templatetags.py +0 -103
  42. {aa_intel_tool-2.6.3.dist-info → aa_intel_tool-2.7.1.dist-info}/WHEEL +0 -0
  43. {aa_intel_tool-2.6.3.dist-info → aa_intel_tool-2.7.1.dist-info}/licenses/LICENSE +0 -0
@@ -12,7 +12,7 @@ msgid ""
12
12
  msgstr ""
13
13
  "Project-Id-Version: AA Intel Tool 2.5.1\n"
14
14
  "Report-Msgid-Bugs-To: https://github.com/ppfeufer/aa-intel-tool/issues\n"
15
- "POT-Creation-Date: 2025-05-05 22:48+0200\n"
15
+ "POT-Creation-Date: 2025-07-08 12:13+0200\n"
16
16
  "PO-Revision-Date: 2025-02-18 09:17+0000\n"
17
17
  "Last-Translator: Peter Pfeufer <info@ppfeufer.de>\n"
18
18
  "Language-Team: Chinese (Simplified Han script) <https://weblate.ppfeufer.de/projects/alliance-auth-apps/aa-intel-tool/zh_Hans/>\n"
@@ -26,7 +26,6 @@ msgstr ""
26
26
  #: aa_intel_tool/__init__.py:9
27
27
  #: aa_intel_tool/templates/aa_intel_tool/base.html:7
28
28
  #: aa_intel_tool/templates/aa_intel_tool/base.html:11
29
- #: aa_intel_tool/templates/aa_intel_tool/views/index.html:8
30
29
  #: aa_intel_tool/templates/aa_intel_tool/views/scan/chatlist.html:5
31
30
  #: aa_intel_tool/templates/aa_intel_tool/views/scan/dscan.html:5
32
31
  #: aa_intel_tool/templates/aa_intel_tool/views/scan/fleetcomp.html:5
@@ -51,22 +50,28 @@ msgstr "原始数据"
51
50
  msgid "Intel Parser v{__version__}"
52
51
  msgstr ""
53
52
 
54
- #: aa_intel_tool/constants.py:61 aa_intel_tool/models.py:24
53
+ #: aa_intel_tool/constants.py:56 aa_intel_tool/models.py:24
55
54
  msgid "Chat list"
56
55
  msgstr "聊天列表"
57
56
 
58
- #: aa_intel_tool/constants.py:67 aa_intel_tool/models.py:22
57
+ #: aa_intel_tool/constants.py:62 aa_intel_tool/models.py:22
59
58
  #: aa_intel_tool/templates/aa_intel_tool/partials/index/form.html:28
60
59
  msgid "D-Scan"
61
60
  msgstr "定向扫描"
62
61
 
63
- #: aa_intel_tool/constants.py:73 aa_intel_tool/models.py:23
62
+ #: aa_intel_tool/constants.py:68 aa_intel_tool/models.py:23
64
63
  #: aa_intel_tool/models.py:123
65
64
  #: aa_intel_tool/templates/aa_intel_tool/partials/index/form.html:33
66
65
  msgid "Fleet composition"
67
66
  msgstr "舰队组成"
68
67
 
69
- #: aa_intel_tool/exceptions.py:34
68
+ #: aa_intel_tool/exceptions.py:44
69
+ #, fuzzy
70
+ #| msgid "A parser error occurred » {message}"
71
+ msgid "Unknown parser error"
72
+ msgstr "发生了一个解析器错误 » {message}"
73
+
74
+ #: aa_intel_tool/exceptions.py:46
70
75
  #, python-brace-format
71
76
  msgid "A parser error occurred » {message}"
72
77
  msgstr "发生了一个解析器错误 » {message}"
@@ -161,27 +166,27 @@ msgstr ""
161
166
  msgid "Scan data"
162
167
  msgstr ""
163
168
 
164
- #: aa_intel_tool/parser/general.py:46
169
+ #: aa_intel_tool/parser/general.py:47
165
170
  msgid "No suitable parser found. Input is not a supported intel type or malformed …"
166
171
  msgstr ""
167
172
 
168
- #: aa_intel_tool/parser/general.py:63
173
+ #: aa_intel_tool/parser/general.py:65
169
174
  msgid "No data to parse …"
170
175
  msgstr ""
171
176
 
172
- #: aa_intel_tool/parser/module/chatlist.py:60
177
+ #: aa_intel_tool/parser/module/chatlist.py:61
173
178
  msgid "Something went wrong while fetching the character information from ESI."
174
179
  msgstr ""
175
180
 
176
- #: aa_intel_tool/parser/module/chatlist.py:67
181
+ #: aa_intel_tool/parser/module/chatlist.py:69
177
182
  msgid "Character unknown to ESI."
178
183
  msgstr ""
179
184
 
180
- #: aa_intel_tool/parser/module/chatlist.py:256
185
+ #: aa_intel_tool/parser/module/chatlist.py:258
181
186
  msgid "The chat list module is currently disabled."
182
187
  msgstr ""
183
188
 
184
- #: aa_intel_tool/parser/module/chatlist.py:275
189
+ #: aa_intel_tool/parser/module/chatlist.py:277
185
190
  #, python-brace-format
186
191
  msgid "Chat scans are currently limited to a maximum of {max_allowed_pilots} pilot per scan. Your list of pilots exceeds this limit."
187
192
  msgid_plural "Chat scans are currently limited to a maximum of {max_allowed_pilots} pilots per scan. Your list of pilots exceeds this limit."
@@ -42,8 +42,10 @@ def check_intel_type(scan_data: list) -> str:
42
42
  return intel_type
43
43
 
44
44
  raise ParserError(
45
- message=_(
46
- "No suitable parser found. Input is not a supported intel type or malformed …"
45
+ message=str(
46
+ _(
47
+ "No suitable parser found. Input is not a supported intel type or malformed …"
48
+ )
47
49
  )
48
50
  )
49
51
 
@@ -60,7 +62,7 @@ def parse_intel(form_data: str) -> str:
60
62
  scan_data = form_data.splitlines()
61
63
 
62
64
  if not scan_data:
63
- raise ParserError(message=_("No data to parse …"))
65
+ raise ParserError(message=str(_("No data to parse …")))
64
66
 
65
67
  try:
66
68
  intel_type = check_intel_type(scan_data=scan_data)
@@ -56,15 +56,17 @@ def _get_character_info(scan_data: list) -> QuerySet[EveCharacter]:
56
56
  )
57
57
  except EveEntity.DoesNotExist as exc: # pylint: disable=no-member
58
58
  raise ParserError(
59
- message=_(
60
- "Something went wrong while fetching the character information from ESI."
59
+ message=str(
60
+ _(
61
+ "Something went wrong while fetching the character information from ESI."
62
+ )
61
63
  )
62
64
  ) from exc
63
65
 
64
66
  # In case the name does not belong to an Eve character,
65
67
  # EveEntity returns an empty object
66
68
  if not eve_character_ids:
67
- raise ParserError(message=_("Character unknown to ESI."))
69
+ raise ParserError(message=str(_("Character unknown to ESI.")))
68
70
 
69
71
  eve_characters = get_or_create_character(character_ids=eve_character_ids)
70
72
 
@@ -253,7 +255,7 @@ def parse(
253
255
 
254
256
  # Only parse the chat scan if the module is enabled
255
257
  if not AppSettings.INTELTOOL_ENABLE_MODULE_CHATSCAN:
256
- raise ParserError(message=_("The chat list module is currently disabled."))
258
+ raise ParserError(message=str(_("The chat list module is currently disabled.")))
257
259
 
258
260
  logger.debug(msg=f"{len(scan_data)} name(s) to work through …")
259
261
 
@@ -359,7 +359,7 @@ def parse(scan_data: list) -> Scan:
359
359
 
360
360
  # Only parse the d-scan if the module is enabled
361
361
  if not AppSettings.INTELTOOL_ENABLE_MODULE_DSCAN:
362
- raise ParserError(message=_("The D-Scan module is currently disabled."))
362
+ raise ParserError(message=str(_("The D-Scan module is currently disabled.")))
363
363
 
364
364
  parsed_data = {}
365
365
  ansiblex_destination, counter, eve_ids = _get_scan_details(scan_data=scan_data)
@@ -178,7 +178,7 @@ def parse(scan_data: list) -> Scan:
178
178
 
179
179
  if not AppSettings.INTELTOOL_ENABLE_MODULE_FLEETCOMP:
180
180
  raise ParserError(
181
- message=_("The fleet composition module is currently disabled.")
181
+ message=str(_("The fleet composition module is currently disabled."))
182
182
  )
183
183
 
184
184
  parsed_data = {}
@@ -1,3 +1,3 @@
1
- {% load aa_intel_tool %}
1
+ {% load sri %}
2
2
 
3
- {% aa_intel_tool_static "javascript/aa-intel-tool-chatscan-highlight.min.js" %}
3
+ {% sri_static "aa_intel_tool/javascript/aa-intel-tool-chatscan-highlight.min.js" %}
@@ -1,8 +1,8 @@
1
- {% load aa_intel_tool %}
1
+ {% load sri %}
2
2
 
3
3
  {% if not common_already_loaded %}
4
4
  {% include "aa_intel_tool/bundles/aa-intel-tool-scan-result-common-js.html" %}
5
5
  {% include "aa_intel_tool/bundles/aa-intel-tool-chatscan-highlight-js.html" %}
6
6
  {% endif %}
7
7
 
8
- {% aa_intel_tool_static "javascript/aa-intel-tool-chatscan.min.js" %}
8
+ {% sri_static "aa_intel_tool/javascript/aa-intel-tool-chatscan.min.js" %}
@@ -1,3 +1,3 @@
1
- {% load aa_intel_tool %}
1
+ {% load sri %}
2
2
 
3
- {% aa_intel_tool_static "css/aa-intel-tool.min.css" %}
3
+ {% sri_static "aa_intel_tool/css/aa-intel-tool.min.css" %}
@@ -1,3 +1,3 @@
1
- {% load aa_intel_tool %}
1
+ {% load sri %}
2
2
 
3
- {% aa_intel_tool_static "javascript/aa-intel-tool-dscan-highlight.min.js" %}
3
+ {% sri_static "aa_intel_tool/javascript/aa-intel-tool-dscan-highlight.min.js" %}
@@ -1,6 +1,6 @@
1
- {% load aa_intel_tool %}
1
+ {% load sri %}
2
2
 
3
3
  {% include "aa_intel_tool/bundles/aa-intel-tool-scan-result-common-js.html" %}
4
4
  {% include "aa_intel_tool/bundles/aa-intel-tool-dscan-highlight-js.html" %}
5
5
 
6
- {% aa_intel_tool_static "javascript/aa-intel-tool-dscan.min.js" %}
6
+ {% sri_static "aa_intel_tool/javascript/aa-intel-tool-dscan.min.js" %}
@@ -1,9 +1,9 @@
1
- {% load aa_intel_tool %}
1
+ {% load sri %}
2
2
 
3
3
  {% include "aa_intel_tool/bundles/aa-intel-tool-scan-result-common-js.html" %}
4
4
  {% include "aa_intel_tool/bundles/aa-intel-tool-fleetcomposition-highlight-js.html" %}
5
5
 
6
- {% aa_intel_tool_static "javascript/aa-intel-tool-fleetcomposition.min.js" %}
6
+ {% sri_static "aa_intel_tool/javascript/aa-intel-tool-fleetcomposition.min.js" %}
7
7
 
8
8
  {% if app_settings.INTELTOOL_ENABLE_MODULE_CHATSCAN %}
9
9
  {% include "aa_intel_tool/bundles/aa-intel-tool-chatscan-highlight-js.html" with common_already_loaded=True %}
@@ -1,3 +1,3 @@
1
- {% load aa_intel_tool %}
1
+ {% load sri %}
2
2
 
3
- {% aa_intel_tool_static "javascript/aa-intel-tool-fleetcomposition-highlight.min.js" %}
3
+ {% sri_static "aa_intel_tool/javascript/aa-intel-tool-fleetcomposition-highlight.min.js" %}
@@ -1,3 +1,3 @@
1
- {% load aa_intel_tool %}
1
+ {% load sri %}
2
2
 
3
- {% aa_intel_tool_static "javascript/aa-intel-tool.min.js" %}
3
+ {% sri_static "aa_intel_tool/javascript/aa-intel-tool.min.js" %}
@@ -1,3 +1,3 @@
1
- {% load aa_intel_tool %}
1
+ {% load sri %}
2
2
 
3
- {% aa_intel_tool_static "javascript/aa-intel-tool-scan-result-common.min.js" %}
3
+ {% sri_static "aa_intel_tool/javascript/aa-intel-tool-scan-result-common.min.js" %}
@@ -3,13 +3,6 @@
3
3
  {% load evelinks %}
4
4
  {% load i18n %}
5
5
 
6
- {% block aa_intel_tool_header %}
7
- {% if not user.is_authenticated %}
8
- {% translate "Intel Parser" as translated_header %}
9
- {% include "framework/header/page-header.html" with title=translated_header %}
10
- {% endif %}
11
- {% endblock %}
12
-
13
6
  {% block aa_intel_tool_body %}
14
7
  {% include "aa_intel_tool/partials/index/form.html" %}
15
8
  {% include "aa_intel_tool/partials/body/scan-retention-note.html" %}
@@ -45,13 +45,7 @@ class TestAccess(TestCase):
45
45
 
46
46
  cls.header_top = '<div class="navbar-brand">Intel Parser</div>'
47
47
 
48
- cls.header_public_page = """
49
- <div class="aa-intel-tool-header">
50
- <h1 class="page-header text-center mb-3">
51
- Intel Parser
52
- </h1>
53
- </div>
54
- """
48
+ cls.header_public_page = '<div class="navbar-brand">Intel Parser</div>'
55
49
 
56
50
  def test_access_to_index_for_logged_in_user(self):
57
51
  """
@@ -43,13 +43,7 @@ class TestHooks(TestCase):
43
43
  </li>
44
44
  """
45
45
 
46
- cls.header_public_page = """
47
- <div class="aa-intel-tool-header">
48
- <h1 class="page-header text-center mb-3">
49
- Intel Parser
50
- </h1>
51
- </div>
52
- """
46
+ cls.header_public_page = '<div class="navbar-brand">Intel Parser</div>'
53
47
 
54
48
  def test_render_hook_with_user_logged_in(self):
55
49
  """
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: aa-intel-tool
3
- Version: 2.6.3
3
+ Version: 2.7.1
4
4
  Summary: A simple parser for D-Scans and more for Alliance Auth
5
5
  Project-URL: Changelog, https://github.com/ppfeufer/aa-intel-tool/blob/master/CHANGELOG.md
6
6
  Project-URL: Documentation, https://github.com/ppfeufer/aa-intel-tool/blob/master/README.md
@@ -1,54 +1,53 @@
1
- aa_intel_tool/__init__.py,sha256=5Thy5KKfPrcSXLexPxjEWNmGIuk63BuKDTbJL8Fws7o,135
1
+ aa_intel_tool/__init__.py,sha256=Fsm6vDAryRwiWBtvazCmoYQD_-rxIR96P9ozzizMoTA,135
2
2
  aa_intel_tool/admin.py,sha256=ZSsxpL4LmV0nxQRww6BwY5BPLM23JxpnCPwMQbACv78,2441
3
3
  aa_intel_tool/app_settings.py,sha256=oDhUQii5p_DqWnBRXg26Q3rZwSmElMlzkhtr5WqiRK8,2531
4
4
  aa_intel_tool/apps.py,sha256=rfCtJ2bFQB4sDdl-zYo_i034oq-fF1Ad3NAU55NoBQk,452
5
5
  aa_intel_tool/auth_hooks.py,sha256=Z0FyC6XWWCulRQzK1nv2JeDhlvOCxY37KXK_kDRy78U,1469
6
- aa_intel_tool/constants.py,sha256=0KhsuTwsBP6X0iPIOXR5XKSztfloIkLC8mFT_btiKDc,2791
7
- aa_intel_tool/exceptions.py,sha256=1uEreioXqnWR8trgU5RSvj7CZ6GdkaWG-wI5G1pfvqs,693
6
+ aa_intel_tool/constants.py,sha256=sRUov2pA1ELHPt_3t-BfwMqQ5h8ZKpCl6ZLkvR8ETW0,2224
7
+ aa_intel_tool/exceptions.py,sha256=_iufWZejzDDGM24ydcUK3GRKqmOXHsKuarrppLLYyUo,866
8
8
  aa_intel_tool/form.py,sha256=naH20ZGyktwM-JBZeC98FRlptLpYe5PvQYu-Xto7-z4,545
9
9
  aa_intel_tool/models.py,sha256=oZ0_pPl-4XiGOspVx-9n8DITqsfIv2yizFn532BtZcg,4057
10
10
  aa_intel_tool/tasks.py,sha256=lkW1kDJzU8iOINp_tKEL5rG9DM5icvEkyYQUhGrW_hU,1088
11
11
  aa_intel_tool/urls.py,sha256=cncBfnPbJErN9w0qM83ZmtlnMJEolDHLQllU8bvxUa0,720
12
12
  aa_intel_tool/helper/data_structure.py,sha256=ajH_hDWR5TV22gF0AMIZsu1PcY73OzPdOHx1d_D0GsM,302
13
13
  aa_intel_tool/helper/eve_character.py,sha256=dJ-7D-qhibX9fNJ6pQO1qDerYrWJPstGh2V1UiEgTIQ,4859
14
- aa_intel_tool/helper/static_files.py,sha256=QgM9Y-wyR8Ansq5alZRIeWNr3-DjAq_yEz50Dc0D1ZA,1070
15
- aa_intel_tool/locale/django.pot,sha256=VCANZ44gNkRMJMQ-v-1_YtH-yDxbrHUotUd4g6rjjgU,13199
14
+ aa_intel_tool/locale/django.pot,sha256=RJpR8n5Wfpgwv1mtY70SIl-x91eIaWe7U_4rcaUk9Lk,13213
16
15
  aa_intel_tool/locale/cs_CZ/LC_MESSAGES/django.mo,sha256=CHgMtrHlb-VEo5fUh2G3IrCNxoIScE-LzX6xjz1YkRc,864
17
- aa_intel_tool/locale/cs_CZ/LC_MESSAGES/django.po,sha256=ML894Drf7Be97Bzg4QqTFddMurJN3WtadKLY6LiFPts,13560
18
- aa_intel_tool/locale/de/LC_MESSAGES/django.mo,sha256=e8PF0Qu91Fv2uM3y6nkgsFWmOS0z0eJO-lT5_h9fFAM,7729
19
- aa_intel_tool/locale/de/LC_MESSAGES/django.po,sha256=8qe0IrvTEhW4TdSs4UIkbXTfVAIAT6UB7I5otqZ6thY,17303
16
+ aa_intel_tool/locale/cs_CZ/LC_MESSAGES/django.po,sha256=mfq95fvg9PgYqaJ-Xwr1vRA8-ZdB-WI81Add-nyHtjw,13574
17
+ aa_intel_tool/locale/de/LC_MESSAGES/django.mo,sha256=DeiUuU1VwPN24wNa5Zbs8ljfTXv6R_BkSAGuuGoiAlk,7791
18
+ aa_intel_tool/locale/de/LC_MESSAGES/django.po,sha256=iwb_21JiuxlgzqeZHRe22zk9C_rQ4AE2SW_2Xvpm3UU,17341
20
19
  aa_intel_tool/locale/es/LC_MESSAGES/django.mo,sha256=9vAXi9Jp1IkMbmCJLC-sboBSLAqCOuF-4ZAPUmeLKBI,2041
21
- aa_intel_tool/locale/es/LC_MESSAGES/django.po,sha256=wA1q172QVbrOdOXFO3mZeGiGwC3vEw2kqrGt7IuAtfI,14365
20
+ aa_intel_tool/locale/es/LC_MESSAGES/django.po,sha256=sH-gsjPYBNSfZTXnXsheo9y_e3kZuEw-nT8KlNS95pY,14483
22
21
  aa_intel_tool/locale/fr_FR/LC_MESSAGES/django.mo,sha256=rTwIqSaNYKhOl2fiM-vLkVlGNtATGJS-nHwZ523I_0o,6620
23
- aa_intel_tool/locale/fr_FR/LC_MESSAGES/django.po,sha256=ilkl_MtL2Q7hStuTYqef9eJcIlvCLjPccmX9IUgiPC4,17608
22
+ aa_intel_tool/locale/fr_FR/LC_MESSAGES/django.po,sha256=RUro67joVWEReeVydn6vV-EBNUowWhl6OOQLyorxFno,17622
24
23
  aa_intel_tool/locale/it_IT/LC_MESSAGES/django.mo,sha256=dqJTO-ELuQ2KgN37kNG65LG7jjb4IhNkU2Tq1C4vswg,483
25
- aa_intel_tool/locale/it_IT/LC_MESSAGES/django.po,sha256=Tfev67EmcmdsabExncJiHEWiC5KeXe0MRRewTQ1wjYg,13249
24
+ aa_intel_tool/locale/it_IT/LC_MESSAGES/django.po,sha256=mZkTt-uN_gDjWtLLHHRGlqzP8ZPvMKz8i3sZw9hzQow,13263
26
25
  aa_intel_tool/locale/ja/LC_MESSAGES/django.mo,sha256=QLIDRjta7RnIlXK5syiiuByJvHt3VDAW8ulGuV3oUmA,1183
27
- aa_intel_tool/locale/ja/LC_MESSAGES/django.po,sha256=S3ktUX5bkq9pOAVpbY5h4GK-h7Pi8xxjc8yEkYX-lTY,13522
26
+ aa_intel_tool/locale/ja/LC_MESSAGES/django.po,sha256=ldKLxerf5uGyQZkVhYOW_AEApN5IwKvbOsQ1ZineQ7g,13642
28
27
  aa_intel_tool/locale/ko_KR/LC_MESSAGES/django.mo,sha256=2aMqsSR_qUV9PzMoBBrcfyQxyg3fLte-9zinJftQ4BQ,7525
29
- aa_intel_tool/locale/ko_KR/LC_MESSAGES/django.po,sha256=MgWmgKkFWpGL7ANfoofDdNvRIIE603tAVv8ySKdZnNc,17687
28
+ aa_intel_tool/locale/ko_KR/LC_MESSAGES/django.po,sha256=kTLLGMVvSDjwP2YU1wA28RuOZTgqS601dQAsEU1QJRI,17797
30
29
  aa_intel_tool/locale/nl_NL/LC_MESSAGES/django.mo,sha256=K0pyH0sermqDXN9hnCQUDHcst_CewisXZp_Q0_3y-k4,479
31
- aa_intel_tool/locale/nl_NL/LC_MESSAGES/django.po,sha256=fHZs-BlEHLwlbsrm8jjzy7l6B2Ona3mIuW37cL4Fag4,13247
30
+ aa_intel_tool/locale/nl_NL/LC_MESSAGES/django.po,sha256=B0_IICXGRVoeMGX5oohfGb4vZh0jNfQjFxcd9G5Z6Tg,13261
32
31
  aa_intel_tool/locale/pl_PL/LC_MESSAGES/django.mo,sha256=pviaTemIpmyQrIz-vEadYrZgOgntLAb5QtEkupkf35k,926
33
- aa_intel_tool/locale/pl_PL/LC_MESSAGES/django.po,sha256=JfPYQEXLPLINIGIx7xHFLpxbCMNdffItWPC6ooKV9BY,13509
32
+ aa_intel_tool/locale/pl_PL/LC_MESSAGES/django.po,sha256=-4FKGIrBpUVSNeDl01GG9plDNmIaUvXmn1pFX8Tj3Vc,13523
34
33
  aa_intel_tool/locale/ru/LC_MESSAGES/django.mo,sha256=cCSOc2yqFfkri0YWXGCNfUGqaneRqzPcP-bZtWxXm9c,10447
35
- aa_intel_tool/locale/ru/LC_MESSAGES/django.po,sha256=V2noJKgJ0NLn0JV2MfP-9HyLo_unjjJUBOF2WjlvF0c,20512
34
+ aa_intel_tool/locale/ru/LC_MESSAGES/django.po,sha256=ciwJUnW2Ler4w1Z7lQNB9TqD4NE-5dpHB4PRocqbPjM,20642
36
35
  aa_intel_tool/locale/sk/LC_MESSAGES/django.mo,sha256=ag8xFgumlPADbLURJ5FQ4EARs6lIPpB4ulbuizC8J0I,558
37
- aa_intel_tool/locale/sk/LC_MESSAGES/django.po,sha256=FdTURgmv4jvr2x0HCioq23vmlCFoRrzc-uJuP70bgYk,13400
38
- aa_intel_tool/locale/uk/LC_MESSAGES/django.mo,sha256=wqf9vgCMQhN9gAvJQmPSJy7YrjMueQrFZC4Stg5NpIE,10082
39
- aa_intel_tool/locale/uk/LC_MESSAGES/django.po,sha256=YeIU5h8FCSIBeUZL043a-tZfLJcTBSKQpW19p6F3WcQ,19820
36
+ aa_intel_tool/locale/sk/LC_MESSAGES/django.po,sha256=rupXMY46dmr53jBOJB9OI29txE3cYxXrGzjK863b0zA,13414
37
+ aa_intel_tool/locale/uk/LC_MESSAGES/django.mo,sha256=4ic5BKe-5veUvaDL8RvZL5t7_vz6K662aVIeE1SbIUg,10180
38
+ aa_intel_tool/locale/uk/LC_MESSAGES/django.po,sha256=a-jUkoT2ZqVQ4ibG_hOz3IXRyyMgmR1v3nC1Z8OF2Jk,19797
40
39
  aa_intel_tool/locale/zh_Hans/LC_MESSAGES/django.mo,sha256=H8cexShbockghFW27eCu9W5npytYa0k36woJeQ8wiGc,2444
41
- aa_intel_tool/locale/zh_Hans/LC_MESSAGES/django.po,sha256=Gk3rSqFlNsIhqPO8LYMl7IgkdE6kAkAVdAJSZWD-uJw,14095
40
+ aa_intel_tool/locale/zh_Hans/LC_MESSAGES/django.po,sha256=OUv0Yc58nhdq9b3sYvm1J324Esc3S659n_I5R5EztQM,14209
42
41
  aa_intel_tool/management/commands/aa_intel_tool_load_eve_types.py,sha256=rojHdwLg57a3darJif8uFwGxxiBQeFIOGRdr6qI0c5g,1796
43
42
  aa_intel_tool/migrations/0001_initial.py,sha256=nwtThaFJ7wrOZld0MzQ-MLpHB9xG-SJOZPl8FbM8dFE,4339
44
43
  aa_intel_tool/migrations/0002_alter_scan_raw_data.py,sha256=LDXPIxhCJ3QToQqmdyZubNEgiuGPsZZTBGKTOyApULw,405
45
44
  aa_intel_tool/migrations/__init__.py,sha256=DlW5327gBRgSG2GG_T0E1NcpiTFtYs0Vty1fzj4eiPY,34
46
45
  aa_intel_tool/parser/__init__.py,sha256=BAFdCEaeC0cmv74ZuZGZJCgJOiliMVBpgdQI63ABJ2U,30
47
- aa_intel_tool/parser/general.py,sha256=RgIyRntC8-bQvFpwy7OGqCqyMMVQ0F5-JtI-l9RSB_c,1805
46
+ aa_intel_tool/parser/general.py,sha256=dZ5XvSCVqy1WEaxzENBMtR9Ium00xYH5slkogQ65p3U,1845
48
47
  aa_intel_tool/parser/helper/db.py,sha256=SlIfxgtJ-JGXcCDaV73LY5hIpcShgQ_8RbMbiHiVXFQ,819
49
- aa_intel_tool/parser/module/chatlist.py,sha256=LAQvjkWlhaluvwTlkQC1cbqK6ioPSjoN0PIQSYlFnRc,9444
50
- aa_intel_tool/parser/module/dscan.py,sha256=4I4IGt1ArWvmjVduzayi5QPIvGuwYzRZ46VmypEkCHI,11336
51
- aa_intel_tool/parser/module/fleetcomp.py,sha256=O4kmSaNpd-5xGFfWgfeJanlAE3dxF3tZkkV_KFLy4V8,6382
48
+ aa_intel_tool/parser/module/chatlist.py,sha256=SAzxj-uyDOz5iGT-gtwHL92fe9JMbED-SWwNPO-U3Tw,9505
49
+ aa_intel_tool/parser/module/dscan.py,sha256=M004S2XM09DikC8lx5NR9L-VSAXip5OknksbTfmoRt8,11341
50
+ aa_intel_tool/parser/module/fleetcomp.py,sha256=UeHhANZztGe3frvGD40oaIKXfzHkR8OvkArtJUGGQ1w,6387
52
51
  aa_intel_tool/scripts/drop_tables.sql,sha256=fJa_scRF95SxCmaMqFGzL4HhUwk5GN5cLexEbS_qwgw,192
53
52
  aa_intel_tool/static/aa_intel_tool/css/aa-intel-tool.css,sha256=KEG4Af6yjLpE6gp5dK1LiTq2l9WELvWRPy6hb9oiGzg,3165
54
53
  aa_intel_tool/static/aa_intel_tool/css/aa-intel-tool.min.css,sha256=vrBBqG1hPUqEDh-WxtCoH3bE5JzNNjB9Zzma5TIMfRg,2135
@@ -78,15 +77,15 @@ aa_intel_tool/static/aa_intel_tool/javascript/aa-intel-tool.js,sha256=pTWjL2naLg
78
77
  aa_intel_tool/static/aa_intel_tool/javascript/aa-intel-tool.min.js,sha256=_8B8T_Ec-tFmcdXaiPOSIgFl183ohz1u9SN9s9213AA,813
79
78
  aa_intel_tool/static/aa_intel_tool/javascript/aa-intel-tool.min.js.map,sha256=6s-ynI-maKOt08BZjqb3r-a1xRPD7E36ECJ8Kpb4NHs,1062
80
79
  aa_intel_tool/templates/aa_intel_tool/base.html,sha256=Egzwy0TQha4fnakS7D9IJvweErinmvp2SlWLtN9Eak4,2289
81
- aa_intel_tool/templates/aa_intel_tool/bundles/aa-intel-tool-chatscan-highlight-js.html,sha256=JngEbZl9VTTz_O3l-EfTV--ZrVNXtlUBekVdhfohk4Y,106
82
- aa_intel_tool/templates/aa_intel_tool/bundles/aa-intel-tool-chatscan-js.html,sha256=xBxaOlHOmefupGsUOR_hHLI77W_vpDYwRto8DlixCVU,310
83
- aa_intel_tool/templates/aa_intel_tool/bundles/aa-intel-tool-css.html,sha256=zQshuYs8YZK5DP7jCzOVVzS6ZnWRmRQAv7WV3kxj7ag,81
84
- aa_intel_tool/templates/aa_intel_tool/bundles/aa-intel-tool-dscan-highlight-js.html,sha256=Fz2mGQFX0U-IYl4qsRAeat79siukEqKqj3W7l3OrFLI,103
85
- aa_intel_tool/templates/aa_intel_tool/bundles/aa-intel-tool-dscan-js.html,sha256=nd6Yf9l_xqhX3QEaPURKdul0ebtxBJIR95kvJ3_FFNs,249
86
- aa_intel_tool/templates/aa_intel_tool/bundles/aa-intel-tool-fleetcomp-js.html,sha256=MF28NdXsEA-5qFAHyEr5abODRfUsnlfQofCQOyMSZoc,559
87
- aa_intel_tool/templates/aa_intel_tool/bundles/aa-intel-tool-fleetcomposition-highlight-js.html,sha256=E_GHNcpKE_PhZ0VyePbIr_Vu7HqnUWjKsPwKn3J9FJI,114
88
- aa_intel_tool/templates/aa_intel_tool/bundles/aa-intel-tool-js.html,sha256=mNIDCO9aOCY3OmO79itoKk5wIu8TpyBXKMJoTm1H9eY,87
89
- aa_intel_tool/templates/aa_intel_tool/bundles/aa-intel-tool-scan-result-common-js.html,sha256=P0iyNeVP-DtKJbcpQA_ZqvYm1H0V2HdjNG7lDdtxrUI,106
80
+ aa_intel_tool/templates/aa_intel_tool/bundles/aa-intel-tool-chatscan-highlight-js.html,sha256=FymtpCad7ZM1WhcS1aaH0We77e-Ehm1W2nglER9QU8M,100
81
+ aa_intel_tool/templates/aa_intel_tool/bundles/aa-intel-tool-chatscan-js.html,sha256=Vv0KQQYf-mvLibRutFv7tx5weHds25vRCLzIMh4mIIs,304
82
+ aa_intel_tool/templates/aa_intel_tool/bundles/aa-intel-tool-css.html,sha256=Z5nNHC8E3Vwtq7vxLWnK1kSpXql05jJ5uksZ07iBGXU,75
83
+ aa_intel_tool/templates/aa_intel_tool/bundles/aa-intel-tool-dscan-highlight-js.html,sha256=nI2DZybWN9X_I_lDh5258S9K2ttzSIwGCO9QInYO9fg,97
84
+ aa_intel_tool/templates/aa_intel_tool/bundles/aa-intel-tool-dscan-js.html,sha256=DLCqnEEk446xcfaB-CKiaGVzQWdeowzcMGLDoPxLox8,243
85
+ aa_intel_tool/templates/aa_intel_tool/bundles/aa-intel-tool-fleetcomp-js.html,sha256=Ga30ClivqbCDfNA9ONoQPnx1eilNFSBkmNwvujbgBFI,553
86
+ aa_intel_tool/templates/aa_intel_tool/bundles/aa-intel-tool-fleetcomposition-highlight-js.html,sha256=tUmbWJXag90WJ_odqadDghyj8ALLhYMVYQGtaiKluhQ,108
87
+ aa_intel_tool/templates/aa_intel_tool/bundles/aa-intel-tool-js.html,sha256=vfdjUg4STErVLnhk3Sp1sODAep9hfLTblUV2RxQ-6EY,81
88
+ aa_intel_tool/templates/aa_intel_tool/bundles/aa-intel-tool-scan-result-common-js.html,sha256=HcXZDDTKFs7mQ0eSBY58ZkOk3pkQ-gNhIkNPwnvtGjA,100
90
89
  aa_intel_tool/templates/aa_intel_tool/partials/body/scan-retention-note.html,sha256=rf1A4UuYoGWaWlB_tqNgCuxihmjC8f9vOhAVvDkfoa8,386
91
90
  aa_intel_tool/templates/aa_intel_tool/partials/footer/app-translation-footer.html,sha256=nDZPOnsQLBN9meAhxnhd0ynUQIVi3YPzhi47n89zcIg,422
92
91
  aa_intel_tool/templates/aa_intel_tool/partials/index/form.html,sha256=EBt4fejLwk5xN9qm9BA3T6cWYtmcDeXnrGFD9rWT3X4,3114
@@ -104,24 +103,21 @@ aa_intel_tool/templates/aa_intel_tool/partials/scan/dscan/ships-breakdown/ship-t
104
103
  aa_intel_tool/templates/aa_intel_tool/partials/scan/fleetcomp/fleet-details.html,sha256=7o0IxbAoOfNA_IsqsiStjNBE6veq0TYL82Jt3eOVc80,1044
105
104
  aa_intel_tool/templates/aa_intel_tool/partials/scan/fleetcomp/participation.html,sha256=pZVAwOhp6e74lZtk4357YIbiiW2lqzvAZDZwlAjQu-A,678
106
105
  aa_intel_tool/templates/aa_intel_tool/partials/scan/fleetcomp/fleet-details/pilots.html,sha256=6vAGVjfMTckWnT_GztyUrsoI8gt28Ol52QD2kQHTd3Y,1653
107
- aa_intel_tool/templates/aa_intel_tool/views/index.html,sha256=E9uKNF5GC8iI08kS7mBjVmu4y8IrHjZspK1VtZ_dO5A,736
106
+ aa_intel_tool/templates/aa_intel_tool/views/index.html,sha256=VoeKZahgcXHD3kXDLkymbZnNHOHE4mcUQHVf1UrJjf8,485
108
107
  aa_intel_tool/templates/aa_intel_tool/views/scan/chatlist.html,sha256=t-YpvHlzM3Efok8d8ZNEgvwwxx1i_mnNy3zPY888KXE,1700
109
108
  aa_intel_tool/templates/aa_intel_tool/views/scan/dscan.html,sha256=G4vASN4GbWPuwAgMA9AX2LeNDfwrPGDuHRN9uZcVHo0,2177
110
109
  aa_intel_tool/templates/aa_intel_tool/views/scan/fleetcomp.html,sha256=cnQ4-XJJEonIJ-s-LnV_Ah-ug0opqDi38mm-801KZc8,2010
111
- aa_intel_tool/templatetags/__init__.py,sha256=sP2D1ovt2gGAPLcGQkByRgXYhvUJ6C52mZMlLIALQ8s,37
112
- aa_intel_tool/templatetags/aa_intel_tool.py,sha256=KRSpyEiP2-lJtp6Y5fHDDL-QSbew2kjvHSPxbm4kaoo,2747
113
110
  aa_intel_tool/tests/__init__.py,sha256=NLuMBNDHYOXDmPgpyG-g_kDaATVQWv1iC-dJ8BA1kZc,29
114
- aa_intel_tool/tests/test_access.py,sha256=_T1-SskmhrkC141lU_LvmUigeG3mPpYTabA9Q03rLIo,2747
111
+ aa_intel_tool/tests/test_access.py,sha256=YqfyrsG0Y_AOf-yGg1HrgOZSnpf4h5TWQSt4qo36kHw,2599
115
112
  aa_intel_tool/tests/test_admin.py,sha256=p4o-1M9AUn9mnBgMO9FweiTk_yPipx3mfGTI6DP3bjw,2485
116
113
  aa_intel_tool/tests/test_app_settings.py,sha256=GaGxZmIsTB790JdzLCapLPXjRGQCYrOp8jrIsNReahw,3235
117
- aa_intel_tool/tests/test_auth_hooks.py,sha256=Xikx6HYWgSarLiHVxnQmRpFBQNt-xfYgb53CjGvvJcY,2451
114
+ aa_intel_tool/tests/test_auth_hooks.py,sha256=6WkKpSC5P1gXDn-86fLVWL8kE27g7hW866DmPhIlwu4,2303
118
115
  aa_intel_tool/tests/test_helper_data_structures.py,sha256=1zRuh54-6YtDt7M1w7JpBRHlvS2rgBdnzvWLXV9Kl3s,765
119
116
  aa_intel_tool/tests/test_helper_eve_character.py,sha256=Vsy6jEI4yJ2h5rxBFdk64MJc5QZioCdTUhMv1o-TOkk,12330
120
117
  aa_intel_tool/tests/test_models.py,sha256=QPmzint8djEFj6PfEM3AfuT1cqIrDehCUsorAqNoCy0,5804
121
118
  aa_intel_tool/tests/test_parser_general.py,sha256=RL6fmuhZsudHZ9Zvrq5IThoovFrtfgsXPu8eQwkuTsM,25013
122
119
  aa_intel_tool/tests/test_parser_helper_db.py,sha256=f8qqPKUxG39X77iEICh_P1UmXDbHPnJc_tXe3FuxGYs,1642
123
120
  aa_intel_tool/tests/test_parser_module_chatlist.py,sha256=QTpoWUddqh4Mus-Yezh7Y8wu9gfHjcxulFbRNP1dRpo,4583
124
- aa_intel_tool/tests/test_templatetags.py,sha256=NdFCLy4KDoE-_WheZ0a36LGdzVvkPXCXZe-zP_i-j5k,3306
125
121
  aa_intel_tool/tests/utils.py,sha256=rRKeEZ2GkuoFJb7WoTgOOaXhlNwyb0xH3-5WRbWITBs,1435
126
122
  aa_intel_tool/tests/test-data/chatscan-faulty.txt,sha256=E1kv5BaZGagLP9VTaac8sVt0PMUMNpyMMqkx3dCZ8cg,40
127
123
  aa_intel_tool/tests/test-data/chatscan.txt,sha256=QkZER0l6-iw7uwTiDIpp2PUQ4NecaHWX83rZSrLp_LI,40
@@ -132,7 +128,7 @@ aa_intel_tool/tests/test-data/fleetcomp.txt,sha256=BYqCJznI3e6jlHTQwmr08wZr2D_an
132
128
  aa_intel_tool/views/__init__.py,sha256=zf5e30BdJ772oDJkQnBfFIi5a7-HEJByUIkv0iz3Kr8,29
133
129
  aa_intel_tool/views/ajax.py,sha256=7xBsd0Eg6enDl7JeI9vNJXaF66lWjhStLfYdJGAobvM,911
134
130
  aa_intel_tool/views/general.py,sha256=c2xD--Kkc9IfJg2x7VALPMhvwbssIY0qsbdFqfJEh-s,4040
135
- aa_intel_tool-2.6.3.dist-info/METADATA,sha256=B8Tg9m8YrqG3FIbX1FMLkZDcCy268dBIXBE-VcCHVys,55082
136
- aa_intel_tool-2.6.3.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
137
- aa_intel_tool-2.6.3.dist-info/licenses/LICENSE,sha256=UTib95uJWe2NQIG3TzU8-Hm-eaEZFqv9fqsjNT_xKWU,35151
138
- aa_intel_tool-2.6.3.dist-info/RECORD,,
131
+ aa_intel_tool-2.7.1.dist-info/METADATA,sha256=2h2UCT6b2B2je-vm9FeT_QIk71ev9VnxHJUKUDnD_Lg,55082
132
+ aa_intel_tool-2.7.1.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
133
+ aa_intel_tool-2.7.1.dist-info/licenses/LICENSE,sha256=UTib95uJWe2NQIG3TzU8-Hm-eaEZFqv9fqsjNT_xKWU,35151
134
+ aa_intel_tool-2.7.1.dist-info/RECORD,,
@@ -1,42 +0,0 @@
1
- """
2
- Helper functions for static integrity calculations
3
- """
4
-
5
- # Standard Library
6
- import os
7
- from pathlib import Path
8
-
9
- # Third Party
10
- from sri import Algorithm, calculate_integrity
11
-
12
- # Alliance Auth
13
- from allianceauth.services.hooks import get_extension_logger
14
-
15
- # Alliance Auth (External Libs)
16
- from app_utils.logging import LoggerAddTag
17
-
18
- # AA Intel Tool
19
- from aa_intel_tool import __title__
20
- from aa_intel_tool.constants import APP_STATIC_DIR
21
-
22
- logger = LoggerAddTag(my_logger=get_extension_logger(__name__), prefix=__title__)
23
-
24
-
25
- def calculate_integrity_hash(relative_file_path: str) -> str:
26
- """
27
- Calculates the integrity hash for a given static file
28
-
29
- :param self:
30
- :type self:
31
- :param relative_file_path: The file path relative to the `{APP_NAME}/{PACKAGE_NAME}/static/{PACKAGE_NAME}` folder
32
- :type relative_file_path: str
33
- :return: The integrity hash
34
- :rtype: str
35
- """
36
-
37
- integrity_hash = calculate_integrity(
38
- path=Path(os.path.join(APP_STATIC_DIR, relative_file_path)),
39
- algorithm=Algorithm.SHA512,
40
- )
41
-
42
- return integrity_hash
@@ -1,3 +0,0 @@
1
- """
2
- Initialize the template tags
3
- """
@@ -1,88 +0,0 @@
1
- """
2
- Versioned static URLs to break browser caches when changing the app version
3
- """
4
-
5
- # Standard Library
6
- import os
7
-
8
- # Django
9
- from django.template.defaulttags import register
10
- from django.templatetags.static import static
11
- from django.utils.safestring import mark_safe
12
-
13
- # Alliance Auth
14
- from allianceauth.services.hooks import get_extension_logger
15
-
16
- # Alliance Auth (External Libs)
17
- from app_utils.logging import LoggerAddTag
18
-
19
- # AA Intel Tool
20
- from aa_intel_tool import __title__, __version__
21
- from aa_intel_tool.app_settings import debug_enabled
22
- from aa_intel_tool.constants import PACKAGE_NAME
23
- from aa_intel_tool.helper.static_files import calculate_integrity_hash
24
-
25
- logger = LoggerAddTag(my_logger=get_extension_logger(__name__), prefix=__title__)
26
-
27
-
28
- @register.simple_tag
29
- def aa_intel_tool_static(
30
- relative_file_path: str, script_type: str = None
31
- ) -> str | None:
32
- """
33
- Versioned static URL
34
-
35
- :param relative_file_path: The file path relative to the `{APP_NAME}/{PACKAGE_NAME}/static/{PACKAGE_NAME}` folder
36
- :type relative_file_path: str
37
- :param script_type: The script type
38
- :type script_type: str
39
- :return: Versioned static URL
40
- :rtype: str
41
- """
42
-
43
- logger.debug(f"Getting versioned static URL for: {relative_file_path}")
44
-
45
- file_type = os.path.splitext(relative_file_path)[1][1:]
46
-
47
- logger.debug(f"File extension: {file_type}")
48
-
49
- # Only support CSS and JS files
50
- if file_type not in ["css", "js"]:
51
- raise ValueError(f"Unsupported file type: {file_type}")
52
-
53
- static_file_path = os.path.join(PACKAGE_NAME, relative_file_path)
54
- static_url = static(static_file_path)
55
-
56
- # Integrity hash calculation only for non-debug mode
57
- sri_string = (
58
- f' integrity="{calculate_integrity_hash(relative_file_path)}" crossorigin="anonymous"'
59
- if not debug_enabled()
60
- else ""
61
- )
62
-
63
- # Versioned URL for CSS and JS files
64
- # Add version query parameter to break browser caches when changing the app version
65
- # Do not add version query parameter for libs as they are already versioned through their file path
66
- versioned_url = (
67
- static_url
68
- if relative_file_path.startswith("libs/")
69
- else static_url + "?v=" + __version__
70
- )
71
-
72
- return_value = None
73
-
74
- # Return the versioned URL with integrity hash for CSS
75
- if file_type == "css":
76
- return_value = mark_safe(
77
- f'<link rel="stylesheet" href="{versioned_url}"{sri_string}>'
78
- )
79
-
80
- # Return the versioned URL with integrity hash for JS files
81
- if file_type == "js":
82
- js_type = f' type="{script_type}"' if script_type else ""
83
-
84
- return_value = mark_safe(
85
- f'<script{js_type} src="{versioned_url}"{sri_string}></script>'
86
- )
87
-
88
- return return_value