aa-intel-tool 0.0.1a8__tar.gz → 0.0.1a10__tar.gz

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 (105) hide show
  1. {aa_intel_tool-0.0.1a8 → aa_intel_tool-0.0.1a10}/PKG-INFO +13 -11
  2. {aa_intel_tool-0.0.1a8 → aa_intel_tool-0.0.1a10}/README.md +9 -7
  3. {aa_intel_tool-0.0.1a8 → aa_intel_tool-0.0.1a10}/aa_intel_tool/app_settings.py +7 -0
  4. aa_intel_tool-0.0.1a10/aa_intel_tool/constants.py +79 -0
  5. aa_intel_tool-0.0.1a10/aa_intel_tool/helper/data_structure.py +22 -0
  6. aa_intel_tool-0.0.1a10/aa_intel_tool/locale/es/LC_MESSAGES/django.mo +0 -0
  7. {aa_intel_tool-0.0.1a8 → aa_intel_tool-0.0.1a10}/aa_intel_tool/locale/es/LC_MESSAGES/django.po +19 -17
  8. aa_intel_tool-0.0.1a10/aa_intel_tool/locale/ru/LC_MESSAGES/django.mo +0 -0
  9. {aa_intel_tool-0.0.1a8 → aa_intel_tool-0.0.1a10}/aa_intel_tool/locale/ru/LC_MESSAGES/django.po +22 -20
  10. aa_intel_tool-0.0.1a10/aa_intel_tool/migrations/0006_alter_scandata_unique_together.py +17 -0
  11. {aa_intel_tool-0.0.1a8 → aa_intel_tool-0.0.1a10}/aa_intel_tool/models.py +2 -0
  12. {aa_intel_tool-0.0.1a8 → aa_intel_tool-0.0.1a10}/aa_intel_tool/parser/module/chatlist.py +4 -22
  13. aa_intel_tool-0.0.1a10/aa_intel_tool/parser/module/dscan.py +293 -0
  14. aa_intel_tool-0.0.1a8/aa_intel_tool/static/aa_intel_tool/javascript/aa-intel-tool-highlight.js → aa_intel_tool-0.0.1a10/aa_intel_tool/static/aa_intel_tool/javascript/aa-intel-tool-chatscan-highlight.js +23 -23
  15. aa_intel_tool-0.0.1a10/aa_intel_tool/static/aa_intel_tool/javascript/aa-intel-tool-chatscan-highlight.min.js +1 -0
  16. {aa_intel_tool-0.0.1a8 → aa_intel_tool-0.0.1a10}/aa_intel_tool/static/aa_intel_tool/javascript/aa-intel-tool-chatscan.js +3 -3
  17. {aa_intel_tool-0.0.1a8 → aa_intel_tool-0.0.1a10}/aa_intel_tool/static/aa_intel_tool/javascript/aa-intel-tool-chatscan.min.js +1 -1
  18. {aa_intel_tool-0.0.1a8 → aa_intel_tool-0.0.1a10}/aa_intel_tool/static/aa_intel_tool/javascript/aa-intel-tool-clipboard.js +3 -4
  19. aa_intel_tool-0.0.1a10/aa_intel_tool/static/aa_intel_tool/javascript/aa-intel-tool-clipboard.min.js +1 -0
  20. aa_intel_tool-0.0.1a10/aa_intel_tool/static/aa_intel_tool/javascript/aa-intel-tool-dscan-highlight.js +40 -0
  21. aa_intel_tool-0.0.1a10/aa_intel_tool/static/aa_intel_tool/javascript/aa-intel-tool-dscan-highlight.min.js +1 -0
  22. {aa_intel_tool-0.0.1a8 → aa_intel_tool-0.0.1a10}/aa_intel_tool/static/aa_intel_tool/javascript/aa-intel-tool-dscan.js +43 -45
  23. aa_intel_tool-0.0.1a10/aa_intel_tool/static/aa_intel_tool/javascript/aa-intel-tool-dscan.min.js +1 -0
  24. {aa_intel_tool-0.0.1a8 → aa_intel_tool-0.0.1a10}/aa_intel_tool/templates/aa_intel_tool/bundles/aa-intel-tool-chatscan-js.html +1 -1
  25. {aa_intel_tool-0.0.1a8 → aa_intel_tool-0.0.1a10}/aa_intel_tool/templates/aa_intel_tool/bundles/aa-intel-tool-dscan-js.html +1 -1
  26. aa_intel_tool-0.0.1a10/aa_intel_tool/tests/test-data/dscan-german-client.txt +176 -0
  27. aa_intel_tool-0.0.1a10/aa_intel_tool/tests/test-data/dscan-russian-client.txt +13 -0
  28. {aa_intel_tool-0.0.1a8 → aa_intel_tool-0.0.1a10}/aa_intel_tool/tests/test-data/dscan.txt +1 -1
  29. {aa_intel_tool-0.0.1a8 → aa_intel_tool-0.0.1a10}/aa_intel_tool/tests/test_app_settings.py +27 -0
  30. {aa_intel_tool-0.0.1a8 → aa_intel_tool-0.0.1a10}/aa_intel_tool/tests/test_parser.py +16 -17
  31. {aa_intel_tool-0.0.1a8 → aa_intel_tool-0.0.1a10}/aa_intel_tool/views/ajax.py +4 -9
  32. {aa_intel_tool-0.0.1a8 → aa_intel_tool-0.0.1a10}/pyproject.toml +12 -11
  33. aa_intel_tool-0.0.1a8/aa_intel_tool/constants.py +0 -52
  34. aa_intel_tool-0.0.1a8/aa_intel_tool/parser/module/dscan.py +0 -201
  35. aa_intel_tool-0.0.1a8/aa_intel_tool/static/aa_intel_tool/javascript/aa-intel-tool-clipboard.min.js +0 -1
  36. aa_intel_tool-0.0.1a8/aa_intel_tool/static/aa_intel_tool/javascript/aa-intel-tool-dscan.min.js +0 -1
  37. aa_intel_tool-0.0.1a8/aa_intel_tool/static/aa_intel_tool/javascript/aa-intel-tool-highlight.min.js +0 -1
  38. {aa_intel_tool-0.0.1a8 → aa_intel_tool-0.0.1a10}/.gitignore +0 -0
  39. {aa_intel_tool-0.0.1a8 → aa_intel_tool-0.0.1a10}/LICENSE +0 -0
  40. {aa_intel_tool-0.0.1a8 → aa_intel_tool-0.0.1a10}/aa_intel_tool/__init__.py +0 -0
  41. {aa_intel_tool-0.0.1a8 → aa_intel_tool-0.0.1a10}/aa_intel_tool/admin.py +0 -0
  42. {aa_intel_tool-0.0.1a8 → aa_intel_tool-0.0.1a10}/aa_intel_tool/apps.py +0 -0
  43. {aa_intel_tool-0.0.1a8 → aa_intel_tool-0.0.1a10}/aa_intel_tool/auth_hooks.py +0 -0
  44. {aa_intel_tool-0.0.1a8 → aa_intel_tool-0.0.1a10}/aa_intel_tool/exceptions.py +0 -0
  45. {aa_intel_tool-0.0.1a8 → aa_intel_tool-0.0.1a10}/aa_intel_tool/form.py +0 -0
  46. {aa_intel_tool-0.0.1a8 → aa_intel_tool-0.0.1a10}/aa_intel_tool/helper/eve_character.py +0 -0
  47. {aa_intel_tool-0.0.1a8 → aa_intel_tool-0.0.1a10}/aa_intel_tool/locale/de/LC_MESSAGES/django.mo +0 -0
  48. {aa_intel_tool-0.0.1a8 → aa_intel_tool-0.0.1a10}/aa_intel_tool/locale/de/LC_MESSAGES/django.po +0 -0
  49. {aa_intel_tool-0.0.1a8 → aa_intel_tool-0.0.1a10}/aa_intel_tool/locale/django.pot +0 -0
  50. {aa_intel_tool-0.0.1a8 → aa_intel_tool-0.0.1a10}/aa_intel_tool/locale/fr_FR/LC_MESSAGES/django.po +0 -0
  51. {aa_intel_tool-0.0.1a8 → aa_intel_tool-0.0.1a10}/aa_intel_tool/locale/it_IT/LC_MESSAGES/django.po +0 -0
  52. {aa_intel_tool-0.0.1a8 → aa_intel_tool-0.0.1a10}/aa_intel_tool/locale/ja/LC_MESSAGES/django.po +0 -0
  53. {aa_intel_tool-0.0.1a8 → aa_intel_tool-0.0.1a10}/aa_intel_tool/locale/ko_KR/LC_MESSAGES/django.po +0 -0
  54. {aa_intel_tool-0.0.1a8 → aa_intel_tool-0.0.1a10}/aa_intel_tool/locale/uk/LC_MESSAGES/django.po +0 -0
  55. {aa_intel_tool-0.0.1a8 → aa_intel_tool-0.0.1a10}/aa_intel_tool/locale/zh_Hans/LC_MESSAGES/django.po +0 -0
  56. {aa_intel_tool-0.0.1a8 → aa_intel_tool-0.0.1a10}/aa_intel_tool/management/commands/aa_intel_tool_load_eve_types.py +0 -0
  57. {aa_intel_tool-0.0.1a8 → aa_intel_tool-0.0.1a10}/aa_intel_tool/migrations/0001_initial.py +0 -0
  58. {aa_intel_tool-0.0.1a8 → aa_intel_tool-0.0.1a10}/aa_intel_tool/migrations/0002_remove_scan_processed_data_scandata.py +0 -0
  59. {aa_intel_tool-0.0.1a8 → aa_intel_tool-0.0.1a10}/aa_intel_tool/migrations/0003_alter_scandata_scan.py +0 -0
  60. {aa_intel_tool-0.0.1a8 → aa_intel_tool-0.0.1a10}/aa_intel_tool/migrations/0004_alter_scandata_section.py +0 -0
  61. {aa_intel_tool-0.0.1a8 → aa_intel_tool-0.0.1a10}/aa_intel_tool/migrations/0005_alter_scan_options_alter_scandata_options_and_more.py +0 -0
  62. {aa_intel_tool-0.0.1a8 → aa_intel_tool-0.0.1a10}/aa_intel_tool/migrations/__init__.py +0 -0
  63. {aa_intel_tool-0.0.1a8 → aa_intel_tool-0.0.1a10}/aa_intel_tool/parser/__init__.py +0 -0
  64. {aa_intel_tool-0.0.1a8 → aa_intel_tool-0.0.1a10}/aa_intel_tool/parser/general.py +0 -0
  65. {aa_intel_tool-0.0.1a8 → aa_intel_tool-0.0.1a10}/aa_intel_tool/parser/helper/db.py +0 -0
  66. {aa_intel_tool-0.0.1a8 → aa_intel_tool-0.0.1a10}/aa_intel_tool/parser/module/fleetcomp.py +0 -0
  67. {aa_intel_tool-0.0.1a8 → aa_intel_tool-0.0.1a10}/aa_intel_tool/providers.py +0 -0
  68. {aa_intel_tool-0.0.1a8 → aa_intel_tool-0.0.1a10}/aa_intel_tool/static/aa_intel_tool/css/aa-bootstrap-fix.css +0 -0
  69. {aa_intel_tool-0.0.1a8 → aa_intel_tool-0.0.1a10}/aa_intel_tool/static/aa_intel_tool/css/aa-bootstrap-fix.min.css +0 -0
  70. {aa_intel_tool-0.0.1a8 → aa_intel_tool-0.0.1a10}/aa_intel_tool/static/aa_intel_tool/css/aa-intel-tool.css +0 -0
  71. {aa_intel_tool-0.0.1a8 → aa_intel_tool-0.0.1a10}/aa_intel_tool/static/aa_intel_tool/css/aa-intel-tool.min.css +0 -0
  72. {aa_intel_tool-0.0.1a8 → aa_intel_tool-0.0.1a10}/aa_intel_tool/static/aa_intel_tool/javascript/aa-intel-tool.js +0 -0
  73. {aa_intel_tool-0.0.1a8 → aa_intel_tool-0.0.1a10}/aa_intel_tool/static/aa_intel_tool/javascript/aa-intel-tool.min.js +0 -0
  74. {aa_intel_tool-0.0.1a8 → aa_intel_tool-0.0.1a10}/aa_intel_tool/tasks.py +0 -0
  75. {aa_intel_tool-0.0.1a8 → aa_intel_tool-0.0.1a10}/aa_intel_tool/templates/aa_intel_tool/base.html +0 -0
  76. {aa_intel_tool-0.0.1a8 → aa_intel_tool-0.0.1a10}/aa_intel_tool/templates/aa_intel_tool/bundles/aa-intel-tool-css.html +0 -0
  77. {aa_intel_tool-0.0.1a8 → aa_intel_tool-0.0.1a10}/aa_intel_tool/templates/aa_intel_tool/bundles/aa-intel-tool-js-l10n.html +0 -0
  78. {aa_intel_tool-0.0.1a8 → aa_intel_tool-0.0.1a10}/aa_intel_tool/templates/aa_intel_tool/bundles/aa-intel-tool-js.html +0 -0
  79. {aa_intel_tool-0.0.1a8 → aa_intel_tool-0.0.1a10}/aa_intel_tool/templates/aa_intel_tool/partials/body/scan-retention-note.html +0 -0
  80. {aa_intel_tool-0.0.1a8 → aa_intel_tool-0.0.1a10}/aa_intel_tool/templates/aa_intel_tool/partials/footer/app-translation-footer.html +0 -0
  81. {aa_intel_tool-0.0.1a8 → aa_intel_tool-0.0.1a10}/aa_intel_tool/templates/aa_intel_tool/partials/index/form.html +0 -0
  82. {aa_intel_tool-0.0.1a8 → aa_intel_tool-0.0.1a10}/aa_intel_tool/templates/aa_intel_tool/partials/scan/buttons.html +0 -0
  83. {aa_intel_tool-0.0.1a8 → aa_intel_tool-0.0.1a10}/aa_intel_tool/templates/aa_intel_tool/partials/scan/chatlist/alliances.html +0 -0
  84. {aa_intel_tool-0.0.1a8 → aa_intel_tool-0.0.1a10}/aa_intel_tool/templates/aa_intel_tool/partials/scan/chatlist/corporations.html +0 -0
  85. {aa_intel_tool-0.0.1a8 → aa_intel_tool-0.0.1a10}/aa_intel_tool/templates/aa_intel_tool/partials/scan/chatlist/pilots.html +0 -0
  86. {aa_intel_tool-0.0.1a8 → aa_intel_tool-0.0.1a10}/aa_intel_tool/templates/aa_intel_tool/partials/scan/dscan/ship-classes.html +0 -0
  87. {aa_intel_tool-0.0.1a8 → aa_intel_tool-0.0.1a10}/aa_intel_tool/templates/aa_intel_tool/partials/scan/dscan/ship-types.html +0 -0
  88. {aa_intel_tool-0.0.1a8 → aa_intel_tool-0.0.1a10}/aa_intel_tool/templates/aa_intel_tool/partials/scan/evetime.html +0 -0
  89. {aa_intel_tool-0.0.1a8 → aa_intel_tool-0.0.1a10}/aa_intel_tool/templates/aa_intel_tool/views/index.html +0 -0
  90. {aa_intel_tool-0.0.1a8 → aa_intel_tool-0.0.1a10}/aa_intel_tool/templates/aa_intel_tool/views/scan/chatlist.html +0 -0
  91. {aa_intel_tool-0.0.1a8 → aa_intel_tool-0.0.1a10}/aa_intel_tool/templates/aa_intel_tool/views/scan/dscan.html +0 -0
  92. {aa_intel_tool-0.0.1a8 → aa_intel_tool-0.0.1a10}/aa_intel_tool/templatetags/__init__.py +0 -0
  93. {aa_intel_tool-0.0.1a8 → aa_intel_tool-0.0.1a10}/aa_intel_tool/templatetags/inteltool_versioned_static.py +0 -0
  94. {aa_intel_tool-0.0.1a8 → aa_intel_tool-0.0.1a10}/aa_intel_tool/tests/__init__.py +0 -0
  95. {aa_intel_tool-0.0.1a8 → aa_intel_tool-0.0.1a10}/aa_intel_tool/tests/test-data/chatscan-faulty.txt +0 -0
  96. {aa_intel_tool-0.0.1a8 → aa_intel_tool-0.0.1a10}/aa_intel_tool/tests/test-data/chatscan.txt +0 -0
  97. {aa_intel_tool-0.0.1a8 → aa_intel_tool-0.0.1a10}/aa_intel_tool/tests/test-data/fleetcomp.txt +0 -0
  98. {aa_intel_tool-0.0.1a8 → aa_intel_tool-0.0.1a10}/aa_intel_tool/tests/test_access.py +0 -0
  99. {aa_intel_tool-0.0.1a8 → aa_intel_tool-0.0.1a10}/aa_intel_tool/tests/test_auth_hooks.py +0 -0
  100. {aa_intel_tool-0.0.1a8 → aa_intel_tool-0.0.1a10}/aa_intel_tool/tests/test_models.py +0 -0
  101. {aa_intel_tool-0.0.1a8 → aa_intel_tool-0.0.1a10}/aa_intel_tool/tests/test_templatetags.py +0 -0
  102. {aa_intel_tool-0.0.1a8 → aa_intel_tool-0.0.1a10}/aa_intel_tool/tests/utils.py +0 -0
  103. {aa_intel_tool-0.0.1a8 → aa_intel_tool-0.0.1a10}/aa_intel_tool/urls.py +0 -0
  104. {aa_intel_tool-0.0.1a8 → aa_intel_tool-0.0.1a10}/aa_intel_tool/views/__init__.py +0 -0
  105. {aa_intel_tool-0.0.1a8 → aa_intel_tool-0.0.1a10}/aa_intel_tool/views/general.py +0 -0
