安装与配置方法
- 先在 Mac 上安装并打开 Glanceway,再使用上方的安装链接。
- 点击“安装到 Glanceway”。如果浏览器无法唤起应用,下载 .gwsrc 文件并在信息源管理中导入。
- 填写下列必填字段并保存,设置刷新间隔,等待首次成功获取。
配置检查
TAG— 可选. Filter by tag (e.g. javascript, python, react). Leave empty for all tags. 每个值分别作为一条列表项添加。SORT— 可选. Sort order for questions
没有显示内容时如何排查
- 对照当前版本配置表核对字段、列表项和凭据。下方示例不包含可用的真实凭据。
- 检查网络与上游服务状态。认证失败或速率限制可能导致刷新失败,应根据上游限制调整间隔。
- 空列表也可能表示没有符合条件的条目。内容和更新时间取决于数据提供方及信息源实现。
配置项
| 名称 | 键 | 类型 | 必填 | 默认值 | 描述 |
|---|---|---|---|---|---|
| Tag | TAG | list | 否 | — | Filter by tag (e.g. javascript, python, react). Leave empty for all tags. |
| Sort | SORT | select | 否 | hot | Sort order for questions hotactivityvotescreationweekmonth |
源代码
id: codytseng/stackoverflow-hot
version: 1.0.0
name: StackOverflow Hot
description: Hot questions from StackOverflow
author: codytseng
author_url: https://github.com/codytseng
category: Developer
tags:
- stackoverflow
- programming
- qa
config:
- key: TAG
name: Tag
type: list
required: false
description: Filter by tag (e.g. javascript, python, react). Leave empty for all tags.
- key: SORT
name: Sort
type: select
required: false
default: hot
description: Sort order for questions
options:
- hot
- activity
- votes
- creation
- week
- month id: codytseng/stackoverflow-hot
version: 1.0.0
name: StackOverflow Hot
description: Hot questions from StackOverflow
author: codytseng
author_url: https://github.com/codytseng
category: Developer
tags:
- stackoverflow
- programming
- qa
config:
- key: TAG
name: Tag
type: list
required: false
description: Filter by tag (e.g. javascript, python, react). Leave empty for all tags.
- key: SORT
name: Sort
type: select
required: false
default: hot
description: Sort order for questions
options:
- hot
- activity
- votes
- creation
- week
- month module.exports = async (api) => {
const tags = api.config.get("TAG") ?? [];
const sort = api.config.get("SORT") || "hot";
async function fetchData() {
const toItems = (questions) =>
questions.map((q) => ({
id: q.question_id.toString(),
title: q.title,
subtitle: `${q.score} votes · ${q.answer_count} answers · ${q.tags.slice(0, 3).join(", ")}`,
url: q.link,
timestamp: q.creation_date,
}));
if (tags.length > 0) {
const pageSize = Math.min(100, Math.floor(500 / tags.length));
await Promise.allSettled(
tags.map(async (tag) => {
const res = await api.fetch(
`https://api.stackexchange.com/2.3/questions?order=desc&sort=${sort}&site=stackoverflow&pagesize=${pageSize}&tagged=${encodeURIComponent(tag)}`,
);
if (res.ok && res.json) {
api.emit(toItems(res.json.items));
}
}),
);
} else {
const res = await api.fetch(
`https://api.stackexchange.com/2.3/questions?order=desc&sort=${sort}&site=stackoverflow&pagesize=100`,
);
if (!res.ok || !res.json) {
throw new Error(`Failed to fetch Stack Overflow questions (HTTP ${res.status})`);
}
api.emit(toItems(res.json.items));
}
}
await fetchData();
return {
refresh: fetchData,
};
}; module.exports = async (api) => {
const tags = api.config.get("TAG") ?? [];
const sort = api.config.get("SORT") || "hot";
async function fetchData() {
const toItems = (questions) =>
questions.map((q) => ({
id: q.question_id.toString(),
title: q.title,
subtitle: `${q.score} votes · ${q.answer_count} answers · ${q.tags.slice(0, 3).join(", ")}`,
url: q.link,
timestamp: q.creation_date,
}));
if (tags.length > 0) {
const pageSize = Math.min(100, Math.floor(500 / tags.length));
await Promise.allSettled(
tags.map(async (tag) => {
const res = await api.fetch(
`https://api.stackexchange.com/2.3/questions?order=desc&sort=${sort}&site=stackoverflow&pagesize=${pageSize}&tagged=${encodeURIComponent(tag)}`,
);
if (res.ok && res.json) {
api.emit(toItems(res.json.items));
}
}),
);
} else {
const res = await api.fetch(
`https://api.stackexchange.com/2.3/questions?order=desc&sort=${sort}&site=stackoverflow&pagesize=100`,
);
if (!res.ok || !res.json) {
throw new Error(`Failed to fetch Stack Overflow questions (HTTP ${res.status})`);
}
api.emit(toItems(res.json.items));
}
}
await fetchData();
return {
refresh: fetchData,
};
}; 相关信息源
Dev.to
开发者Top articles from Dev.to developer community
#dev #articles #programming
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