Skip to content

Commit 684d525

Browse files
committed
feat: initial userscript release
0 parents  commit 684d525

61 files changed

Lines changed: 9189 additions & 0 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/ci.yml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches:
6+
- "**"
7+
pull_request:
8+
9+
jobs:
10+
verify:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- name: Checkout
14+
uses: actions/checkout@v4
15+
- name: Setup pnpm
16+
uses: pnpm/action-setup@v4
17+
with:
18+
version: 10.30.2
19+
- name: Setup Node
20+
uses: actions/setup-node@v4
21+
with:
22+
node-version: 22
23+
cache: pnpm
24+
- name: Install
25+
run: pnpm install --frozen-lockfile
26+
- name: Verify
27+
run: pnpm verify

.github/workflows/release.yml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
name: Release
2+
3+
on:
4+
push:
5+
tags:
6+
- "v*"
7+
workflow_dispatch:
8+
9+
permissions:
10+
contents: write
11+
12+
jobs:
13+
release:
14+
runs-on: ubuntu-latest
15+
steps:
16+
- name: Checkout
17+
uses: actions/checkout@v4
18+
- name: Setup pnpm
19+
uses: pnpm/action-setup@v4
20+
with:
21+
version: 10.30.2
22+
- name: Setup Node
23+
uses: actions/setup-node@v4
24+
with:
25+
node-version: 22
26+
cache: pnpm
27+
- name: Install
28+
run: pnpm install --frozen-lockfile
29+
- name: Verify
30+
run: pnpm verify
31+
- name: Publish Release Assets
32+
uses: softprops/action-gh-release@v2
33+
with:
34+
generate_release_notes: true
35+
files: |
36+
dist/ccfrank.user.js
37+
dist/ccfrank.meta.js
38+
dist/checksums.txt

.gitignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
node_modules
2+
dist
3+
coverage
4+
.DS_Store
5+
docs/superpowers/

AGENTS.md

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
# AGENTS
2+
3+
## Maintenance Rules
4+
5+
- Treat [README.md](/home/pilot/projects/CCFrank/README.md) as user-facing documentation.
6+
- Keep `README.md` Chinese-first, with a concise English section after it.
7+
- Do not put upstream cursor or maintenance chatter into `README.md`.
8+
- Read [UPSTREAM.md](/home/pilot/projects/CCFrank/UPSTREAM.md) before doing any upstream comparison work.
9+
10+
## Upstream-Derived Areas
11+
12+
- Logic primarily derived from upstream behavior:
13+
- `src/core/*`
14+
- `src/sites/*`
15+
- `src/styles/*`
16+
- Generated data snapshot:
17+
- `src/data/generated/*`
18+
- Userscript-specific glue:
19+
- `src/env/*`
20+
- `src/meta/*`
21+
- `scripts/prepare-release.mjs`
22+
- `.github/workflows/*`
23+
24+
## Update Protocol
25+
26+
1. Read [UPSTREAM.md](/home/pilot/projects/CCFrank/UPSTREAM.md) and note the current upstream cursor.
27+
2. Review upstream commits after that cursor.
28+
3. Port only the changes that matter to this userscript repository.
29+
4. Run `pnpm verify`.
30+
5. Update [UPSTREAM.md](/home/pilot/projects/CCFrank/UPSTREAM.md) only after the review and verification are complete.
31+
6. Record user-facing release changes in [CHANGELOG.md](/home/pilot/projects/CCFrank/CHANGELOG.md).

CHANGELOG.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# Changelog
2+
3+
All notable changes to this repository will be documented in this file.
4+
5+
## [Unreleased]
6+
7+
- No unreleased changes yet.
8+
9+
## [0.1.0] - 2026-03-31
10+
11+
- Initial public release.
12+
- Userscript support for `dblp`, `Google Scholar`, `Connected Papers`, `Semantic Scholar`, and `Web of Science`.
13+
- Release packaging for `ccfrank.user.js`, `ccfrank.meta.js`, and `checksums.txt`.

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2026 brushax
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

