chromatic-python 0.9.1__py3-none-any.whl → 0.9.2__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.
chromatic/__main__.py CHANGED
@@ -581,7 +581,8 @@ def Parser(prog=None):
581
581
 
582
582
 
583
583
  def parse_args(argv=None):
584
- return Parser(os.path.basename((argv or sys.argv)[0])).parse_args(argv)
584
+ argv = argv or sys.argv
585
+ return Parser(os.path.basename(argv[0])).parse_args(argv[1:])
585
586
 
586
587
 
587
588
  def _call_from_ns[R](f: abc.Callable[..., R], /, ns, **kwargs) -> R:
@@ -655,10 +656,11 @@ def handle_image(ns):
655
656
  params = {}
656
657
  if is_anim := arr.ndim == 3:
657
658
  params.update(save_all=True)
659
+ isatty = False
658
660
  if hasattr(ns, "dumpfile"):
659
661
  from .color.core import color_chain
660
662
 
661
- if is_anim and ns.dumpfile.isatty():
663
+ if (isatty := ns.dumpfile.isatty()) and is_anim:
662
664
 
663
665
  def anim_loop(n: int | None, duration: int | float):
664
666
  from time import sleep
@@ -691,6 +693,11 @@ def handle_image(ns):
691
693
  ns.dumpfile.write(f"{cc}\x1b[0m\n".encode())
692
694
  if img is None:
693
695
  return
696
+ if not hasattr(ns, "outfile_callback"):
697
+ show = getattr(ns, "show", None)
698
+ if show is True or not (show is False or isatty):
699
+ return img.show()
700
+ return
694
701
  try:
695
702
  outpath = ns.outfile_callback(ns, img, **params)
696
703
  except Exception as e:
chromatic/_version.py CHANGED
@@ -18,7 +18,7 @@ version_tuple: tuple[int | str, ...]
18
18
  commit_id: str | None
19
19
  __commit_id__: str | None
20
20
 
21
- __version__ = version = '0.9.1'
22
- __version_tuple__ = version_tuple = (0, 9, 1)
21
+ __version__ = version = '0.9.2'
22
+ __version_tuple__ = version_tuple = (0, 9, 2)
23
23
 
24
- __commit_id__ = commit_id = 'g281bef66b'
24
+ __commit_id__ = commit_id = 'gbe4e6a5cd'
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: chromatic-python
3
- Version: 0.9.1
3
+ Version: 0.9.2
4
4
  Summary: ANSI art image processing and colored terminal text
5
5
  Author: crypt0lith
6
6
  License-Expression: MIT
@@ -1,8 +1,8 @@
1
1
  chromatic/__init__.py,sha256=OMvWLvDuaYpXaku9n0yKa0TShBw-nmY_YuC5MsSxyK4,200
2
2
  chromatic/__init__.pyi,sha256=ag2uIy4vaFiWQbfjaGMv00H1txh_XnzqeAfMien7aF8,1666
3
- chromatic/__main__.py,sha256=a69MO7mCe4ZBQ6eH2IS7IVAFcRsTRrCD7_sKS0zQyAI,27828
3
+ chromatic/__main__.py,sha256=nm3FcPuGOz2p9cFiNp5IOvmtKTnAggBYRGfr9iwe5Ns,28065
4
4
  chromatic/_typing.py,sha256=sCBi3aJrgm9efUL22jZg6S4fWSQj39zLx56ZrfAAjvU,3695
5
- chromatic/_version.py,sha256=e86qqq13UCAZf66bX7q40LdqNhApPa5nPY2VpdGjdiM,528
5
+ chromatic/_version.py,sha256=z01EEho55rtFSmtUIY_dFYiPC8OnFS0OJuwAOg4f-as,528
6
6
  chromatic/color/__init__.py,sha256=t19DW9WMdd6FEN69vkckVRlsDPBHldulHv_JulwXxFc,99
7
7
  chromatic/color/__init__.pyi,sha256=38k9rRtewx5jAG9MgHr77bvPVLEg3ULf8CkJfipnNZc,1774
8
8
  chromatic/color/colorconv.py,sha256=WTgRYeFxau0A7S10S7Zi4Y7Dg-Rcy-I6Sgm3LjTMPA4,11342
@@ -21,9 +21,9 @@ chromatic/image/__init__.pyi,sha256=IjC_HdMMTWznSMA6UprBsvEV8BB65PxBlYtrfDJudd0,
21
21
  chromatic/image/_array.py,sha256=6_eZOza5D_rLW8-uyyyD-TDZQQSSho70ec6mJp5SpQA,40493
22
22
  chromatic/image/_curses.py,sha256=GAlUvLfsXFDmyGg8Di_TKNfyHZnTf7NTAKZW6o7QHTc,1601
23
23
  chromatic/image/_glyph.py,sha256=RfiVwwzA3jxjObpOjV-zj2aipSndu1TrOOce6K7c2Eo,2534
24
- chromatic_python-0.9.1.dist-info/licenses/LICENSE,sha256=fKQvJY6-i5UcR_yGbIv2W7oAehJMTJY0NvRtWoXwHKE,1066
25
- chromatic_python-0.9.1.dist-info/METADATA,sha256=9KaCzex8y3o2ARKA4YdtHcpqmUBuww2GMcvqnZiK6lk,5166
26
- chromatic_python-0.9.1.dist-info/WHEEL,sha256=YVMoNqKzERt-wjUZwJ33xBGAwnFl-4cqbYkTtWa4itE,91
27
- chromatic_python-0.9.1.dist-info/entry_points.txt,sha256=Fk_pV70Sz340dSNfzHu-JycTf2nO0Fa60LkANe73_YA,54
28
- chromatic_python-0.9.1.dist-info/top_level.txt,sha256=wjzxcxfjO8I4u22BS8wL67Bq64c59kbZCqQ--Fc_Mqw,10
29
- chromatic_python-0.9.1.dist-info/RECORD,,
24
+ chromatic_python-0.9.2.dist-info/licenses/LICENSE,sha256=fKQvJY6-i5UcR_yGbIv2W7oAehJMTJY0NvRtWoXwHKE,1066
25
+ chromatic_python-0.9.2.dist-info/METADATA,sha256=Co4HNqjShFi34TgNu1ogHOyUuT-GY5-B9WeKOLNFt9I,5166
26
+ chromatic_python-0.9.2.dist-info/WHEEL,sha256=YVMoNqKzERt-wjUZwJ33xBGAwnFl-4cqbYkTtWa4itE,91
27
+ chromatic_python-0.9.2.dist-info/entry_points.txt,sha256=Fk_pV70Sz340dSNfzHu-JycTf2nO0Fa60LkANe73_YA,54
28
+ chromatic_python-0.9.2.dist-info/top_level.txt,sha256=wjzxcxfjO8I4u22BS8wL67Bq64c59kbZCqQ--Fc_Mqw,10
29
+ chromatic_python-0.9.2.dist-info/RECORD,,