Coder Social home page Coder Social logo

wmillers / kindleweatherclock Goto Github PK

View Code? Open in Web Editor NEW
5.0 1.0 0.0 6.66 MB

JS + GO: Kindle 时间显示、天气预报、番茄时钟、滴答清单、哔哩哔直播弹幕 & 播放、智能家居Hue。适配KPW3。

License: GNU Lesser General Public License v2.1

HTML 46.45% Go 7.08% JavaScript 46.46%
kindle tomato-clock tomato-timer ticktick-list bilibili-live kpw3 home-smart philips-hue

kindleweatherclock's Introduction

GitHub release GitHub commit activity last_commit
中文 | 英文

介绍

前言:多功能 Kindle 页面的部分功能由于部署在服务端所以额外需要安装,请务必阅读本文“可选-需要手动部署”段修改并应用附带的nginx.conf实例文件。

功能包括时间显示、天气预报、番茄时钟、滴答清单、哔哩哔直播弹幕 & 播放、智能家居Hue。屏幕尺寸适配KPW3,如有需要可以自行调整css。

功能

模块名 默认 使用方式
时间显示 -
天气预报 -
番茄时钟 15:工作/休息模式切换, 04:暂停,同步时间:退出
滴答清单 × 左上角番茄图标
哔哩哔哩直播弹幕 × 1月2日左侧的空白处
哔哩哔哩直播播放(其他系统专属) × 在网址后添加 #danmuonly
智能家居Hue √× 右上角的空白区域
额外(1.校准时间 2.获取运行时长 3.运行命令/手动调时 4.禁用模块) 1.TOMA 2.MATO 3.1月2日 星期一 4.在cw.htm文件第14行Line14~起注释Comment模块以禁用Disable

功能示意

tickList home
15:04
danmu TOMAMATO
1月2日 星期一

====weather====
同步时间:2006-01-02 15:04:05 完成上一次同步

可选-需要手动部署

功能表中打勾项表示无需额外安装,Kindle中打开网页即可使用,打叉项表示该功能需要额外安装(Nginx服务端)。

滴答清单

由于浏览器跨域限制,需要反向代理滴答清单订阅网址。

将该代码前注释中的location /ics/ {..}代码复制到Nginx配置文件中,并修改https://xxx/basic.ics处的网址为你的滴答清单任务订阅网址。另外请将//TIMEZONE-NOTE所在行的时区信息DTSTART;TZID=修改为滴答清单使用的。

哔哩哔哩 直播弹幕 & 播放器

原有 python 实现的服务端转换为由 go 实现,由于斗鱼/虎牙/网易直播的库未被实现,因此仅保留了对哔哩哔哩直播的支持

使用 Akegarasu/blivedm-go@Github 作为接收包含礼物的哔哩哔哩弹幕库支持(原库不支持调用,如果有需要,可以使用调整后的版本github.com/wmillers/blivedm-go)。

备注:全屏播放器功能用于替代哔哩哔哩原生直播间,优点是即使在低功耗设备上也可以流畅运行。全屏功能(不是全窗口功能)为其他系统的浏览器中所属功能,开启方法为在网址后添加#danmuOnly()或者点击星期栏输入danmuOnly()

根据cw.htm文件弹幕功能代码段前的注释安装依赖。将location /blive/ {..}中内容复制到Nginx配置文件中。进入blivedm文件夹,python3 startBliveServer.py运行弹幕获取服务端。如果要修改内置的房间号,搜索var streamer,在数组[1]中加入房间数字id(可选:数组[0]中对应索引填写主播名)。

智能家居 Hue

适配飞利浦Hue智能家居的开关。Hue中继桥的api自带CORS跨域操作头,可以不需要手动代理,但是为了稳定性,此处仍然提供手动代理的步骤:将该代码前注释中的location /hue/ {..}代码复制到Nginx配置文件中。如果不需要手动代理,则将网页代码中hueBaseUrl变量修改为//philips-hue/api/

为获取api授权操作码,按下Hue中继桥的配对按钮,在本页运行hReg(),记录返回的凭证,并手动修改页面文件Basic Settings中变量hueToken为该值。

kindleweatherclock's People

Contributors

dependabot[bot] avatar wmillers avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.