Comments (11)
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:
- Prepare the upside down drawings (rotating the existing arrays with something as
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). - Implement auto hemisphere detection by IP and/or localization as used in wttr.in/.
What are your thoughts on this?
from pyphoon.
That sounds good. Thank you.
from pyphoon.
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?
from pyphoon.
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
from pyphoon.
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 ?
from pyphoon.
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 #1 (comment) was pretty good, so let's do it. Please:
- Make the changes
- Open a PR with them
- It will be merged
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
from pyphoon.
#29 is merged now,
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
\
|
\
\
`\
\
`-
`
`
`
from pyphoon.
I think, this issue can be closed now, and we can move to wttr.in:
chubin/wttr.in#247
from pyphoon.
I think so. Thanks Chubin.
from pyphoon.
I am happy with any solution. :)
from pyphoon.
I've reopened the issue, because we want to add a note about the southern hemisphere in the output (chubin/wttr.in#247)
from pyphoon.
Related Issues (14)
- HTTPS? HOT 3
- How to colorize output in same way HOT 1
- brew installation HOT 6
- How can I install and run pyphoon? HOT 6
- Feature request: report eclipses HOT 1
- Missing hemisphere translations HOT 2
- Add timezone option HOT 5
- Installation from PyPI doesnโt work
- How to make output work with a white background HOT 1
- I did translation for Armenian HOT 1
- ASCII Art Phase of the Moon is not colored in windows terminal. HOT 1
- Full moon reported an improper time
- L10n: different locales support HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. ๐๐๐
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pyphoon.