File tree Expand file tree Collapse file tree 3 files changed +13
-12
lines changed
Expand file tree Collapse file tree 3 files changed +13
-12
lines changed Original file line number Diff line number Diff line change @@ -21,7 +21,6 @@ from moon.terminal_ui import TerminalUi
2121
2222ui = TerminalUi()
2323ui.set_moon_phase() #defaults to today's date
24- ui.set_moon_image()
2524ui.show()
2625```
2726
@@ -32,7 +31,6 @@ from moon.jupyter_ui import JupyterUi
3231
3332ui = JupyterUi()
3433ui.set_moon_phase() #defaults to today's date
35- ui.set_moon_image()
3634ui.show()
3735```
3836
Original file line number Diff line number Diff line change 11from moon .dialamoon import Moon
22import cv2
3+ import matplotlib .pyplot as plt
34
45class TerminalUi (Moon ):
56 def show (self ):
6- 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." )
7- cv2 .imshow (str (self .datetime ), self .image )
8- cv2 .waitKey (0 )
9- print ("Closing image..." )
10- cv2 .destroyAllWindows ()
11-
12-
7+ print ("☽ the image will open up in a new window. It might be behind your terminal window." )
8+ try :
9+ plt .imshow (cv2 .cvtColor (self .image , cv2 .COLOR_BGR2RGB ))
10+ plt .show ()
11+ print ("Image closed." )
12+ except :
13+ e = sys .exc_info ()[1 ]
14+ print ("Error: %s" % e )
Original file line number Diff line number Diff line change 88setup (
99 name = 'moon' ,
1010 packages = find_packages (),
11- version = '1.0.6 ' ,
11+ version = '1.0.7 ' ,
1212 license = 'MIT' ,
1313 description = 'Gets moon visualizations courtesy of NASA/Ernie Wright' ,
1414 long_description_content_type = "text/markdown" ,
1515 long_description = long_description ,
1616 author = 'Sadie Parker' ,
1717 author_email = '[email protected] ' ,
1818 url = 'https://github.com/spacerest/moon' ,
19- download_url = 'https://github.com/spacerest/moon/archive/v_1_0_6 .tar.gz' ,
19+ download_url = 'https://github.com/spacerest/moon/archive/v_1_0_7 .tar.gz' ,
2020 keywords = ['MOON' , 'ART' ],
2121 install_requires = [
2222 'numpy~=1.16' ,
23- 'opencv-python~=4.1.1.26'
23+ 'opencv-python~=4.2.0.34' ,
24+ 'matplotlib~=3.2.1' ,
2425 ],
2526 classifiers = [
2627 'Development Status :: 4 - Beta' ,
You can’t perform that action at this time.
0 commit comments