@@ -1,11 +1,11 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: aa-intel-tool
3
- Version: 0.0.1a8
3
+ Version: 0.0.1a10
4
4
  Summary: A simple parser for D-Scans and more for Alliance Auth
5
- Project-URL: Homepage, https://github.com/ppfeufer/aa-intel-tool
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
7
+ Project-URL: Homepage, https://github.com/ppfeufer/aa-intel-tool
7
8
  Project-URL: Source, https://github.com/ppfeufer/aa-intel-tool.git
8
- Project-URL: Changelog, https://github.com/ppfeufer/aa-intel-tool/blob/master/CHANGELOG.md
9
9
  Project-URL: Tracker, https://github.com/ppfeufer/aa-intel-tool/issues
10
10
  Author-email: Peter Pfeufer <develop@ppfeufer.de>
11
11
  License-Expression: GPL-3.0
@@ -28,7 +28,7 @@ Classifier: Topic :: Internet :: WWW/HTTP :: Dynamic Content
28
28
  Requires-Python: ~=3.8
29
29
  Requires-Dist: allianceauth-app-utils>=1.19.1
30
30
  Requires-Dist: allianceauth>=3.6.1
31
- Requires-Dist: django-eveuniverse>=1.3.0
31
+ Requires-Dist: django-eveuniverse>=1.3
32
32
  Description-Content-Type: text/markdown
