Bugswriter / tuxi

Tuxi is a cli assistant. Get answers of your questions instantly.
GNU General Public License v3.0
1.33k stars 73 forks source link

Remove degree units from weather output #129

Closed zachspar closed 3 years ago

zachspar commented 3 years ago

This change takes out the degree units from the weather output, leaving it up to the user to interpret what unit it is. This would technically fix #112, as @Genghius suggested. I wish the US would just use normal units like everyone else.

sudocanttype commented 3 years ago

Heh, the US being normal? not gonna happen. It would technically fix it, but it's not exactly a good fix, as there could be a significant amount of confusion from it

BeyondMagic commented 3 years ago

I think the ID of Celsius and Fahrenheit are different in Google Search Scrapping, someone from U.S. needs to confirm. It seems that for C it is always wob_tm and for F wob_ttm. Actually, I may be dumb, probably someone already thought of this and didn't work, lemme see if I can find something better to fix this because removing ºC and ºF doesn't seem a great idea.

image

zachspar commented 3 years ago

@sudocanttype Celsius is always less than Fahrenheit, I don't think it is that confusing.

sudocanttype commented 3 years ago

@BeyondMagic Yep, just checked (in us), image

zachspar commented 3 years ago

No, @sudocanttype your C is wob_ttm and @BeyondMagic's C is wob_tm. Seems like anyone's default is wob_tm. One thing we can do for sure in the sed chain is do a simple comparison of the values, C is always less than F

sudocanttype commented 3 years ago

Ah, I'm just dumb. Looks like tm is just default for region, which makes this so much harder to code for. Also once again, got confused.

zachspar commented 3 years ago

Nobody is dumb lol , confusing stuff

BeyondMagic commented 3 years ago

Yep, you're right @sudocanttype, it's better using a simple comparison, is there any one-line way to do that in POSIX?

zachspar commented 3 years ago

Closing this PR. Issue #112 is still persistent with a possible solution of comparing the two values with the assumption that C < F always holds true.