mirror of
https://github.com/EDCD/EDMarketConnector.git
synced 2025-04-12 23:37:14 +03:00
Merge branch 'develop' into enhancement/2186/remove-darwin
This commit is contained in:
commit
ccb103242c
2
.github/workflows/windows-build.yml
vendored
2
.github/workflows/windows-build.yml
vendored
@ -155,7 +155,7 @@ jobs:
|
|||||||
run: sha256sum EDMarketConnector_Installer_*.exe EDMarketConnector-release-*.{zip,tar.gz} > ./hashes.sum
|
run: sha256sum EDMarketConnector_Installer_*.exe EDMarketConnector-release-*.{zip,tar.gz} > ./hashes.sum
|
||||||
|
|
||||||
- name: Create Draft Release
|
- name: Create Draft Release
|
||||||
uses: "softprops/action-gh-release@v1"
|
uses: "softprops/action-gh-release@v2"
|
||||||
with:
|
with:
|
||||||
token: "${{secrets.GITHUB_TOKEN}}"
|
token: "${{secrets.GITHUB_TOKEN}}"
|
||||||
draft: true
|
draft: true
|
||||||
|
@ -778,4 +778,7 @@
|
|||||||
"Ships" = "Ships";
|
"Ships" = "Ships";
|
||||||
|
|
||||||
/* update.py: Update Available Text; In files: update.py:229; */
|
/* update.py: Update Available Text; In files: update.py:229; */
|
||||||
"{NEWVER} is available" = "{NEWVER} is available";
|
"{NEWVER} is available" = "{NEWVER} is available";
|
||||||
|
|
||||||
|
/* myNotebook.py: Can't Paste Images or Files in Text; */
|
||||||
|
"Cannot paste non-text content." = "Cannot paste non-text content.";
|
||||||
|
1
build.py
1
build.py
@ -131,7 +131,6 @@ def build() -> None:
|
|||||||
"distutils",
|
"distutils",
|
||||||
"_markerlib",
|
"_markerlib",
|
||||||
"optparse",
|
"optparse",
|
||||||
"PIL",
|
|
||||||
"simplejson",
|
"simplejson",
|
||||||
"unittest",
|
"unittest",
|
||||||
"doctest",
|
"doctest",
|
||||||
|
@ -5,6 +5,8 @@ Copyright (c) EDCD, All Rights Reserved
|
|||||||
Licensed under the GNU General Public License.
|
Licensed under the GNU General Public License.
|
||||||
See LICENSE file.
|
See LICENSE file.
|
||||||
"""
|
"""
|
||||||
|
from __future__ import annotations
|
||||||
|
|
||||||
import os
|
import os
|
||||||
import pathlib
|
import pathlib
|
||||||
import sys
|
import sys
|
||||||
|
@ -54,6 +54,8 @@ if sys.platform == 'win32':
|
|||||||
GetWindowText = ctypes.windll.user32.GetWindowTextW
|
GetWindowText = ctypes.windll.user32.GetWindowTextW
|
||||||
GetWindowText.argtypes = [HWND, LPWSTR, ctypes.c_int]
|
GetWindowText.argtypes = [HWND, LPWSTR, ctypes.c_int]
|
||||||
GetWindowTextLength = ctypes.windll.user32.GetWindowTextLengthW
|
GetWindowTextLength = ctypes.windll.user32.GetWindowTextLengthW
|
||||||
|
GetWindowTextLength.argtypes = [ctypes.wintypes.HWND]
|
||||||
|
GetWindowTextLength.restype = ctypes.c_int
|
||||||
|
|
||||||
GetProcessHandleFromHwnd = ctypes.windll.oleacc.GetProcessHandleFromHwnd
|
GetProcessHandleFromHwnd = ctypes.windll.oleacc.GetProcessHandleFromHwnd
|
||||||
|
|
||||||
|
@ -11,7 +11,12 @@ from __future__ import annotations
|
|||||||
|
|
||||||
import sys
|
import sys
|
||||||
import tkinter as tk
|
import tkinter as tk
|
||||||
from tkinter import ttk
|
from tkinter import ttk, messagebox
|
||||||
|
from typing import TYPE_CHECKING
|
||||||
|
from PIL import ImageGrab
|
||||||
|
|
||||||
|
if TYPE_CHECKING:
|
||||||
|
def _(x: str) -> str: return x
|
||||||
|
|
||||||
if sys.platform == 'win32':
|
if sys.platform == 'win32':
|
||||||
PAGEFG = 'SystemWindowText'
|
PAGEFG = 'SystemWindowText'
|
||||||
|
@ -1889,6 +1889,74 @@ class EDDN:
|
|||||||
|
|
||||||
return None
|
return None
|
||||||
|
|
||||||
|
def export_journal_dockingdenied(
|
||||||
|
self, cmdr: str, is_beta: bool, entry: Mapping[str, Any]
|
||||||
|
) -> str | None:
|
||||||
|
"""
|
||||||
|
Send a DockingDenied to EDDN on the correct schema.
|
||||||
|
|
||||||
|
:param cmdr: the commander under which this upload is made
|
||||||
|
:param is_beta: whether or not we are in beta mode
|
||||||
|
:param entry: the journal entry to send
|
||||||
|
|
||||||
|
Example:
|
||||||
|
{
|
||||||
|
"timestamp":"2022-06-10T10:09:41Z",
|
||||||
|
"event":"DockingDenied",
|
||||||
|
"Reason":"RestrictedAccess",
|
||||||
|
"MarketID":3706117376,
|
||||||
|
"StationName":"V7G-T1G",
|
||||||
|
"StationType":"FleetCarrier"
|
||||||
|
}
|
||||||
|
"""
|
||||||
|
#######################################################################
|
||||||
|
# Elisions
|
||||||
|
#######################################################################
|
||||||
|
# In case Frontier ever add any
|
||||||
|
entry = filter_localised(entry)
|
||||||
|
|
||||||
|
msg = {
|
||||||
|
'$schemaRef': f'https://eddn.edcd.io/schemas/dockingdenied/1{"/test" if is_beta else ""}',
|
||||||
|
'message': entry
|
||||||
|
}
|
||||||
|
|
||||||
|
this.eddn.send_message(cmdr, msg)
|
||||||
|
return None
|
||||||
|
|
||||||
|
def export_journal_dockinggranted(
|
||||||
|
self, cmdr: str, is_beta: bool, entry: Mapping[str, Any]
|
||||||
|
) -> str | None:
|
||||||
|
"""
|
||||||
|
Send a DockingDenied to EDDN on the correct schema.
|
||||||
|
|
||||||
|
:param cmdr: the commander under which this upload is made
|
||||||
|
:param is_beta: whether or not we are in beta mode
|
||||||
|
:param entry: the journal entry to send
|
||||||
|
|
||||||
|
Example:
|
||||||
|
{
|
||||||
|
"timestamp":"2023-10-01T14:56:34Z",
|
||||||
|
"event":"DockingGranted",
|
||||||
|
"LandingPad":41,
|
||||||
|
"MarketID":3227312896,
|
||||||
|
"StationName":"Evans Horizons",
|
||||||
|
"StationType":"Coriolis"
|
||||||
|
}
|
||||||
|
"""
|
||||||
|
#######################################################################
|
||||||
|
# Elisions
|
||||||
|
#######################################################################
|
||||||
|
# In case Frontier ever add any
|
||||||
|
entry = filter_localised(entry)
|
||||||
|
|
||||||
|
msg = {
|
||||||
|
'$schemaRef': f'https://eddn.edcd.io/schemas/dockinggranted/1{"/test" if is_beta else ""}',
|
||||||
|
'message': entry
|
||||||
|
}
|
||||||
|
|
||||||
|
this.eddn.send_message(cmdr, msg)
|
||||||
|
return None
|
||||||
|
|
||||||
def canonicalise(self, item: str) -> str:
|
def canonicalise(self, item: str) -> str:
|
||||||
"""
|
"""
|
||||||
Canonicalise the given commodity name.
|
Canonicalise the given commodity name.
|
||||||
@ -2336,6 +2404,12 @@ def journal_entry( # noqa: C901, CCR001
|
|||||||
if event_name == 'fcmaterials':
|
if event_name == 'fcmaterials':
|
||||||
return this.eddn.export_journal_fcmaterials(cmdr, is_beta, entry)
|
return this.eddn.export_journal_fcmaterials(cmdr, is_beta, entry)
|
||||||
|
|
||||||
|
if event_name == "dockingdenied":
|
||||||
|
return this.eddn.export_journal_dockingdenied(cmdr, is_beta, entry)
|
||||||
|
|
||||||
|
if event_name == "dockinggranted":
|
||||||
|
return this.eddn.export_journal_dockinggranted(cmdr, is_beta, entry)
|
||||||
|
|
||||||
if event_name == 'approachsettlement':
|
if event_name == 'approachsettlement':
|
||||||
# An `ApproachSettlement` can appear *before* `Location` if you
|
# An `ApproachSettlement` can appear *before* `Location` if you
|
||||||
# logged at one. We won't have necessary augmentation data
|
# logged at one. We won't have necessary augmentation data
|
||||||
|
@ -5,7 +5,7 @@ wheel
|
|||||||
# We can't rely on just picking this up from either the base (not venv),
|
# We can't rely on just picking this up from either the base (not venv),
|
||||||
# or venv-init-time version. Specify here so that dependabot will prod us
|
# or venv-init-time version. Specify here so that dependabot will prod us
|
||||||
# about new versions.
|
# about new versions.
|
||||||
setuptools==69.1.1
|
setuptools==69.2.0
|
||||||
|
|
||||||
# Static analysis tools
|
# Static analysis tools
|
||||||
flake8==7.0.0
|
flake8==7.0.0
|
||||||
@ -18,14 +18,14 @@ flake8-noqa==1.4.0
|
|||||||
flake8-polyfill==1.0.2
|
flake8-polyfill==1.0.2
|
||||||
flake8-use-fstring==1.4
|
flake8-use-fstring==1.4
|
||||||
|
|
||||||
mypy==1.8.0
|
mypy==1.9.0
|
||||||
pep8-naming==0.13.3
|
pep8-naming==0.13.3
|
||||||
safety==2.3.5
|
safety==3.0.1
|
||||||
types-requests==2.31.0.20240125
|
types-requests==2.31.0.20240311
|
||||||
types-pkg-resources==0.1.3
|
types-pkg-resources==0.1.3
|
||||||
|
|
||||||
# Code formatting tools
|
# Code formatting tools
|
||||||
autopep8==2.0.4
|
autopep8==2.1.0
|
||||||
|
|
||||||
# Git pre-commit checking
|
# Git pre-commit checking
|
||||||
pre-commit==3.6.2
|
pre-commit==3.6.2
|
||||||
@ -38,9 +38,9 @@ grip==4.6.2
|
|||||||
py2exe==0.13.0.1; sys_platform == 'win32'
|
py2exe==0.13.0.1; sys_platform == 'win32'
|
||||||
|
|
||||||
# Testing
|
# Testing
|
||||||
pytest==8.0.2
|
pytest==8.1.1
|
||||||
pytest-cov==4.1.0 # Pytest code coverage support
|
pytest-cov==4.1.0 # Pytest code coverage support
|
||||||
coverage[toml]==7.4.1 # pytest-cov dep. This is here to ensure that it includes TOML support for pyproject.toml configs
|
coverage[toml]==7.4.4 # pytest-cov dep. This is here to ensure that it includes TOML support for pyproject.toml configs
|
||||||
coverage-conditional-plugin==0.9.0
|
coverage-conditional-plugin==0.9.0
|
||||||
# For manipulating folder permissions and the like.
|
# For manipulating folder permissions and the like.
|
||||||
pywin32==306; sys_platform == 'win32'
|
pywin32==306; sys_platform == 'win32'
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
certifi==2023.11.17
|
certifi==2024.2.2
|
||||||
requests==2.31.0
|
requests==2.31.0
|
||||||
|
pillow==10.2.0
|
||||||
# requests depends on this now ?
|
# requests depends on this now ?
|
||||||
charset-normalizer==2.1.1
|
charset-normalizer==2.1.1
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user