33
33
 
34
34
  # AA Intel Tool
@@ -254,13 +254,15 @@ Restart your Nginx service.
254
254
  To customize the app, the following settings are available and can be made in
255
255
  your `local.py`.
256
256
 
257
- | Name | Description | Default |
258
- |:----------------------------------|:-----------------------------------------------------------------------------------------------------------------|:--------|
259
- | INTELTOOL_ENABLE_MODULE_CHATSCAN | Enable or disable the chat scan module. | False |
260
- | INTELTOOL_ENABLE_MODULE_DSCAN | Enable or disable the d-scan module. | True |
261
- | INTELTOOL_ENABLE_MODULE_FLEETCOMP | Enable or disable the fleet composition module. | True |
262
- | INTELTOOL_SCAN_RETENTION_TIME | Sets the time in days for how long the scans will be kept in the database. Set to 0 to keep scans indefinitely. | 30 |
263
- | INTELTOOL_CHATSCAN_MAX_PILOTS | Sets the limit of pilots for chat scans, since these can take quite a long time to process. Set to 0 to disable. | 500 |
257
+ | Name | Description | Default |
258
+ |:----------------------------------|:-----------------------------------------------------------------------------------------------------------------------------------------|:--------|
259
+ | INTELTOOL_ENABLE_MODULE_CHATSCAN | Enable or disable the chat scan module. | False |
260
+ | INTELTOOL_ENABLE_MODULE_DSCAN | Enable or disable the d-scan module. | True |
261
+ | INTELTOOL_ENABLE_MODULE_FLEETCOMP | Enable or disable the fleet composition module. | True |
262
+ | INTELTOOL_SCAN_RETENTION_TIME | Set the time in days for how long the scans will be kept in the database. Set to 0 to keep scans indefinitely. | 30 |
263
+ | INTELTOOL_CHATSCAN_MAX_PILOTS | Set the limit of pilots for chat scans, since these can take quite a long time to process. Set to 0 to disable. | 500 |
264
+ | INTELTOOL_DSCAN_GRID_SIZE | Set the grid size for D-Scans. This defines <br/>the size of the grid in km in which ships and structures are considered to be "on grid" | 10000 |
265
+
264
266
 
