安裝與設定方式
- 先在 Mac 上安裝並開啟 Glanceway,再使用上方的安裝連結。
- 點選「安裝到 Glanceway」。若瀏覽器無法開啟應用程式,下載 .gwsrc 檔案並在資訊源管理中匯入。
- 填寫以下必填欄位並儲存,設定更新間隔,等待首次成功取得內容。
設定檢查
TAG— 選填. タグでフィルター(例:Python, JavaScript, React)。空欄の場合は全タグの人気記事を表示します。 每個值分別作為一個清單項目新增。
沒有顯示內容時如何排查
- 對照目前版本設定表檢查欄位、清單項目與憑證。下方範例不包含可用的真實憑證。
- 檢查網路及上游服務狀態。認證失敗或速率限制可能使更新失敗,請依上游限制調整間隔。
- 空清單也可能代表沒有符合條件的條目。內容與更新時間取決於資料提供方及資訊源實作。
設定項目
| 名稱 | 鍵 | 類型 | 必填 | 預設值 | 描述 |
|---|---|---|---|---|---|
| タグ | TAG | list | 否 | — | タグでフィルター(例:Python, JavaScript, React)。空欄の場合は全タグの人気記事を表示します。 |
原始碼
id: codytseng/qiita
version: 1.0.0
name: Qiita
description: 日本最大の開発者向け技術記事プラットフォーム Qiita の人気記事
author: codytseng
author_url: https://github.com/codytseng
category: Developer
tags:
- qiita
- japanese
- tech
- articles
config:
- key: TAG
name: タグ
type: list
required: false
description: タグでフィルター(例:Python, JavaScript, React)。空欄の場合は全タグの人気記事を表示します。 id: codytseng/qiita
version: 1.0.0
name: Qiita
description: 日本最大の開発者向け技術記事プラットフォーム Qiita の人気記事
author: codytseng
author_url: https://github.com/codytseng
category: Developer
tags:
- qiita
- japanese
- tech
- articles
config:
- key: TAG
name: タグ
type: list
required: false
description: タグでフィルター(例:Python, JavaScript, React)。空欄の場合は全タグの人気記事を表示します。 module.exports = async (api) => {
const tags = api.config.get("TAG") ?? [];
async function fetchData() {
const toItems = (articles) =>
articles.map((article) => ({
id: article.id,
title: article.title,
subtitle:
article.body?.slice(0, 120)?.replace(/\n/g, " ") ||
`${article.likes_count} いいね · @${article.user.id}`,
url: article.url,
timestamp: article.created_at,
}));
if (tags.length > 0) {
const perPage = Math.min(100, Math.floor(500 / tags.length));
await Promise.allSettled(
tags.map(async (tag) => {
const res = await api.fetch(
`https://qiita.com/api/v2/tags/${encodeURIComponent(tag)}/items?per_page=${perPage}&page=1`,
);
if (res.ok && res.json) {
api.emit(toItems(res.json));
}
}),
);
} else {
const res = await api.fetch(
"https://qiita.com/api/v2/items?per_page=100&page=1",
);
if (!res.ok || !res.json) {
throw new Error(`Failed to fetch Qiita 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,
title: article.title,
subtitle:
article.body?.slice(0, 120)?.replace(/\n/g, " ") ||
`${article.likes_count} いいね · @${article.user.id}`,
url: article.url,
timestamp: article.created_at,
}));
if (tags.length > 0) {
const perPage = Math.min(100, Math.floor(500 / tags.length));
await Promise.allSettled(
tags.map(async (tag) => {
const res = await api.fetch(
`https://qiita.com/api/v2/tags/${encodeURIComponent(tag)}/items?per_page=${perPage}&page=1`,
);
if (res.ok && res.json) {
api.emit(toItems(res.json));
}
}),
);
} else {
const res = await api.fetch(
"https://qiita.com/api/v2/items?per_page=100&page=1",
);
if (!res.ok || !res.json) {
throw new Error(`Failed to fetch Qiita articles (HTTP ${res.status})`);
}
api.emit(toItems(res.json));
}
}
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