安装与配置方法
- 先在 Mac 上安装并打开 Glanceway,再使用上方的安装链接。
- 点击“安装到 Glanceway”。如果浏览器无法唤起应用,下载 .gwsrc 文件并在信息源管理中导入。
- 填写下列必填字段并保存,设置刷新间隔,等待首次成功获取。
配置检查
TAG— 可选. Filter by tag (e.g. javascript, python, webdev). Leave empty for all tags. 每个值分别作为一条列表项添加。
没有显示内容时如何排查
- 对照当前版本配置表核对字段、列表项和凭据。下方示例不包含可用的真实凭据。
- 检查网络与上游服务状态。认证失败或速率限制可能导致刷新失败,应根据上游限制调整间隔。
- 空列表也可能表示没有符合条件的条目。内容和更新时间取决于数据提供方及信息源实现。
配置项
| 名称 | 键 | 类型 | 必填 | 默认值 | 描述 |
|---|---|---|---|---|---|
| Tag | TAG | list | 否 | — | Filter by tag (e.g. javascript, python, webdev). Leave empty for all tags. |
源代码
id: codytseng/dev-to
version: 1.0.0
name: Dev.to
description: Top articles from Dev.to developer community
author: codytseng
author_url: https://github.com/codytseng
category: Developer
tags:
- dev
- articles
- programming
config:
- key: TAG
name: Tag
type: list
required: false
description: Filter by tag (e.g. javascript, python, webdev). Leave empty for all tags. id: codytseng/dev-to
version: 1.0.0
name: Dev.to
description: Top articles from Dev.to developer community
author: codytseng
author_url: https://github.com/codytseng
category: Developer
tags:
- dev
- articles
- programming
config:
- key: TAG
name: Tag
type: list
required: false
description: Filter by tag (e.g. javascript, python, webdev). Leave empty for all tags. module.exports = async (api) => {
const tags = api.config.get("TAG") ?? [];
async function fetchData() {
const toItems = (articles) =>
articles.map((article) => ({
id: article.id.toString(),
title: article.title,
subtitle: article.description || `${article.positive_reactions_count} reactions · ${article.comments_count} comments`,
url: article.url,
timestamp: article.published_at,
}));
if (tags.length > 0) {
const perPage = Math.min(500, Math.floor(500 / tags.length));
await Promise.allSettled(
tags.map(async (tag) => {
const res = await api.fetch(
`https://dev.to/api/articles?per_page=${perPage}&top=7&tag=${encodeURIComponent(tag)}`,
);
if (res.ok && res.json) {
api.emit(toItems(res.json));
}
}),
);
} else {
const res = await api.fetch(
"https://dev.to/api/articles?per_page=500&top=7",
);
if (!res.ok || !res.json) {
throw new Error(`Failed to fetch DEV articles (HTTP ${res.status})`);
}
api.emit(toItems(res.json));
}
}
await fetchData();
return {
refresh: fetchData,
};
}; module.exports = async (api) => {
const tags = api.config.get("TAG") ?? [];
async function fetchData() {
const toItems = (articles) =>
articles.map((article) => ({
id: article.id.toString(),
title: article.title,
subtitle: article.description || `${article.positive_reactions_count} reactions · ${article.comments_count} comments`,
url: article.url,
timestamp: article.published_at,
}));
if (tags.length > 0) {
const perPage = Math.min(500, Math.floor(500 / tags.length));
await Promise.allSettled(
tags.map(async (tag) => {
const res = await api.fetch(
`https://dev.to/api/articles?per_page=${perPage}&top=7&tag=${encodeURIComponent(tag)}`,
);
if (res.ok && res.json) {
api.emit(toItems(res.json));
}
}),
);
} else {
const res = await api.fetch(
"https://dev.to/api/articles?per_page=500&top=7",
);
if (!res.ok || !res.json) {
throw new Error(`Failed to fetch DEV articles (HTTP ${res.status})`);
}
api.emit(toItems(res.json));
}
}
await fetchData();
return {
refresh: fetchData,
};
}; 相关信息源
GitHub Notifications
开发者Get GitHub notifications in your menu bar. Supports filtering by repository.
#github #notifications #developer
GitHub Trending
开发者Trending repositories on GitHub
#github #trending #programming
Lobsters
开发者Hottest stories from Lobsters
#news #tech #programming
npm Trending
开发者Popular and trending packages on npm
#npm #packages #javascript