265
267
  > **Note**
266
268
  >
@@ -221,13 +221,15 @@ Restart your Nginx service.
221
221
  To customize the app, the following settings are available and can be made in
222
222
  your `local.py`.
223
223
 
224
- | Name | Description | Default |
225
- |:----------------------------------|:-----------------------------------------------------------------------------------------------------------------|:--------|
226
- | INTELTOOL_ENABLE_MODULE_CHATSCAN | Enable or disable the chat scan module. | False |
227
- | INTELTOOL_ENABLE_MODULE_DSCAN | Enable or disable the d-scan module. | True |
228
- | INTELTOOL_ENABLE_MODULE_FLEETCOMP | Enable or disable the fleet composition module. | True |
229
- | INTELTOOL_SCAN_RETENTION_TIME | Sets the time in days for how long the scans will be kept in the database. Set to 0 to keep scans indefinitely. | 30 |
230
- | INTELTOOL_CHATSCAN_MAX_PILOTS | Sets the limit of pilots for chat scans, since these can take quite a long time to process. Set to 0 to disable. | 500 |
224
+ | Name | Description | Default |
225
+ |:----------------------------------|:-----------------------------------------------------------------------------------------------------------------------------------------|:--------|
226
+ | INTELTOOL_ENABLE_MODULE_CHATSCAN | Enable or disable the chat scan module. | False |
227
+ | INTELTOOL_ENABLE_MODULE_DSCAN | Enable or disable the d-scan module. | True |
228
+ | INTELTOOL_ENABLE_MODULE_FLEETCOMP | Enable or disable the fleet composition module. | True |
229
+ | INTELTOOL_SCAN_RETENTION_TIME | Set the time in days for how long the scans will be kept in the database. Set to 0 to keep scans indefinitely. | 30 |
230
+ | INTELTOOL_CHATSCAN_MAX_PILOTS | Set the limit of pilots for chat scans, since these can take quite a long time to process. Set to 0 to disable. | 500 |
231
+ | INTELTOOL_DSCAN_GRID_SIZE | Set the grid size for D-Scans. This defines <br/>the size of the grid in km in which ships and structures are considered to be "on grid" | 10000 |
232
+
231
233
 
