-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
use matplotlib instead of cv2 for showing image on terminal, update r…
…eadme
- Loading branch information
Showing
3 changed files
with
13 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,14 @@ | ||
from moon.dialamoon import Moon | ||
import cv2 | ||
import matplotlib.pyplot as plt | ||
|
||
class TerminalUi(Moon): | ||
def show(self): | ||
print("☽ the image will open up in a new window. It might be behind your terminal window. To close the image, press any key while it's open.") | ||
cv2.imshow(str(self.datetime), self.image) | ||
cv2.waitKey(0) | ||
print("Closing image...") | ||
cv2.destroyAllWindows() | ||
|
||
|
||
print("☽ the image will open up in a new window. It might be behind your terminal window.") | ||
try: | ||
plt.imshow(cv2.cvtColor(self.image, cv2.COLOR_BGR2RGB)) | ||
plt.show() | ||
print("Image closed.") | ||
except: | ||
e = sys.exc_info()[1] | ||
print("Error: %s" % e) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,19 +8,20 @@ | |
setup( | ||
name = 'moon', | ||
packages = find_packages(), | ||
version = '1.0.6', | ||
version = '1.0.7', | ||
license='MIT', | ||
description = 'Gets moon visualizations courtesy of NASA/Ernie Wright', | ||
long_description_content_type="text/markdown", | ||
long_description = long_description, | ||
author = 'Sadie Parker', | ||
author_email = '[email protected]', | ||
url = 'https://github.com/spacerest/moon', | ||
download_url = 'https://github.com/spacerest/moon/archive/v_1_0_6.tar.gz', | ||
download_url = 'https://github.com/spacerest/moon/archive/v_1_0_7.tar.gz', | ||
keywords = ['MOON', 'ART'], | ||
install_requires=[ | ||
'numpy~=1.16', | ||
'opencv-python~=4.1.1.26' | ||
'opencv-python~=4.2.0.34', | ||
'matplotlib~=3.2.1', | ||
], | ||
classifiers=[ | ||
'Development Status :: 4 - Beta', | ||
|