🤡我知道您急,您先别急,这是有bug的,我还没改完,我就想换台设备来写

This commit is contained in:
2024-07-20 22:43:54 +08:00
parent d0d347e4e3
commit fe8f6bd443
120 changed files with 4965 additions and 3069 deletions

View File

@ -0,0 +1,12 @@
weather.monday=Mon
weather.tuesday=Tue
weather.wednesday=Wed
weather.thursday=Thu
weather.friday=Fri
weather.saturday=Sat
weather.sunday=Sun
weather.day=Day
weather.night=Night
weather.today=Today
weather.tomorrow=Tomorrow
weather.no_aqi=No AQI data

View File

@ -0,0 +1,12 @@
weather.monday=月
weather.tuesday=火
weather.wednesday=水
weather.thursday=木
weather.friday=金
weather.saturday=土
weather.sunday=日
weather.day=昼
weather.night=夜
weather.today=今日
weather.tomorrow=明日
weather.no_aqi=空気質データなし

View File

@ -0,0 +1,12 @@
weather.monday=周一
weather.tuesday=周二
weather.wednesday=周三
weather.thursday=周四
weather.friday=周五
weather.saturday=周六
weather.sunday=周日
weather.day=白天
weather.night=夜晚
weather.today=今天
weather.tomorrow=明天
weather.no_aqi=暂无AQI数据

View File

@ -0,0 +1,3 @@
name: 轻雪天气资源包
description: For Liteyuki Weather
version: 2024.4.26

View File