232
234
  > **Note**
233
235
  >
@@ -50,3 +50,10 @@ class AppSettings: # pylint: disable=too-few-public-methods
50
50
  INTELTOOL_CHATSCAN_MAX_PILOTS = clean_setting(
51
51
  name="INTELTOOL_CHATSCAN_MAX_PILOTS", default_value=500, required_type=int
52
52
  )
53
+
54
+ # Set the grid size for D-Scans.
55
+ # This defines the size of teh grid in which ships and
56
+ # structure are considered to be "on grid"
57
+ INTELTOOL_DSCAN_GRID_SIZE = clean_setting(
58
+ name="INTELTOOL_DSCAN_GRID_SIZE", default_value=10000, required_type=int
59
+ )
@@ -0,0 +1,79 @@
1
+ """
2
+ App constants
3
+ """
4
+
5
+ # Standard Library
6
+ import re
7
+
8
+ # Django
9
+ from django.utils.text import slugify
10
+ from django.utils.translation import gettext_lazy as _
11
+
12
+ # AA Intel Tool
13
+ # import aa_intel_tool.parser.module.chatlist
14
+ import aa_intel_tool.parser.module.dscan
15
+ import aa_intel_tool.parser.module.fleetcomp
16
+ from aa_intel_tool import __version__
17
+
18
+ # All internal URLs need to start with this prefix
19
+ INTERNAL_URL_PREFIX = "-"
20
+
21
+
22
+ # Localised units
23
+ distance_units_on_grid: str = """
24
+ km|m # Latin (English, German and so on)
25
+ |км|м # Russian
26
+ """
27
+ distance_units_off_grid: str = """
28
+ AU| # English
29
+ AE| # German
30
+ а.е. # Russian
31
+ """
32
+
33
+ distance_units = f"{distance_units_on_grid}|{distance_units_off_grid}"
34
+
35
+
36
+ # Pre-compiled regex patterns used throughout the app
37
+ REGEX_PATTERN = {
38
+ # "chatlist": re.compile(pattern=r"(?im)^[a-zA-Z0-9\u0080-\uFFFF -_]{3,37}$"),
39
+ "dscan": re.compile(
40
+ pattern=rf"(?im)^(\d+)[\t](.*)[\t](.*)[\t](-|(.*) ({distance_units}))$",
41
+ flags=re.VERBOSE,
42
+ ),
43
+ "fleetcomp": re.compile(
44
+ pattern=r"(?im)^([a-zA-Z0-9 -_]{3,37})[\t](.*)[\t](.*)[\t](.*)[\t](.*)[\t]([0-5] - [0-5] - [0-5])([\t](.*))?$" # pylint: disable=line-too-long
45
+ ),
46
+ "localised_on_grid": re.compile(
47
+ pattern=rf"{distance_units_on_grid}", flags=re.VERBOSE
48
+ ),
49
+ "localised_off_grid": re.compile(
50
+ pattern=rf"{distance_units_off_grid}", flags=re.VERBOSE
51
+ ),
52
+ }
53
+
54
+
55
+ # Supported intel types and their parameters
56
+ SUPPORTED_INTEL_TYPES = {
57
+ # "chatlist": {
58
+ # "name": _("Chat List"),
59
+ # "parser": aa_intel_tool.parser.module.chatlist.parse,
60
+ # "pattern": REGEX_PATTERN["chatlist"],
61
+ # },
62
+ "dscan": {
63
+ "name": _("D-Scan"),
64
+ "parser": aa_intel_tool.parser.module.dscan.parse,
65
+ "pattern": REGEX_PATTERN["dscan"],
66
+ },
67
+ "fleetcomp": {
68
+ "name": _("Fleet Composition"),
69
+ "parser": aa_intel_tool.parser.module.fleetcomp.parse,
70
+ "pattern": REGEX_PATTERN["fleetcomp"],
71
+ },
72
+ }
73
+
74
+
75
+ # Building our user agent for ESI calls
76
+ VERBOSE_NAME = "AA Intel Tool"
77
+ verbose_name_slugified: str = slugify(VERBOSE_NAME, allow_unicode=True)
78
+ github_url: str = "https://github.com/ppfeufer/aa-intel-tool"
79
+ USER_AGENT = f"{verbose_name_slugified} v{__version__} {github_url}"
@@ -0,0 +1,22 @@
1
+ """
2
+ Helper for different data structures
3
+ """
4
+
5
+
6
+ def dict_to_list(input_dict: dict) -> list:
7
+ """
8
+ Cleaning up and sorting a dict and transform it into a list
9
+
10
+ :param input_dict:
11
+ :type input_dict:
12
+ :return:
13
+ :rtype:
14
+ """
15
+
16
+ return [
17
+ data
18
+ for (
19
+ not_used, # pylint: disable=unused-variable
20
+ data,
21
+ ) in sorted(input_dict.items())
22
+ ]
@@ -1,49 +1,49 @@
1
1
  # SOME DESCRIPTIVE TITLE.