README.en.md

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
# CCFrank Userscript
2+
3+
[中文](./README.md) | **English**
4+
5+
[![CI](https://github.com/brushax/ccfrank-userscript/actions/workflows/ci.yml/badge.svg?branch=main)](https://github.com/brushax/ccfrank-userscript/actions/workflows/ci.yml)
6+
[![Release](https://img.shields.io/github/v/release/brushax/ccfrank-userscript)](https://github.com/brushax/ccfrank-userscript/releases)
7+
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://github.com/brushax/ccfrank-userscript/blob/main/LICENSE)
8+
9+
UserScript version of [`WenyanLiu/CCFrank4dblp`](https://github.com/WenyanLiu/CCFrank4dblp), compatible with `Tampermonkey` and `Violentmonkey`, for showing `CCF` ranking badges on `dblp`, `Google Scholar`, `Connected Papers`, `Semantic Scholar`, and `Web of Science`.
10+
11+
[ccfrank.user.js](https://github.com/brushax/ccfrank-userscript/releases/latest/download/ccfrank.user.js) · [ccfrank.meta.js](https://github.com/brushax/ccfrank-userscript/releases/latest/download/ccfrank.meta.js) · [Releases](https://github.com/brushax/ccfrank-userscript/releases)
12+
13+
## Features
14+
15+
- Show `CCF` badges on supported academic sites
16+
- Keep the `dblp` rank filter for `ALL / CCF A / CCF B / CCF C`
17+
- Build an installable `ccfrank.user.js`
18+
- Build an update endpoint `ccfrank.meta.js`
19+
20+
## Installation
21+
22+
1. Install [ccfrank.user.js](https://github.com/brushax/ccfrank-userscript/releases/latest/download/ccfrank.user.js)
23+
2. Use [ccfrank.meta.js](https://github.com/brushax/ccfrank-userscript/releases/latest/download/ccfrank.meta.js) if you want a separate update URL
24+
3. See [Releases](https://github.com/brushax/ccfrank-userscript/releases) for other versions
25+
26+
## Development
27+
28+
```bash
29+
pnpm install
30+
pnpm verify
31+
```
32+
33+
Useful commands:
34+
35+
```bash
36+
pnpm lint
37+
pnpm typecheck
38+
pnpm test
39+
pnpm build
40+
```
41+
42+
Build outputs:
43+
44+
- `dist/ccfrank.user.js`
45+
- `dist/ccfrank.meta.js`
46+
- `dist/checksums.txt`

README.md

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
# CCFrank Userscript
2+
3+
**中文** | [English](./README.en.md)
4+
5+
[![CI](https://github.com/brushax/ccfrank-userscript/actions/workflows/ci.yml/badge.svg?branch=main)](https://github.com/brushax/ccfrank-userscript/actions/workflows/ci.yml)
6+
[![Release](https://img.shields.io/github/v/release/brushax/ccfrank-userscript)](https://github.com/brushax/ccfrank-userscript/releases)
7+
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://github.com/brushax/ccfrank-userscript/blob/main/LICENSE)
8+
9+
[`WenyanLiu/CCFrank4dblp`](https://github.com/WenyanLiu/CCFrank4dblp) 的 UserScript 版本,兼容 `Tampermonkey``Violentmonkey`,面向 `dblp``Google Scholar``Connected Papers``Semantic Scholar``Web of Science` 显示 `CCF` 排名徽标。
10+
11+
[ccfrank.user.js](https://github.com/brushax/ccfrank-userscript/releases/latest/download/ccfrank.user.js) · [ccfrank.meta.js](https://github.com/brushax/ccfrank-userscript/releases/latest/download/ccfrank.meta.js) · [Releases](https://github.com/brushax/ccfrank-userscript/releases)
12+
13+
## 功能
14+
15+
- 在支持站点上显示会议或期刊的 `CCF` 排名徽标
16+
- 保留 `dblp` 页面上的 `ALL / CCF A / CCF B / CCF C` 过滤能力
17+
- 生成可直接安装的 `ccfrank.user.js`
18+
- 生成用于更新检测的 `ccfrank.meta.js`
19+
20+
## 支持站点
21+
22+
- `dblp`
23+
- `Google Scholar`
24+
- `Connected Papers`
25+
- `Semantic Scholar`
26+
- `Web of Science`
27+
28+
## 安装
29+
30+
1. 安装 [ccfrank.user.js](https://github.com/brushax/ccfrank-userscript/releases/latest/download/ccfrank.user.js)
31+
2. 需要单独的更新链接时,可以使用 [ccfrank.meta.js](https://github.com/brushax/ccfrank-userscript/releases/latest/download/ccfrank.meta.js)
32+
3. 其他版本见 [Releases](https://github.com/brushax/ccfrank-userscript/releases)
33+
34+
## 开发
35+
36+
```bash
37+
pnpm install
38+
pnpm verify
39+
```
40+
41+
常用命令:
42+
43+
```bash
44+
pnpm lint
45+
pnpm typecheck
46+
pnpm test
47+
pnpm build
48+
```
49+
50+
构建产物:
51+
52+
- `dist/ccfrank.user.js`
53+
- `dist/ccfrank.meta.js`
54+
- `dist/checksums.txt`

UPSTREAM.md

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# Upstream Cursor
2+
3+
This file records the current upstream review cursor for maintainers and agents.
4+
5+
## Source
6+
7+
- Upstream repository: `https://github.com/WenyanLiu/CCFrank4dblp`
8+
- Upstream branch: `master`
9+
10+
## Current Cursor
11+
12+
- Last reviewed upstream commit: `82873e8280f3e07c798daa00e622958070c4a7eb`
13+
- Commit date: `2026-03-16T09:33:53Z`
14+
- Commit message: `Update CCF rankings to 2026 version`
15+
- Reviewed on: `2026-03-31`
16+
17+
## Compare Link
18+
19+
- `https://github.com/WenyanLiu/CCFrank4dblp/compare/82873e8280f3e07c798daa00e622958070c4a7eb...master`
20+
21+
## Maintenance Notes
22+
23+
- Treat this commit as the baseline already reviewed by this repository.
24+
- For the next maintenance pass, start from commits after this SHA.
25+
- Move the cursor only after relevant changes are ported and `pnpm verify` passes.

eslint.config.js

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
import js from "@eslint/js";
2+
import tseslint from "typescript-eslint";
3+
import eslintConfigPrettier from "eslint-config-prettier";
4+
5+
export default tseslint.config(
6+
{
7+
ignores: ["dist/**", "node_modules/**", "coverage/**"],
8+
},
9+
js.configs.recommended,
10+
...tseslint.configs.recommended,
11+
eslintConfigPrettier,
12+
{
13+
files: ["scripts/**/*.mjs"],
14+
languageOptions: {
15+
globals: {
16+
process: "readonly",
17+
},
18+
},
19+
},
20+
{
21+
files: ["**/*.ts"],
22+
rules: {
23+
"@typescript-eslint/no-explicit-any": "off",
24+
},
25+
},
26+
);

0 commit comments

Comments
 (0)