Open dlangille opened 8 years ago
For showing the south hemisphere moon phases apparently it's only needed to rotate the moon drawing upside down and place the text accordingly. So, I would like to propose 2 different steps:
south=[a[::-1] for a in north[::-1]]
) and add an optional command line argument -s --hemisphere [NORTH/SOUTH/AUTO] to show the moon upside down (auto to be implemented in step 2).What are your thoughts on this?
That sounds good. Thank you.
oh, my mistake thinking it would only be needed to rotate the ascii art. Look at the original and rotated moon:
.---------.
.--' o . `--.
.'@ @@@@@@ . . `.
.'@@ @@@@@@@@ @@@@ . `.
.' . @@@@@@@@ @@@@@@ . `.
/ @@ o @@@@@@. @@@@ O @\
|@@@@ @@@@@@ @@|
/ @@@@@ `.-. @@@@@@@@ . @@\
|@ @@ @@@@@@ @@@ |
\ @@ @ .() @@ @@@@@ /
| @ @@@ @@@ @@@ |
\ . @@ @\ . . @@ o /
`. @@@@ _\ / . o .'
`. @@ ()-- .'
`. / | o .'
`--./ . .--'
`---------'
rotated (look at the perimeter and the parentesis):
'---------`
'--. . /.--`
'. o | / .`
'. --)( @@ .`
'. o . / \_ @@@@ .`
/ o @@ . . \@ @@ . \
| @@@ @@@ @@@ @ |
/ @@@@@ @@ )(. @ @@ \
| @@@ @@@@@@ @@ @|
\@@ . @@@@@@@@ .-.` @@@@@ /
|@@ @@@@@@ @@@@|
\@ O @@@@ .@@@@@@ o @@ /
.` . @@@@@@ @@@@@@@@ . '.
.` . @@@@ @@@@@@@@ @@'.
.` . . @@@@@@ @'.
.--` . o '--.
.---------.
I will have to either swap some characters, like parentesis, or redo the ascii art.
I was thinking that keeping the art and making a swap table was better:
( --> )
) --> (
. --> `
` --> .
_ --> ^
' --> ,
which results in the following:
,---------.
,--` ` /`--.
,` o | / `.
,` --() @@ `.
,` o ` / \^ @@@@ `.
/ o @@ ` ` \@ @@ ` \
| @@@ @@@ @@@ @ |
/ @@@@@ @@ ()` @ @@ \
| @@@ @@@@@@ @@ @|
\@@ ` @@@@@@@@ `-`. @@@@@ /
|@@ @@@@@@ @@@@|
\@ O @@@@ `@@@@@@ o @@ /
`. ` @@@@@@ @@@@@@@@ ` ,`
`. ` @@@@ @@@@@@@@ @@,`
`. ` ` @@@@@@ @,`
`--. ` o ,--`
`---------`
Which is not optimal, since some dots inside the moon have been replaced.
What are your thoughts on the matter?
My results are the same.
I started searching for flipping ascii art, but that was mostly table flipping. Next was: mirror ascii art
https://stackoverflow.com/questions/13112671/how-to-horizontally-mirror-ascii-art
Yeah, the issues are the same. Although rewriting every moon doesn't seen the smart thing to do, It's probably the best one can do to get a better outcome, to stay as faithful as possible to the original art.
What do you think @dlangille and @chubin ?
@martinbra
I think that your last drawing with fixes was pretty good, and we should use it. And for other cases (e.g. other moon sizes), we should just make the automatic flipping. This program is not just some moonphase viewer, it is a port of the original program developed in 197x, almost 50 years ago, and so we wouldn't like to diverge from it substantively. That being said, I think it is ok to add some new features, especially if they are isolated in a separate modules.
I thik that you original plan https://github.com/chubin/pyphoon/issues/1#issuecomment-676997422 was pretty good, so let's do it. Please:
Then we try to bind it to wttr.in as you said.
I think this feature is very important, at least it is steadily being requested from time to time since years
I've updated it on wttr.in, but it is not yet enabled in the wttr.in code
$ pyphoon -s south
,
,
,
,-
/
,/
/
/
|
/ New Moon +
| 0 21:17:30
| First Quarter -
| 5 17:38:04
\
|
\
\
`\
\
`-
`
`
`
I think, this issue can be closed now, and we can move to wttr.in: https://github.com/chubin/wttr.in/issues/247
I think so. Thanks Chubin.
I am happy with any solution. :)
I've reopened the issue, because we want to add a note about the southern hemisphere in the output (https://github.com/chubin/wttr.in/issues/247)
When in the southern hemisphere, the moon waxes and wanes in the opposite direction.
re: http://twitter.com/igor_chubin/status/717791483127066625