You are not logged in.
@Teo,
how do I know that he takes the right lichtenstein (from three in GE)?
If I may.
wttr.in gets your location from your ISP. This is why you really do not need to include a city if you want your city.
01 Nov 16 @ 12:14:31 ~
$ curl wttr.in
Weather for City: Buenos Aires, Argentina
.-. Rain With Thunderstorm
( ). 15 °C
(___(__) ← 0 km/h
‚‘⚡‘‚⚡‚‘ 6 km
‚’‚’⚡’‚’ 2.3 mm
More Information:
1. do not use spaces in names; use an underscore ( _ ) or "quote quote"
- ie: a slight difference
01 Nov 16 @ 11:35:17 ~
$ wttr rio de janeiro
Weather for City: Rio, Greece
01 Nov 16 @ 11:35:49 ~
$ wttr rio_de_janeiro
Weather for City: Rio De Janeiro, Brazil
2. add a country or province/state:
01 Nov 16 @ 11:40:00 ~
$ wttr london
Weather for City: London, United Kingdom
01 Nov 16 @ 11:40:47 ~
$ wttr London_canada
Weather for City: London, Canada
01 Nov 16 @ 11:40:47 ~
$ wttr London_ontario
Weather for City: London, Canada
How well that will work for you I don't know. I get the exactly the same for two lichtenstein cities in Germany, and than: Vaduz, Liechtenstein
01 Nov 16 @ 11:52:01 ~
$ wttr Lichtenstein_Saxony
Weather for City: Lichtenstein, Germany
01 Nov 16 @ 11:53:48 ~
$ wttr Lichtenstein_Baden-Württemberg
Weather for City: Lichtenstein, Germany
01 Nov 16 @ 11:55:02 ~
$ wttr Lichtenstein
Weather for City: Vaduz, Liechtenstein
You can use airport codes as well ... someone posted this handy bash script here (or at #! - my forgetter). I call it: wttr I should have added the name of the person that posted it.
EDIT: Found the original bash script/author and added some help.
#!/bin/bash
### bash script credit to Fog
### https://forums.bunsenlabs.org/viewtopic.php?pid=20757#p20757
###
### Usage: wttr.in/:help (plus a few observations by S11)
###
### $ curl wttr.in # current location
### $ curl wttr.in/muc # weather in the Munic airport
###
### Supported location types:
###
### /paris # city name
### /paris_canada # city name, country
### /paris_ontario # city name, province/state
### /new_york or "new york" # city name
### /muc # airport code (3 letters)
### /@stackoverflow.com # domain name
### /94107 # area codes (US)
###
### Special locations:
###
### /moon # Moon phase
### (add ,+US or ,+France for these cities)
###
### Units:
###
### ?m # metric (SI) (default; except US)
### ?u # USCS (US default)
###
### Special URLs:
###
### /:help # show this page
###
### === Aitport codes =============================================
### List of airports by IATA code: A
### https://en.wikipedia.org/wiki/List_of_airports_by_IATA_code:_A
###
### Lists of airports by country
### https://en.wikipedia.org/wiki/Category:Lists_of_airports_by_country
###
weather() {
if [ ! -z $1 ]
then
curl -4 http://wttr.in/$1
else
curl -4 http://wttr.in
fi
}
weather $1
$SHELL
German:
https://de.wikipedia.org/wiki/Liste_der_IATA-Codes/A
https://de.wikipedia.org/wiki/Liste_der … eutschland
Last edited by Sector11 (2016-11-01 16:29:55)
Debian 12 Beardog, SoxDog and still a Conky 1.9er
Offline
Offline
I love how Teo's one 'bash king-foo' line put that whole thing into a conky.
Wish I knew what he knows. Anyway, I get to 'use' what he knows and that's good enough for me.
Debian 12 Beardog, SoxDog and still a Conky 1.9er
Offline
OK, I have to ask. Why do the arrows show in a terminal with all mono fonts I plug in but not in conky?
What really really simple thing am I missing?
Same thing I'm missing I guess. I've no idea why this happens; could be a conky variable that needs to be declared? Who knows...
@Teo - I don't think that the end results looks great, your scripts look way much better.
The command line weather uses the api from https://www.worldweatheronline.com/ , and their git (for CLI weather) is here https://github.com/chubin/wttr.in, so my logic was if you can use some of their work in order to have a conkyweather similar to the python script https://ubuntuforums.org/showthread.php?t=869328
This is just an idea so feel free to disregard it if it's not feasible.
In the meantime your scripts are working great.
Relax mate and thanks for your kind words.
I don't know python. I could learn I guess, but I won't; I am more of a C guy.
If I ever did something with your suggestion, that'd be to create a script straight from https://www.worldweatheronline.com/.
Maybe in the future...
wttr.in gets your location from your ISP. This is why you really do not need to include a city if you want your city.
I don't know about that one, it gives me weather for Athens, Greece, which is 500km from where I live.
Please make Autocad Civil 3D and Archicad work on Linux!
Please make Autocad Civil 3D and Archicad work on Linux!
Please make Autocad Civil 3D and Archicad work on Linux!
Please make Autocad Civil 3D and Archicad work on Linux!
Offline
I love how Teo's one 'bash king-foo' line put that whole thing into a conky.
Wish I knew what he knows. Anyway, I get to 'use' what he knows and that's good enough for me.
The regular expression could never work with sed, even with the -r parameter, only perl could do it.
Thanks to reddit user Fallenalien22 for the inspiration.
...but I think I'll stick to sed, thank you very much
Last edited by TeoBigusGeekus (2016-11-01 18:46:00)
Please make Autocad Civil 3D and Archicad work on Linux!
Please make Autocad Civil 3D and Archicad work on Linux!
Please make Autocad Civil 3D and Archicad work on Linux!
Please make Autocad Civil 3D and Archicad work on Linux!
Offline
Sector11 wrote:OK, I have to ask. Why do the arrows show in a terminal with all mono fonts I plug in but not in conky?
What really really simple thing am I missing?
Same thing I'm missing I guess. I've no idea why this happens; could be a conky variable that needs to be declared? Who knows...
Oh well, then I don't feel so bad. At least I got a great font out of it. Where did you ever find that font?
Sector11 wrote:wttr.in gets your location from your ISP. This is why you really do not need to include a city if you want your city.
I don't know about that one, it gives me weather for Athens, Greece, which is 500km from where I live.
OH OH! Well that is contrary to the help file for wttr.in
01 Nov 16 @ 15:53:02 ~
$ curl wttr.in/:help
Usage:
$ curl wttr.in # current location
$ curl wttr.in/muc # weather in the Munic airport
Supported location types:
/paris # city name
/muc # airport code (3 letters)
/@stackoverflow.com # domain name
/94107 # area codes
Special locations:
/moon # Moon phase (add ,+US or ,+France for these cities)
Units:
?m # metric (SI) (used by default everywhere except US)
?u # USCS (used by default in US)
Special URLs:
/:help # show this page
01 Nov 16 @ 15:53:16 ~
$
I KNOW: You moved and no one told you
Debian 12 Beardog, SoxDog and still a Conky 1.9er
Offline
I was abducted!
At least I got a great font out of it. Where did you ever find that font?
Can't remember, I tried all my monospace fonts one by one until this one produced all the wind directions.
I had it forgotten in my .fonts folder, never actually used it.
I prefer Consolas, Fantasque Mono or Ubuntu Mono.
Last edited by TeoBigusGeekus (2016-11-02 12:30:39)
Please make Autocad Civil 3D and Archicad work on Linux!
Please make Autocad Civil 3D and Archicad work on Linux!
Please make Autocad Civil 3D and Archicad work on Linux!
Please make Autocad Civil 3D and Archicad work on Linux!
Offline
Abducted!!!
Damn aliens! Or was it nieces or nephews or ..{cough cough}... work!
So you should be in Athens but you are getting use to Kastoria.
Yea, you already got me onto Fantasque Mono, love it. Consolas is a mono font? ... How about that, if I knew that, I forgot it.
I have way too many fonts and way too many mono fonts**. All come by way of; a) installed with Linux or b) conky.
===
** image: my mono fonts
EDIT:
I quite like this Fira Mono, I'm trying it out in my terminal and it's a clean font I can clearly at a smaller size. But maybe that's just me.
Last edited by Sector11 (2016-11-02 16:47:01)
Debian 12 Beardog, SoxDog and still a Conky 1.9er
Offline
It saddens me to say it, but I use Microsoft fonts on my system: Tahoma for normal font and Consolas for monospace.
I find them the most eye pleasing among many competitors.
Please make Autocad Civil 3D and Archicad work on Linux!
Please make Autocad Civil 3D and Archicad work on Linux!
Please make Autocad Civil 3D and Archicad work on Linux!
Please make Autocad Civil 3D and Archicad work on Linux!
Offline
Well I have the fonts installed from ttf-mscorefonts-installer, but only because I have backed up ~/.fonts over the years and they were there - same thing as the ubuntu fonts, those show up in a lot of conkys sooooooooooooooo .....
Tahoma I don't have - I recall having it once, but I do have Consolas.
So we be 'saddened' together.
Debian 12 Beardog, SoxDog and still a Conky 1.9er
Offline
That 10/Lo thing in the 1_Accuweather script kept annoying me after S11 mentioned it and I did something for it:
if [[ $(sed -n 4p $HOME/1_accuweather/first_days) == Lo ]]; then
line_3=$(sed -n 3p $HOME/1_accuweather/first_days)
sed -i -e '3s/^.*$/N\/A/' -e "4s/^.*$/$line_3/" $HOME/1_accuweather/first_days
fi
Add these lines at the end of the #First 5 days' section, just before the last fi.
With this addition, instead of 2/Lo, the output will be N/A / 2:
Better or worse? Is it worth an update?
Last edited by TeoBigusGeekus (2016-11-02 21:26:19)
Please make Autocad Civil 3D and Archicad work on Linux!
Please make Autocad Civil 3D and Archicad work on Linux!
Please make Autocad Civil 3D and Archicad work on Linux!
Please make Autocad Civil 3D and Archicad work on Linux!
Offline
Better make it
if [[ $(sed -n 4p $HOME/1_accuweather/first_days) == Lo ]]; then
line_3=$(sed -n 3p $HOME/1_accuweather/first_days)
sed -i -e '3s/^.*$/-/' -e "4s/^.*$/$line_3/" $HOME/1_accuweather/first_days
fi
-/2 is better looking than N/A/2
Last edited by TeoBigusGeekus (2016-11-02 22:07:37)
Please make Autocad Civil 3D and Archicad work on Linux!
Please make Autocad Civil 3D and Archicad work on Linux!
Please make Autocad Civil 3D and Archicad work on Linux!
Please make Autocad Civil 3D and Archicad work on Linux!
Offline
That 10/Lo thing in the 1_Accuweather script kept annoying me after S11 mentioned it.
]:D ]:D {evil}hahaha ... I'm growing on him. {rubbing hands} ]:D ]:D
Better make it
if [[ $(sed -n 4p $HOME/1_accuweather/first_days) == Lo ]]; then line_3=$(sed -n 3p $HOME/1_accuweather/first_days) sed -i -e '3s/^.*$/N\/A/' -e "4s/^.*$/$line_3/" $HOME/1_accuweather/first_days fi
-/2 is better looking than N/A/2
OK, where do you get the " - " in all that? But yea that is better than N/A.
Why not:
thedayhasendedchecknighttemp
naaaaaaaa that would never fit.
But seriously why not, if you can, make is a variable in the script ( ##Default = - ) that people can use what they want, oh and have a way to leave it blank.
Debian 12 Beardog, SoxDog and still a Conky 1.9er
Offline
OK, where do you get the " - " in all that? But yea that is better than N/A.
It was an OOPS, sorry. Look at my edited post.
As for the variable, we'll see tomorrow.
Goodnight S11.
Please make Autocad Civil 3D and Archicad work on Linux!
Please make Autocad Civil 3D and Archicad work on Linux!
Please make Autocad Civil 3D and Archicad work on Linux!
Please make Autocad Civil 3D and Archicad work on Linux!
Offline
G'night Teo ... will try that after dinner.
Debian 12 Beardog, SoxDog and still a Conky 1.9er
Offline
Offline
Totally abandoned the idea of changing the 10/Lo thingy after the non-existent response it provoked.
I'll just leave it as it is.
Please make Autocad Civil 3D and Archicad work on Linux!
Please make Autocad Civil 3D and Archicad work on Linux!
Please make Autocad Civil 3D and Archicad work on Linux!
Please make Autocad Civil 3D and Archicad work on Linux!
Offline
^ Sector11
Totally abandoned the idea of changing the 10/Lo thingy after the non-existent response it provoked.
I'll just leave it as it is.
I find this statement sympathetic.
Offline
Hey - if it works; don't fix it - if no one complains; don't change it.
... and then - along comes Sector11 who just has to tweak the hell out of everything conky related.
New one coming along quite nice:
@ unklar - I'm at it again!
Debian 12 Beardog, SoxDog and still a Conky 1.9er
Offline
^ I see it!
It "packed" you again.
Offline