You are not logged in.

#1 2019-02-22 17:28:53

damo
....moderator....
Registered: 2015-08-20
Posts: 4,873

How to format wttr.in output for conky?

I am trying to format some terminal output to display in conky, but I don't know how to convert it so conky can display it. I have tried ${iconv_start} etc, but I get

conky: unknown variable '$iconv_start'

(This is also happening for other conkys which previously worked BTW. Has something changed recently?)

This doesn't show everything in the forum post (but it does in the post editor - "?" are ANSI symbols). And anyway, why is just the sun symbol showing here for me?

damo@debian: ~ $ curl wttr.in/London?format=4
London: ☀️ ?️+13°C ?️←19 km/h

I suspect that there is something missing on my system but I don't know where to start looking  monkey


Be Excellent to Each Other...

FORUM RULES and posting guidelines «» Help page for forum post formatting
Artwork on DeviantArt  «» BunsenLabs on DeviantArt

Online

#2 2019-02-22 17:47:29

ohnonot
...again
Registered: 2015-09-29
Posts: 3,663
Website

Re: How to format wttr.in output for conky?

i see 2 questionmarks there.
if i execute that command myself, i see 2 square blocks in urxvt.
in xterm (uses a vector font) i see this:
wttr-xterm.png
i copy-paste the same in geany and see this:
wttr-geany.png
i don't think iconv_start will help you there. these are colored unicode symbols contained in modern fonts.
have you tried with another format, then further parse that output for conky?

also: wttr.in/:help

edit: parse, not pass.

Last edited by ohnonot (2019-02-23 08:52:44)

Offline

#3 2019-02-22 17:52:47

damo
....moderator....
Registered: 2015-08-20
Posts: 4,873

Re: How to format wttr.in output for conky?

Thanks - I suspect it is a font issue, as you say.

And wttr.in/:help hasn't been a help, so far!


Be Excellent to Each Other...

FORUM RULES and posting guidelines «» Help page for forum post formatting
Artwork on DeviantArt  «» BunsenLabs on DeviantArt

Online

#4 2019-02-22 17:58:03

brontosaurusrex
Middle Office
Registered: 2015-09-29
Posts: 1,733

Re: How to format wttr.in output for conky?

This

#-------------------------------------
# Executor weather
execp = new
execp_command = wget http://wttr.in/?format=4 2>/dev/null -O - | cut -d : -f 2
execp_interval = 1200
execp_continuous = 0
execp_tooltip = weather
execp_font = cuprum 12
execp_font_color = #111111 80
execp_padding = 0 0
execp_background_id = 0
execp_centered = 1

is working in tint2.
weather.png

Last edited by brontosaurusrex (2019-02-22 17:59:42)

Offline

#5 2019-02-22 18:12:42

damo
....moderator....
Registered: 2015-08-20
Posts: 4,873

Re: How to format wttr.in output for conky?

^ Nice


Be Excellent to Each Other...

FORUM RULES and posting guidelines «» Help page for forum post formatting
Artwork on DeviantArt  «» BunsenLabs on DeviantArt

Online

#6 2019-02-22 18:45:17

unklar
Member
Registered: 2015-10-31
Posts: 844

Re: How to format wttr.in output for conky?

Did you check it out?

Install external dependencies

wttr.in has the following external dependencies:

    golang, wego dependency
    wego, weather client for terminal

...
Install Python dependencies

Python requirements:

    Flask
    geoip2
    geopy
    requests
    gevent

If you want to get weather reports as PNG files, you'll also need to install:

    PIL
    pyte (>=0.6)
    necessary fonts

You can install most of them using pip.

https://github.com/chubin/wttr.in

Offline

#7 2019-02-23 14:35:19

brontosaurusrex
Middle Office
Registered: 2015-09-29
Posts: 1,733

Re: How to format wttr.in output for conky?

@damo, Ok, there is something going on here, testing the exact same code with exact same font on other machine (that tint2 snippet) is showing me some weird chars. Not sure how to figure it out. Workaround would be to use simpler 'format=3'.

Last edited by brontosaurusrex (2019-02-23 14:49:04)

Offline

#8 2019-02-23 14:41:55

damo
....moderator....
Registered: 2015-08-20
Posts: 4,873

Re: How to format wttr.in output for conky?

brontosaurusrex wrote:

... Not sure how to figure it out.

Join the club! Thanks for helping out smile


Be Excellent to Each Other...

FORUM RULES and posting guidelines «» Help page for forum post formatting
Artwork on DeviantArt  «» BunsenLabs on DeviantArt

Online

Board footer

Powered by FluxBB