-
Notifications
You must be signed in to change notification settings - Fork 95
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Create south hemisphere moon visualization #29
Conversation
using less know python string concatenation, to avoid extra space in some moons which would end with '\"': >>> len(r"a\\") 3 >>> len(r"a" "\\") 2
fixes double space for 6 line moon in south hemisphere from: ,,--, /,````o`` `|| ()``^.c `( O `~o `.` oo . ``--` to ,,--,. /,````o``. `|| ()``^.c` `( O `~o` `.` oo .` ``--``
Oh, I forgot to update the version number. |
src/__init__.py
Outdated
|
||
print(putmoon(dateobj, numlines, '@', notext, lang, hemisphere)) | ||
|
||
main() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
main() |
I should remove the main call here. I added before, and its giving the output twice.
@chubin Thanks for your review and valuable tips. I also think that we should try to keep the original spirit alive. I've plotted a full month for every moon size and hemisphere, and I didn't find any inconsistencies. |
It looks good to me. Great work, Martin! |
Fixes issue #1. If closed, we can create a issue for the still missing hemisphere autodetection.
I had to fix moons lines lenght for the unequal length lines ending in
\ "
in order to correctly read the moon upside down.I tried to keep the most of the code unchanged, and kept that long
if/elif
to getchar = background_nlines[lin][col]
. Was it in the original code?Personally, I would change that to a dictionary to remove the if/elif and simplify it to
char = backgrounds[nlines][lin][col] if nlines in backgrounds.keys() else '@'
If you like the idea, let me know and I can implement it.
Follows all the moons (first original and then upside down) for comparison and finally a waxing moon to show the change in direction: