refactor: rename winart/macart to icoart/icnsart for format-oriented naming
This commit is contained in:
1 parent
945d4ec68d
commit
7f3a281891
6 files changed
+26
-26
No files matched your search
@@ -1,13 +1,13 @@
|
||||
from .common import Sink
|
||||
from .tempart_sink import TempArtSink
|
||||
from .fdart_sink import FdArtSink
|
||||
from .winart_sink import WinArtSink
|
||||
from .macart_sink import MacArtSink
|
||||
from .icoart_sink import IcoArtSink
|
||||
from .icnsart_sink import IcnsArtSink
|
||||
|
||||
__all__ = [
|
||||
"Sink",
|
||||
"TempArtSink",
|
||||
"FdArtSink",
|
||||
"WinArtSink",
|
||||
"MacArtSink"
|
||||
"IcoArtSink",
|
||||
"IcnsArtSink"
|
||||
]
|
||||
+5
-5
@@ -8,12 +8,12 @@ from ...logger import HIGHLEVEL_LOGGER as LOGGER
|
||||
|
||||
|
||||
@dataclass(frozen=True)
|
||||
class MacArtSinkHint:
|
||||
class IcnsArtSinkHint:
|
||||
kind: MacCategory
|
||||
name: str
|
||||
|
||||
|
||||
class MacArtSink(Sink):
|
||||
class IcnsArtSink(Sink):
|
||||
__kind: MacCategory
|
||||
__name: str
|
||||
|
||||
@@ -27,12 +27,12 @@ class MacArtSink(Sink):
|
||||
|
||||
def push(self, env: Environment, art: Artifact) -> None:
|
||||
LOGGER.info(
|
||||
'Saving macOS-only artifact with kind "%s" and name "%s".',
|
||||
'Saving macOS ICNS artifact with kind "%s" and name "%s".',
|
||||
self.__kind,
|
||||
self.__name,
|
||||
)
|
||||
check_vart(art)
|
||||
artrdr.render_icns(art, env.mac_output_artifact(self.__kind, self.__name))
|
||||
|
||||
def push_hint(self) -> MacArtSinkHint:
|
||||
return MacArtSinkHint(self.__kind, self.__name)
|
||||
def push_hint(self) -> IcnsArtSinkHint:
|
||||
return IcnsArtSinkHint(self.__kind, self.__name)
|
||||
+5
-5
@@ -8,12 +8,12 @@ from ...logger import HIGHLEVEL_LOGGER as LOGGER
|
||||
|
||||
|
||||
@dataclass(frozen=True)
|
||||
class WinArtSinkHint:
|
||||
class IcoArtSinkHint:
|
||||
kind: WinCategory
|
||||
name: str
|
||||
|
||||
|
||||
class WinArtSink(Sink):
|
||||
class IcoArtSink(Sink):
|
||||
__kind: WinCategory
|
||||
__name: str
|
||||
|
||||
@@ -27,12 +27,12 @@ class WinArtSink(Sink):
|
||||
|
||||
def push(self, env: Environment, art: Artifact) -> None:
|
||||
LOGGER.info(
|
||||
'Saving Windows-only artifact with kind "%s" and name "%s".',
|
||||
'Saving Windows ICO artifact with kind "%s" and name "%s".',
|
||||
self.__kind,
|
||||
self.__name,
|
||||
)
|
||||
check_vart(art)
|
||||
artrdr.render_ico(art, env.win_output_artifact(self.__kind, self.__name))
|
||||
|
||||
def push_hint(self) -> WinArtSinkHint:
|
||||
return WinArtSinkHint(self.__kind, self.__name)
|
||||
def push_hint(self) -> IcoArtSinkHint:
|
||||
return IcoArtSinkHint(self.__kind, self.__name)
|
||||
@@ -5,8 +5,8 @@ from .svg_source import SvgSource
|
||||
from .blender_source import BlenderSource
|
||||
from .tempart_source import TempArtSource
|
||||
from .fdart_source import FdArtSource
|
||||
from .winart_source import WinArtSource
|
||||
from .macart_source import MacArtSource
|
||||
from .icoart_source import IcoArtSource
|
||||
from .icnsart_source import IcnsArtSource
|
||||
|
||||
|
||||
__all__ = [
|
||||
@@ -17,6 +17,6 @@ __all__ = [
|
||||
"BlenderSource",
|
||||
"TempArtSource",
|
||||
"FdArtSource",
|
||||
"WinArtSource",
|
||||
"MacArtSource",
|
||||
"IcoArtSource",
|
||||
"IcnsArtSource",
|
||||
]
|
||||
+4
-4
@@ -1,13 +1,13 @@
|
||||
from .common import Source
|
||||
from ..address import Address, AddressDomain
|
||||
from ..environment import Environment
|
||||
from ..sink.macart_sink import MacArtSink
|
||||
from ..sink.icnsart_sink import IcnsArtSink
|
||||
from ..utils import MacCategory
|
||||
from ...lowlevel import artio
|
||||
from ...logger import HIGHLEVEL_LOGGER as LOGGER
|
||||
|
||||
|
||||
class MacArtSource(Source):
|
||||
class IcnsArtSource(Source):
|
||||
__kind: MacCategory
|
||||
__name: str
|
||||
|
||||
@@ -19,10 +19,10 @@ class MacArtSource(Source):
|
||||
def address(self) -> Address:
|
||||
return Address(AddressDomain.MacOutput, str(self.__kind), self.__name)
|
||||
|
||||
def link_to(self, env: Environment, mac_sink: MacArtSink) -> None:
|
||||
def link_to(self, env: Environment, mac_sink: IcnsArtSink) -> None:
|
||||
sink_hint = mac_sink.push_hint()
|
||||
LOGGER.info(
|
||||
'Duplicating macOS-only artifact from kind "%s" name "%s" to kind "%s" name "%s".',
|
||||
'Duplicating macOS ICNS artifact from kind "%s" name "%s" to kind "%s" name "%s".',
|
||||
self.__kind,
|
||||
self.__name,
|
||||
sink_hint.kind,
|
||||
+4
-4
@@ -1,13 +1,13 @@
|
||||
from .common import Source
|
||||
from ..address import Address, AddressDomain
|
||||
from ..environment import Environment
|
||||
from ..sink.winart_sink import WinArtSink
|
||||
from ..sink.icoart_sink import IcoArtSink
|
||||
from ..utils import WinCategory
|
||||
from ...lowlevel import artio
|
||||
from ...logger import HIGHLEVEL_LOGGER as LOGGER
|
||||
|
||||
|
||||
class WinArtSource(Source):
|
||||
class IcoArtSource(Source):
|
||||
__kind: WinCategory
|
||||
__name: str
|
||||
|
||||
@@ -19,10 +19,10 @@ class WinArtSource(Source):
|
||||
def address(self) -> Address:
|
||||
return Address(AddressDomain.WinOutput, str(self.__kind), self.__name)
|
||||
|
||||
def link_to(self, env: Environment, win_sink: WinArtSink) -> None:
|
||||
def link_to(self, env: Environment, win_sink: IcoArtSink) -> None:
|
||||
sink_hint = win_sink.push_hint()
|
||||
LOGGER.info(
|
||||
'Duplicating Windows-only artifact from kind "%s" name "%s" to kind "%s" name "%s".',
|
||||
'Duplicating Windows ICO artifact from kind "%s" name "%s" to kind "%s" name "%s".',
|
||||
self.__kind,
|
||||
self.__name,
|
||||
sink_hint.kind,
|
||||
Reference in new issue
Block a user