2
2
  # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
3
3
  # This file is distributed under the same license as the PACKAGE package.
4
- # FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
5
- #
6
- #, fuzzy
4
+ # Zigor Fernandez Moreno <sietehierros@gmail.com>, 2023.
7
5
  msgid ""
8
6
  msgstr ""
9
7
  "Project-Id-Version: PACKAGE VERSION\n"
10
8
  "Report-Msgid-Bugs-To: \n"
11
9
  "POT-Creation-Date: 2023-08-10 20:47+0200\n"
12
- "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
13
- "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
14
- "Language-Team: LANGUAGE <LL@li.org>\n"
15
- "Language: \n"
10
+ "PO-Revision-Date: 2023-08-15 13:30+0000\n"
11
+ "Last-Translator: Zigor Fernandez Moreno <sietehierros@gmail.com>\n"
12
+ "Language-Team: Spanish <https://weblate.ppfeufer.de/projects/"
13
+ "alliance-auth-apps/aa-intel-tool/es/>\n"
14
+ "Language: es\n"
16
15
  "MIME-Version: 1.0\n"
17
16
  "Content-Type: text/plain; charset=UTF-8\n"
18
17
  "Content-Transfer-Encoding: 8bit\n"
19
- "Plural-Forms: nplurals=2; plural=(n != 1);\n"
18
+ "Plural-Forms: nplurals=2; plural=n != 1;\n"
19
+ "X-Generator: Weblate 4.18.2\n"
20
20
 
21
21
  #. Translators: This is the app name and version, which will appear in the Django Backend
22
22
  #: apps.py:21
23
23
  #, python-brace-format
24
24
  msgid "Intel Tool v{__version__}"
25
- msgstr ""
25
+ msgstr "Herramienta de Intel v{__version__}"
26
26
 
27
27
  #: form.py:20
28
28
  msgid "Paste here …"
29
- msgstr ""
29
+ msgstr "Pegar aquí…"
30
30
 
31
31
  #: models.py:21 models.py:110
32
32
  msgid "Invalid scan data"
33
- msgstr ""
33
+ msgstr "Datos de escaneo no válidos"
34
34
 
35
35
  #: models.py:22 templates/aa_intel_tool/partials/index/form.html:15
36
36
  #: templates/aa_intel_tool/views/scan/dscan.html:12
37
37
  msgid "D-Scan"
38
- msgstr ""
38
+ msgstr "D-Scan"
39
39
 
40
40
  #: models.py:23 templates/aa_intel_tool/partials/index/form.html:31
41
41
  msgid "Fleet Composition"
42
- msgstr ""
42
+ msgstr "Composición de la Flota"
43
43
 
44
44
  #: models.py:24
45
45
  msgid "Chat List"
