AskOverflow.Dev

AskOverflow.Dev Logo AskOverflow.Dev Logo

AskOverflow.Dev Navigation

  • 主页
  • 系统&网络
  • Ubuntu
  • Unix
  • DBA
  • Computer
  • Coding
  • LangChain

Mobile menu

Close
  • 主页
  • 系统&网络
    • 最新
    • 热门
    • 标签
  • Ubuntu
    • 最新
    • 热门
    • 标签
  • Unix
    • 最新
    • 标签
  • DBA
    • 最新
    • 标签
  • Computer
    • 最新
    • 标签
  • Coding
    • 最新
    • 标签
主页 / ubuntu / 问题

问题[weather](ubuntu)

Martin Hope
Terrance
Asked: 2020-09-11 20:54:18 +0800 CST

Xubuntu 18.04 / 20.04 的 xfce4-weather-plugin 停止工作

  • 11

Xubuntu 18.04 和现在 20.04 的 xfce4-weather-plugin 已停止工作并给出“无数据”。

plugins xfce xubuntu weather
  • 5 个回答
  • 7305 Views
Martin Hope
Trushar Gavit
Asked: 2020-05-31 23:10:48 +0800 CST

开放天气扩展不起作用

  • 14

从昨天开始,顶部面板上的 openweather 扩展不再显示天气。它显示“请等待加载”。

我试图找到解决方案。在 openweather 网站上有一个创建帐户并使用 API id 的帖子。我发现这是一个订阅基本计划。有一个免费计划,允许 60 次免费通话以获取天气数据。

我认为扩展是开源的。并且可能是我删除了运行扩展所需的任何包,所以我重新安装了操作系统。但是这样做没有区别。 在此处输入图像描述

有什么可能出错的指导?

gnome-shell-extension weather 20.04
  • 4 个回答
  • 6846 Views
Martin Hope
Wonky
Asked: 2019-11-23 09:40:45 +0800 CST

我怎样才能让 Conky 显示天气?

  • 4