@ -0,0 +1,184 @@
:root {
--main-text-color: #fff;
--sub-text-color: #ccc;
--tip-text-color: #999;
--device-info-width: 240px;
--sub-border-radius: 60px;
}
#weather-info {
color: white;
/*justify-content: center;*/
/*align-items: center;*/
/*align-content: center;*/
}
.icon {
/* icon 类img阴影*/
filter: drop-shadow(1px 1px 10px #00000044);
}
#main-info {
display: flex;
justify-content: center;
align-items: center;
}
#main-left {
display: flex;
justify-content: flex-end;
width: 50%;
}
#main-right {
width: 50%;
}
#time {
font-size: 25px;
font-weight: bold;
font-style: italic;
text-align: right;
color: var(--sub-text-color);
}
#adm {
font-size: 32px;
font-weight: bold;
text-align: center;
color: var(--sub-text-color);
}
#city {
margin-top: 20px;
font-size: 70px;
font-weight: bold;
text-align: center;
}
#temperature {
display: flex;
align-items: baseline;
}
#temperature-now {
font-size: 70px;
font-weight: bold;
}
#temperature-range {
font-size: 40px;
font-weight: bold;
color: var(--sub-text-color);
}
#description {
font-size: 50px;
font-weight: bold;
}
#aqi {
height: 50px;
display: flex;
border-radius: 60px;
padding: 5px;
font-size: 40px;
text-align: center;
align-content: center;
align-items: center;
justify-content: center;
}
#aqi-dot {
height: 80%;
aspect-ratio: 1 / 1;
border-radius: 50%;
background-color: var(--sub-text-color);
margin-right: 20px;
}
.main-icon {
width: 240px;
height: 240px;
}
#hours-info {
display: flex;
justify-content: space-between;
}
.hourly-item {
text-align: center;
background-color: #ffffff44;
border-radius: var(--sub-border-radius);
align-items: center;
padding: 20px 10px;
}
.hourly-icon{
width: 80%;
margin-bottom: 20px;
}
.hourly-temperature {
text-align: center;
color: var(--main-text-color);
font-size: 30px;
margin-bottom: 20px;
}
.hourly-time {
text-align: center;
color: var(--main-text-color);
font-size: 25px;
margin-bottom: 10px;
}
/**/
.daily-item {
display: flex;
position: relative;
justify-content: space-between;
align-items: center;
background-color: #ffffff44;
height: 90px;
border-radius: var(--sub-border-radius);
margin-bottom: 20px;
padding: 0 30px;
}
/*最后一个没有margin_button*/
.daily-item:last-child {
margin-bottom: 0;
}
.icon-day {
position: absolute;
left: 60%;
height: 80px;
}
.icon-night {
position: absolute;
left: 70%;
height: 80px;
}
.daily-weather{
position: absolute;
left: 30%;
}
.daily-temperature{
position: absolute;
left: 83%;
}
.daily-day, .daily-weather, .daily-temperature {
text-align: center;
color: var(--main-text-color);
font-size: 30px;
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.3 KiB

View File

@ -0,0 +1,125 @@
/**
* @typedef {Object} Location
* @property {string} city - The city name.
* @property {string} country - The country name.
*
* @typedef {Object} Weather
* @property {number} temperature - The current temperature.
* @property {string} description - The weather description.
*
* @typedef {Object} Data
* @property {Location} location - The location data.
* @property {Weather} weather - The weather data.
*/
/** @type {Data} */
let data = JSON.parse(document.getElementById("data").innerText)
let localData = data["localization"] // 本地化数据
let weatherNow = data["weatherNow"]
let weatherDaily = data["weatherDaily"]
let weatherHourly = data["weatherHourly"]
let aqi = data["aqi"]
let locationData = data["location"]
// 处理aqi
let aqiValue = 0
if ("aqi" in aqi) {
aqi["aqi"].forEach(
(item) => {
if (item["defaultLocalAqi"]) {
document.getElementById("aqi-data").innerText = "AQI " + item["valueDisplay"] + " " + item["category"]
// 将(255,255,255)这种格式的颜色设置给css
document.getElementById("aqi-dot").style.backgroundColor = "rgb(" + item["color"] + ")"
}
}
)
} else {
document.getElementById("aqi-dot").style.backgroundColor = '#fff'
document.getElementById("aqi-data").innerText = localData['no_aqi']
}
templates = {
"time": weatherNow["now"]["obsTime"],
"city": locationData["name"],
"adm": locationData["country"] + " " + locationData["adm1"] + " " + locationData["adm2"],
"temperature-now": weatherNow["now"]["temp"] + "°",
"temperature-range": weatherDaily["daily"][0]["tempMin"] + "°/" + weatherDaily["daily"][0]["tempMax"] + "°",
"description": weatherNow["now"]["text"]
}
// 遍历每一个id给其赋值
for (let id in templates) {
document.getElementById(id).innerText = templates[id]
}
let maxHourlyItem = 8
let percentWidth = 1 / (maxHourlyItem * 1.5) * 100
let hourlyStep = 2 // n小时一个数据
let hourlyCount = 0
let hourlyItemDivTemplate = document.importNode(document.getElementById("hourly-item-template").content, true)
weatherHourly['hourly'].forEach(
(item, index) => {
if (index % hourlyStep !== 0) {
return
}
if (hourlyCount >= maxHourlyItem) {
return
}
let hourlyItemDiv = document.importNode(hourlyItemDivTemplate, true)
hourlyItemDiv.className = "hourly-item"
hourlyItemDiv.querySelector('.hourly-icon').setAttribute("src", `./img/qw_icon/${item["icon"]}.png`)
hourlyItemDiv.querySelector('.hourly-time').innerText = get_time_hour(item["fxTime"])
hourlyItemDiv.querySelector('.hourly-temperature').innerText = " " + item["temp"] + "°"
// 设置最大宽度
hourlyItemDiv.querySelector('.hourly-item').style.maxWidth = percentWidth + "%"
hourlyItemDiv.querySelector('.hourly-icon').style.maxWidth = "100%"
document.getElementById("hours-info").appendChild(hourlyItemDiv)
hourlyCount++
}
)
let maxDailyItem = 7
// 第一和第二天用today和tomorrow后面用星期X英文小写
let daysStandard = ['sunday', 'monday', 'tuesday', 'wednesday', 'thursday', 'friday', 'saturday']
let todayDay = new Date().getDay()
let days = [localData['today'], localData['tomorrow']]
for (let i = 0; i < 5; i++) {
days.push(localData[daysStandard[(todayDay + 2 + i) % 7]])
}
let dailyItemDivTemplate = document.importNode(document.getElementById("daily-item-template").content, true)
weatherDaily['daily'].forEach(
(item, index) => {
if (index >= maxDailyItem) {
return
}
let today = days[index]
if (index >= 2) {
today += `(${item["fxDate"].split("-")[1]}.${item["fxDate"].split("-")[2]})`
}
let dailyItemDiv = document.importNode(dailyItemDivTemplate, true)
dailyItemDiv.querySelector('.icon-day').setAttribute("src", `./img/qw_icon/${item["iconDay"]}.png`)
dailyItemDiv.querySelector('.icon-night').setAttribute("src", `./img/qw_icon/${item["iconNight"]}.png`)
dailyItemDiv.querySelector('.daily-day').innerText = today
dailyItemDiv.querySelector('.daily-weather').innerText = item["textDay"]
dailyItemDiv.querySelector('.daily-temperature').innerText = item["tempMin"] + "°~" + item["tempMax"] + "°"
document.getElementById('days-info').appendChild(dailyItemDiv)
}
)
function get_time_hour(fxTime) {
// fxTime 2024-05-03T02:00+/-08:00'
fxTime = fxTime.replace("-", "+")
return fxTime.split("T")[1].split("+")[0]
}

View File

@ -0,0 +1,76 @@
<!DOCTYPE html>
<html lang="zh" xmlns="http://www.w3.org/1999/html">
<head>
<meta charset="UTF-8">
<title>Liteyuki Status</title>
<link rel="stylesheet" href="./css/card.css">
<link rel="stylesheet" href="./css/fonts.css">
<link rel="stylesheet" href="css/weather_now.css">
</head>
<!-- qw_icon: https://a.hecdn.net/img/common/icon/202106d/%d.png-->
<body>
<template id="hourly-item-template">
<div class="hourly-item">
<img class="hourly-icon icon" src="./img/qw_icon/101.png" alt="WeatherIcon">
<div class="hourly-temperature">90°</div>
<!-- <div class="hourly-windDir">None</div>-->
<div class="hourly-time">02:00</div>
</div>
</template>
<template id="daily-item-template">
<div class="daily-item">
<div class="daily-day">
周八
</div>
<div class="daily-weather">
小水
</div>
<img class="daily-icon icon-day icon" src="./img/qw_icon/101.png" alt="WeatherIcon">
<img class="daily-icon icon-night icon" src="./img/qw_icon/101.png" alt="WeatherIcon">
<div class="daily-temperature">
12°~23°
</div>
</div>
</template>
<template id="sub-info-template">
</template>
<div class="data-storage" id="data">{{ data | tojson }}</div>
<div class="info-box" id="weather-info">
<div id="detail-info">
<div id="time">2045-01-12 22:22:22</div>
<div id="adm">枫丹 白露 白露区</div>
<div id="city">白露区</div>
</div>
<div id="main-info">
<div id="main-left">
<img class="main-icon icon" src="./img/qw_icon/101.png" alt="WeatherIcon">
</div>
<div id="main-right">
<div id="temperature">
<div id="temperature-now">
90°
</div>
<div id="temperature-range">
10°~90°
</div>
</div>
<div id="description">
示例天气
</div>
</div>
</div>
<div id="aqi">
<div id="aqi-dot"></div>
<div id="aqi-data"> AQI 114 优</div>
</div>
</div>
<div class="info-box" id="sub-info"></div>
<div class="info-box" id="hours-info"></div>
<div class="info-box" id="days-info"></div>
<script src="./js/card.js"></script>
<script src="./js/weather_now.js"></script>
</body>

View File

@ -0,0 +1,3 @@
name: 轻雪词库-可爱系
description: For Liteyuki Auto Reply
version: 2024.4.26

View File

@ -0,0 +1,19 @@
The MIT License (MIT)
Copyright (c) 2020 NoneBot Team
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
the Software, and to permit persons to whom the Software is furnished to do so,
subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

View File

@ -0,0 +1,31 @@
# 这是什么 | What's this
一个特~~二刺螈~~文爱的适用于任何bot的词库<br>
好像有点涩?(不止一点
## 一些使用建议 | Using advices
- 词库返回中的“你”可替换成目标昵称。同理“我”也可替换成bot的昵称
- 如需使用分词建议匹配无结果时将本词库key打乱放回原句遍历判断
## 相关项目 | Related projects
> 欢迎提交pr以明示使用本词库的项目
- [MoeChat](https://github.com/Fzoss/MoeChat) 聊天UI
- [ATRI](https://github.com/Kyomotoi/ATRI) 高性能萝卜子!
- [绪山真寻Bot](https://github.com/HibiKier/zhenxun_bot) 非常可爱的绪山真寻bot
- [ZeroBot-Plugin](https://github.com/FloatTech/ZeroBot-Plugin) 基于 ZeroBot 的 OneBot 插件
- [Liteyuki Bot](https://github.com/snowyfirefly/Liteyuki-Bot) 非常可爱的,有独立思维(雾)的轻雪Bot
- [kmua bot](https://github.com/krau/kmua-bot) Telegram 上的可爱文爱 bot
## 贡献 | Contribute
只要你的词和回复够味,都可以向此库提交!
## 许可 | License
本项目使用 MIT
![](https://cdn.jsdelivr.net/gh/Kyomotoi/CDN@master/noting/88674944_p0.png)

File diff suppressed because it is too large Load Diff