46
- msgstr ""
46
+ msgstr "Lista de Chat"
47
47
 
48
48
  #: models.py:31
49
49
  msgid "The hash of the scan."
@@ -277,10 +277,12 @@ msgid ""
277
277
  "Do you want to help translate this app into your language or improve the "
278
278
  "existing translation?"
279
279
  msgstr ""
280
+ "¿Quieres ayudar a traducir esta aplicación a tu idioma o mejorar la "
281
+ "traducción existente?"
280
282
 
281
283
  #: templates/aa_intel_tool/partials/footer/app-translation-footer.html:8
282
284
  msgid "Join our team of translators!"
283
- msgstr ""
285
+ msgstr "¡Únete a nuestro equipo de traductores!"
284
286
 
285
287
  #: templates/aa_intel_tool/partials/index/form.html:10
286
288
  msgid "What can I paste?"
@@ -299,7 +301,7 @@ msgstr[1] ""
299
301
 
300
302
  #: templates/aa_intel_tool/partials/index/form.html:46
301
303
  msgid "Submit"
302
- msgstr ""
304
+ msgstr "Enviar"
303
305
 
304
306
  #: templates/aa_intel_tool/partials/index/form.html:52
305
307
  msgid "Working on it, please be patient …"
@@ -355,7 +357,7 @@ msgstr ""
355
357
 
356
358
  #: templates/aa_intel_tool/partials/scan/chatlist/pilots.html:18
357
359
  msgid "Name"
358
- msgstr ""
360
+ msgstr "Nombre"
359
361
 
360
362
  #: templates/aa_intel_tool/partials/scan/chatlist/pilots.html:19
361
363
  msgid "Alliance"
@@ -1,24 +1,24 @@
1
1
  # SOME DESCRIPTIVE TITLE.
2
2
  # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
3
3
  # This file is distributed under the same license as the PACKAGE package.
4
- # FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
5
- #
6
- #, fuzzy
4
+ # Nikolay <nick.postnikov@gmail.com>, 2023.
7
5
  msgid ""
8
6
  msgstr ""
9
7
  "Project-Id-Version: PACKAGE VERSION\n"
10
8
  "Report-Msgid-Bugs-To: \n"
11
9
  "POT-Creation-Date: 2023-08-10 20:47+0200\n"
12
- "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
13
- "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
14
- "Language-Team: LANGUAGE <LL@li.org>\n"
15
- "Language: \n"
10
+ "PO-Revision-Date: 2023-08-13 20:40+0000\n"
11
+ "Last-Translator: Nikolay <nick.postnikov@gmail.com>\n"
12
+ "Language-Team: Russian <https://weblate.ppfeufer.de/projects/"
13
+ "alliance-auth-apps/aa-intel-tool/ru/>\n"
14
+ "Language: ru\n"
16
15
  "MIME-Version: 1.0\n"
17
16
  "Content-Type: text/plain; charset=UTF-8\n"
18
17
  "Content-Transfer-Encoding: 8bit\n"
19
18
  "Plural-Forms: nplurals=4; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && "
20
- "n%10<=4 && (n%100<12 || n%100>14) ? 1 : n%10==0 || (n%10>=5 && n%10<=9) || "
21
- "(n%100>=11 && n%100<=14)? 2 : 3);\n"
19
+ "n%10<=4 && (n%100<12 || n%100>14) ? 1 : n%10==0 || (n%10>=5 && n%10<=9) || ("
20
+ "n%100>=11 && n%100<=14)? 2 : 3);\n"
21
+ "X-Generator: Weblate 4.18.2\n"
22
22
 
23
23
  #. Translators: This is the app name and version, which will appear in the Django Backend
24
24
  #: apps.py:21
@@ -41,7 +41,7 @@ msgstr ""
41
41
 
42
42
  #: models.py:23 templates/aa_intel_tool/partials/index/form.html:31
43
43
  msgid "Fleet Composition"
44
- msgstr ""
44
+ msgstr "Состав флота"
45
45
 
46
46
  #: models.py:24
47
47
  msgid "Chat List"
@@ -241,23 +241,23 @@ msgstr ""
241
241
 
242
242
  #: templates/aa_intel_tool/bundles/aa-intel-tool-js-l10n.html:31
243
243
  msgid "Search …"
244
- msgstr ""
244
+ msgstr "Поиск…"
245
245
 
246
246
  #: templates/aa_intel_tool/bundles/aa-intel-tool-js-l10n.html:33
247
247
  msgid "First"
248
- msgstr ""
248
+ msgstr "Первый"
249
249
 
250
250
  #: templates/aa_intel_tool/bundles/aa-intel-tool-js-l10n.html:34
251
251
  msgid "Last"
252
- msgstr ""
252
+ msgstr "Последний"
253
253
 
254
254
  #: templates/aa_intel_tool/bundles/aa-intel-tool-js-l10n.html:35
255
255
  msgid "Next"
256
- msgstr ""
256
+ msgstr "Следующий"
257
257
 
258
258
  #: templates/aa_intel_tool/bundles/aa-intel-tool-js-l10n.html:36
259
259
  msgid "Previous"
260
- msgstr ""
260
+ msgstr "Предыдущий"
261
261
 
262
262
  #: templates/aa_intel_tool/bundles/aa-intel-tool-js-l10n.html:39