我一直在努力让 conky 显示天气,我刚刚安装它,发现 yahoo 停止了 conky 主题正在使用的 api url(http://weather.yahooapis.com/forecastrss?w= 1103816&u=c),我尝试将 url 更改为 accuweather 和 openweather ,但什么也没有。我只是不明白这是如何工作的,我不知道如何让它正常工作,这里是代码:

##Weather
${image .jelly-weather-icons/conky_icons/circle2.png -s 190x190}
${texeci 1300 curl -s "http://rss.accuweather.com/rss/liveweather_rss.asp\?metric\=${METRIC}#\&locCode\=$LOCCOD" -o #~/.cache/weather.xml}
${voffset -110}${offset 425}${font ITC Avant Garde Gothic Pro:bold:size=20}${execi 1300 grep #"yweather:condition" ~/.cache/weather.xml | grep -o "temp=\"[^\"]*\"" | grep -o "\"[^\"]*\"" | #grep -o "[^\"]*"}${font ITC Avant Garde Gothic Pro:bold:size=8}${voffset -16}o${voffset 14}${font}#${color1}
${execi 1300 cp -f .weather-icons/$(grep "yweather:condition" ~/.cache/weather.xml | grep -o #"code=\"[^\"]*\"" | grep -o "\"[^\"]*\"" | grep -o "[^\"]*").png ~/.cache/weather.png}${image #~/.cache/weather.png -p 425,23 -s 35x35}
${offset 420}${voffset -105}${font ITC Avant Garde Gothic Pro:size=14} Sevilla

顺便说一句,我在互联网上找不到任何可以帮助我的东西......在此先感谢:)

Edit1:这是conky主题保存在cache/weather.xml中的api http://api.openweathermap.org/data/2.5/forecast?id=6361046&APPID=6be5e3a6e62680c28044791e8fc7b568 我正在慢慢理解它是如何工作的

Edit2:这就是代码现在的样子,我注意到我打错了一些 # 试图评论整个天气部分。我只是不明白 conky 如何读取 xml(我自己不知道如何读取 xml,但我想我可以通过一些 xml 指南来解决这个问题:P)

##Weather
${image .jelly-weather-icons/conky_icons/circle2.png -s 190x190}
${texeci 1300 curl -s "http://api.openweathermap.org/data/2.5/forecast?id=6361046&APPID=6be5e3a6e62680c28044791e8fc7b568&units=metric" -o ~/.cache/weather.xml}
${voffset -110}${offset 425}${font ITC Avant Garde Gothic Pro:bold:size=20}${execi 1300 grep "weather:description" ~/.cache/weather.xml | grep -o "temp=\"[^\"]*\"" | grep -o "\"[^\"]*\"" | grep -o "[^\"]*"}${font ITC Avant Garde Gothic Pro:bold:size=8}${voffset -16}o${voffset 14}${font}${color1}
${execi 1300 cp -f .weather-icons/$(grep "yweather:condition" ~/.cache/weather.xml | grep -o "code=\"[^\"]*\"" | grep -o "\"[^\"]*\"" | grep -o "[^\"]*").png ~/.cache/weather.png}${image ~/.cache/weather.png -p 425,23 -s 35x35}
${offset 420}${voffset -105}${font ITC Avant Garde Gothic Pro:size=14} Sevilla

Edit3:感谢@WinEunuuchs2Unix和@steeldriver ,我终于让它工作了,这就是代码最终寻找想要在他们的 conky 代码中使用它的任何人的方式:

##Weather

${voffset -80}${offset 435}${font ITC Avant Garde Gothic Pro:bold:size=20}${execi 1300 curl -s "http://api.openweathermap.org/data/2.5/forecast?id=6361046&APPID=6be5e3a6e62680c28044791e8fc7b568&units=metric" | jq -r '.list[0].main.temp' | awk '{printf("%.0f\n", $1)}'}${font ITC Avant Garde Gothic Pro:bold:size=8}${voffset -16}o${voffset 24}${font}${color1}
${execi 1300 cp -f .iconos/$(curl -s "http://api.openweathermap.org/data/2.5/forecast?id=6361046&APPID=6be5e3a6e62680c28044791e8fc7b568&units=metric" | jq -r '.list[0].weather[].icon').png ~/.cache/weather.png}${image ~/.cache/weather.png -p 425,20 -s 60x60}
${offset 420}${voffset -115}${font ITC Avant Garde Gothic Pro:bold:size=14} Sevilla

基本上它的作用是使用从openweather url读取一个json curl,并jq搜索温度的值.list[0].weather[].icon和.list[0].main.temp温度,它输出一个带有2位十进制数字的值,我使用其余代码将其剪掉以供个人喜好awk '{printf("%.0f\n", $1)}'只是conky的了解您想要它的位置以及您想要它的方式的方法。如果您想自己使用它,只需更改Sevilla您的城市,并更改curl -s "...your location api url..."注意,如果您为您的 api url 使用不同的站点,则必须更改jq以适应新的 json 数据。另请注意,您必须使用此图标列表中的所有图标创建一个文件夹或使用您自己的图标,但请记住使用相同的命名(01d.png,02d.png,...)并且不要忘记编辑这个${execi 1300 cp -f .iconos/$(curl -s "http:/...并替换.iconos/为您的文件夹的目录。

如果您想尝试 conky 主题,请在这里

conky weather 18.04
  • 5 个回答
  • 11775 Views
Martin Hope
mchid
Asked: 2019-03-17 22:41:09 +0800 CST

如何修复 inxi:“错误:已下载天气信息但未检测到数据。”?

  • 2

当我使用以下命令时:

inxi -w

我收到以下错误:

Error: weather info downloaded but no data detected.

我已经尝试使用该-W Location选项,但我仍然得到同样的错误。

我也尝试使用不同的位置,我尝试使用位置邮政编码以及位置城市,州格式,但我仍然得到相同的错误。

有谁知道如何解决这个错误?

command-line weather inxi
  • 2 个回答
  • 663 Views
Martin Hope
user364819
Asked: 2018-07-05 01:59:56 +0800 CST

如何在 Ubuntu 18.04 (GNOME) 上清除天气位置

  • 4

在我的带有 GNOME 3.28 的 Ubuntu 18.04 系统上,我在顶部面板的日历中设置了下拉天气位置,以便它与gnome-weather应用程序一起检查我给定区域的天气信息。

然而,由于部分隐私问题并且也没有用,我想让它停止这样做。然而,gnome-weather界面似乎只允许更改位置,而不是完全删除和停止使用应用程序。

我不想删除应用程序,是否有“友好”的方式来执行此操作,或者我是否必须编辑配置文件或其他内容?

gnome calendar privacy weather 18.04
  • 1 个回答
  • 4592 Views
Martin Hope
Find Me In The Woods
Asked: 2014-06-01 11:05:10 +0800 CST

我的天气指示器不准确,无法在选项中选择 Wunder Ground

  • 5

我正在使用 My-Weather-Indicator,但它从来都不准确!Wunderground 选项被禁用,我无法选择它!我如何启用它?我正在使用 Ubuntu 14.04 LTS。

这是该菜单的样子。 请注意 Wunderground.com 框已禁用

“激活”是什么意思?

weather
  • 2 个回答
  • 2200 Views
Martin Hope
gumbo
Asked: 2011-04-30 13:06:19 +0800 CST

在 Ubuntu 11.04 的“当前时间栏”中再次查看天气 [重复]

  • 1
这个问题在这里已经有了答案:
11年前关闭。

可能重复:
是否有天气指示器?

好的,所以到目前为止,我可以直接在顶部面板中看到我所在城市的当前天气,包括在时间栏中。但是,随着更新,这不再可能。有没有办法恢复这个?

谢谢 :)

weather
  • 1 个回答
  • 1579 Views

Sidebar

Stats

  • 问题 205573
  • 回答 270741
  • 最佳答案 135370
  • 用户 68524
  • 热门
  • 回答
  • Marko Smith

    如何运行 .sh 脚本?

    • 16 个回答
  • Marko Smith

    如何安装 .tar.gz(或 .tar.bz2)文件?

    • 14 个回答
  • Marko Smith

    如何列出所有已安装的软件包

    • 24 个回答
  • Marko Smith

    无法锁定管理目录 (/var/lib/dpkg/) 是另一个进程在使用它吗?

    • 25 个回答
  • Martin Hope
    Flimm 如何在没有 sudo 的情况下使用 docker? 2014-06-07 00:17:43 +0800 CST
  • Martin Hope
    Ivan 如何列出所有已安装的软件包 2010-12-17 18:08:49 +0800 CST
  • Martin Hope
    La Ode Adam Saputra 无法锁定管理目录 (/var/lib/dpkg/) 是另一个进程在使用它吗? 2010-11-30 18:12:48 +0800 CST
  • Martin Hope
    David Barry 如何从命令行确定目录(文件夹)的总大小? 2010-08-06 10:20:23 +0800 CST
  • Martin Hope
    jfoucher “以下软件包已被保留:”为什么以及如何解决? 2010-08-01 13:59:22 +0800 CST
  • Martin Hope
    David Ashford 如何删除 PPA? 2010-07-30 01:09:42 +0800 CST

热门标签

10.10 10.04 gnome networking server command-line package-management software-recommendation sound xorg

Explore

  • 主页
  • 问题
    • 最新
    • 热门
  • 标签
  • 帮助

Footer

AskOverflow.Dev

关于我们

  • 关于我们
  • 联系我们

Legal Stuff

  • Privacy Policy

Language

  • Pt
  • Server
  • Unix

© 2023 AskOverflow.DEV All Rights Reserve