ipython-icat 0.1.0__tar.gz → 0.2.1__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.
- {ipython_icat-0.1.0/ipython_icat.egg-info → ipython_icat-0.2.1}/PKG-INFO +2 -2
- {ipython_icat-0.1.0 → ipython_icat-0.2.1}/icat/__init__.py +9 -0
- {ipython_icat-0.1.0 → ipython_icat-0.2.1/ipython_icat.egg-info}/PKG-INFO +2 -2
- {ipython_icat-0.1.0 → ipython_icat-0.2.1}/ipython_icat.egg-info/requires.txt +1 -1
- {ipython_icat-0.1.0 → ipython_icat-0.2.1}/pyproject.toml +2 -2
- {ipython_icat-0.1.0 → ipython_icat-0.2.1}/LICENSE.md +0 -0
- {ipython_icat-0.1.0 → ipython_icat-0.2.1}/README.md +0 -0
- {ipython_icat-0.1.0 → ipython_icat-0.2.1}/ipython_icat.egg-info/SOURCES.txt +0 -0
- {ipython_icat-0.1.0 → ipython_icat-0.2.1}/ipython_icat.egg-info/dependency_links.txt +0 -0
- {ipython_icat-0.1.0 → ipython_icat-0.2.1}/ipython_icat.egg-info/top_level.txt +0 -0
- {ipython_icat-0.1.0 → ipython_icat-0.2.1}/setup.cfg +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: ipython-icat
|
|
3
|
-
Version: 0.1
|
|
3
|
+
Version: 0.2.1
|
|
4
4
|
Summary: IPython magic command for displaying images in kitty terminal
|
|
5
5
|
Author-email: Tony Kabilan Okeke <tonykabilanokeke@gmail.com>
|
|
6
6
|
Project-URL: Homepage, https://github.com/Kabilan108/ipython-icat
|
|
@@ -10,7 +10,7 @@ Description-Content-Type: text/markdown
|
|
|
10
10
|
License-File: LICENSE.md
|
|
11
11
|
Requires-Dist: ipython>=8.18.1
|
|
12
12
|
Requires-Dist: matplotlib>=3.9.2
|
|
13
|
-
Requires-Dist: pillow>=
|
|
13
|
+
Requires-Dist: pillow>=9.0.0
|
|
14
14
|
|
|
15
15
|
# ipython-icat
|
|
16
16
|
|
|
@@ -102,5 +102,14 @@ class ICatMagics(Magics):
|
|
|
102
102
|
_icat(output=False, input=buf.getbuffer())
|
|
103
103
|
|
|
104
104
|
|
|
105
|
+
def icat(img: Image.Image, width: int = None, height: int = None):
|
|
106
|
+
img_ = img.copy()
|
|
107
|
+
with BytesIO() as buf:
|
|
108
|
+
if width or height:
|
|
109
|
+
img_.thumbnail((width or img.width, height or img.height))
|
|
110
|
+
img_.save(buf, format="PNG")
|
|
111
|
+
_icat(output=False, input=buf.getbuffer())
|
|
112
|
+
|
|
113
|
+
|
|
105
114
|
def load_ipython_extension(ipython):
|
|
106
115
|
ipython.register_magics(ICatMagics)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: ipython-icat
|
|
3
|
-
Version: 0.1
|
|
3
|
+
Version: 0.2.1
|
|
4
4
|
Summary: IPython magic command for displaying images in kitty terminal
|
|
5
5
|
Author-email: Tony Kabilan Okeke <tonykabilanokeke@gmail.com>
|
|
6
6
|
Project-URL: Homepage, https://github.com/Kabilan108/ipython-icat
|
|
@@ -10,7 +10,7 @@ Description-Content-Type: text/markdown
|
|
|
10
10
|
License-File: LICENSE.md
|
|
11
11
|
Requires-Dist: ipython>=8.18.1
|
|
12
12
|
Requires-Dist: matplotlib>=3.9.2
|
|
13
|
-
Requires-Dist: pillow>=
|
|
13
|
+
Requires-Dist: pillow>=9.0.0
|
|
14
14
|
|
|
15
15
|
# ipython-icat
|
|
16
16
|
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
[project]
|
|
2
2
|
name = "ipython-icat"
|
|
3
|
-
version = "0.1
|
|
3
|
+
version = "0.2.1"
|
|
4
4
|
description = "IPython magic command for displaying images in kitty terminal"
|
|
5
5
|
readme = "README.md"
|
|
6
6
|
requires-python = ">=3.9"
|
|
7
7
|
dependencies = [
|
|
8
8
|
"ipython>=8.18.1",
|
|
9
9
|
"matplotlib>=3.9.2",
|
|
10
|
-
"pillow>=
|
|
10
|
+
"pillow>=9.0.0",
|
|
11
11
|
]
|
|
12
12
|
authors = [
|
|
13
13
|
{ name = "Tony Kabilan Okeke", email = "tonykabilanokeke@gmail.com" }
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|