263
263
  msgid ": activate to sort column ascending"
@@ -279,10 +279,12 @@ msgid ""
279
279
  "Do you want to help translate this app into your language or improve the "
280
280
  "existing translation?"
281
281
  msgstr ""
282
+ "Вы хотите помочь перевести это приложение на ваш язык или улучшить текущий "
283
+ "перевод?"
282
284
 
283
285
  #: templates/aa_intel_tool/partials/footer/app-translation-footer.html:8
284
286
  msgid "Join our team of translators!"
285
- msgstr ""
287
+ msgstr "Присоединяйтесь к нашей команде переводчиков!"
286
288
 
287
289
  #: templates/aa_intel_tool/partials/index/form.html:10
288
290
  msgid "What can I paste?"
@@ -301,7 +303,7 @@ msgstr[1] ""
301
303
 
302
304
  #: templates/aa_intel_tool/partials/index/form.html:46
303
305
  msgid "Submit"
304
- msgstr ""
306
+ msgstr "Отправить"
305
307
 
306
308
  #: templates/aa_intel_tool/partials/index/form.html:52
307
309
  msgid "Working on it, please be patient …"
@@ -357,7 +359,7 @@ msgstr ""
357
359
 
358
360
  #: templates/aa_intel_tool/partials/scan/chatlist/pilots.html:18
359
361
  msgid "Name"
360
- msgstr ""
362
+ msgstr "Название"
361
363
 
362
364
  #: templates/aa_intel_tool/partials/scan/chatlist/pilots.html:19
363
365
  msgid "Alliance"
@@ -365,7 +367,7 @@ msgstr ""
365
367
 
366
368
  #: templates/aa_intel_tool/partials/scan/chatlist/pilots.html:20
367
369
  msgid "Corporation"
368
- msgstr ""
370
+ msgstr "Корпорация"
369
371
 
370
372
  #: templates/aa_intel_tool/partials/scan/dscan/ship-classes.html:16
371
373
  msgid "Ship Class"
@@ -377,7 +379,7 @@ msgstr ""
377
379
 
378
380
  #: templates/aa_intel_tool/partials/scan/dscan/ship-types.html:16
379
381
  msgid "Ship Type"
380
- msgstr ""
382
+ msgstr "Тип корабля"
381
383
 
382
384
  #: templates/aa_intel_tool/partials/scan/evetime.html:5
383
385
  msgid "Scan taken at (Eve Time)"
@@ -0,0 +1,17 @@
1
+ # Generated by Django 4.0.10 on 2023-08-22 18:41
2
+
3
+ # Django
4
+ from django.db import migrations
5
+
6
+
7
+ class Migration(migrations.Migration):
8
+ dependencies = [
9
+ ("aa_intel_tool", "0005_alter_scan_options_alter_scandata_options_and_more"),
10
+ ]
11
+
12
+ operations = [
13
+ migrations.AlterUniqueTogether(
14
+ name="scandata",
15
+ unique_together={("scan", "section")},
16
+ ),
17
+ ]
@@ -147,3 +147,5 @@ class ScanData(models.Model):
147
147
  default_permissions = ()
148
148
  verbose_name = _("Scan data")
149
149
  verbose_name_plural = _("Scan data")
150
+
151
+ unique_together = ("scan", "section")
@@ -23,6 +23,7 @@ from eveuniverse.models import EveEntity
23
23
  from aa_intel_tool import __title__
24
24
  from aa_intel_tool.app_settings import AppSettings
25
25
  from aa_intel_tool.exceptions import ParserError
26
+ from aa_intel_tool.helper.data_structure import dict_to_list
26
27
  from aa_intel_tool.helper.eve_character import get_or_create_character
27
28
  from aa_intel_tool.models import Scan, ScanData
28
29
  from aa_intel_tool.parser.helper.db import safe_scan_to_db
@@ -139,25 +140,6 @@ def _parse_character_info(eve_character: EveCharacter) -> dict:
139
140
  }
140
141
 
141
142
 
142
- def _cleanup_entity_data(entity_info: dict) -> list:
143
- """
144
- Cleaning up and sorting the parsed entity data
145
-
146
- :param entity_info:
147
- :type entity_info:
148
- :return:
149
- :rtype:
150
- """
151
-
152
- return [
153
- data
154
- for (
155
- not_used, # pylint: disable=unused-variable
156
- data,
157
- ) in sorted(entity_info.items())
158
- ]
159
-
160
-
161
143
  def _parse_chatscan_data(eve_characters: QuerySet[EveCharacter]) -> dict:
162
144
  """
163
145
  Parse the chat scan data and return character information,
@@ -215,9 +197,9 @@ def _parse_chatscan_data(eve_characters: QuerySet[EveCharacter]) -> dict:
215
197
  ]
216
198
 
217
199
  return {
218
- "pilots": _cleanup_entity_data(entity_info=character_info),
219
- "corporations": _cleanup_entity_data(entity_info=corporation_info),
220
- "alliances": _cleanup_entity_data(entity_info=alliance_info),
200
+ "pilots": dict_to_list(input_dict=character_info),
201
+ "corporations": dict_to_list(input_dict=corporation_info),
202
+ "alliances": dict_to_list(input_dict=alliance_info),
221
203
  }
222
204
 
223
205