Skip to content

Commit 9cdca61

Browse files
committed
oxo
0 parents  commit 9cdca61

File tree

20 files changed

+2319
-0
lines changed

20 files changed

+2319
-0
lines changed

.github/workflows/deploy.yml

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
name: Deploy to GitHub Pages
2+
3+
on:
4+
push:
5+
branches: [ main, master ]
6+
workflow_dispatch:
7+
8+
permissions: write-all
9+
10+
env:
11+
VOD_CATES: "1"
12+
13+
jobs:
14+
build-and-deploy:
15+
runs-on: ubuntu-latest
16+
17+
steps:
18+
- name: Checkout repository
19+
uses: actions/checkout@v4
20+
with:
21+
fetch-depth: 0
22+
23+
- name: Setup Bun
24+
uses: oven-sh/setup-bun@v1
25+
with:
26+
bun-version: latest
27+
28+
- name: Install dependencies
29+
run: bun install
30+
31+
- name: Generate configuration file
32+
run: |
33+
bunx kitty-parse -o x.json
34+
bun run vod.ts vod.json xvod.json
35+
bun run t4.ts t4.json
36+
bun run pages.ts index.html
37+
38+
- name: Prepare deployment directory
39+
run: |
40+
mkdir -p deploy
41+
cp x.json vod.json xvod.json t4.json index.html deploy/
42+
43+
- name: Deploy to GitHub Pages
44+
uses: peaceiris/actions-gh-pages@v3
45+
with:
46+
github_token: ${{ secrets.GITHUB_TOKEN }}
47+
publish_dir: deploy
48+
publish_branch: gh-pages
49+
force_orphan: true
50+
keep_files: false
51+
commit_message: 'Deploy: Update configuration file'
52+
user_name: 'github-actions[bot]'
53+
user_email: 'github-actions[bot]@users.noreply.github.com'

.gitignore

Lines changed: 146 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,146 @@
1+
# Logs
2+
logs
3+
*.log
4+
npm-debug.log*
5+
yarn-debug.log*
6+
yarn-error.log*
7+
lerna-debug.log*
8+
9+
# Diagnostic reports (https://nodejs.org/api/report.html)
10+
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json
11+
12+
# Runtime data
13+
pids
14+
*.pid
15+
*.seed
16+
*.pid.lock
17+
18+
# Directory for instrumented libs generated by jscoverage/JSCover
19+
lib-cov
20+
21+
# Coverage directory used by tools like istanbul
22+
coverage
23+
*.lcov
24+
25+
# nyc test coverage
26+
.nyc_output
27+
28+
# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)
29+
.grunt
30+
31+
# Bower dependency directory (https://bower.io/)
32+
bower_components
33+
34+
# node-waf configuration
35+
.lock-wscript
36+
37+
# Compiled binary addons (https://nodejs.org/api/addons.html)
38+
build/Release
39+
40+
# Dependency directories
41+
node_modules/
42+
jspm_packages/
43+
44+
# Snowpack dependency directory (https://snowpack.dev/)
45+
web_modules/
46+
47+
# TypeScript cache
48+
*.tsbuildinfo
49+
50+
# Optional npm cache directory
51+
.npm
52+
53+
# Optional eslint cache
54+
.eslintcache
55+
56+
# Optional stylelint cache
57+
.stylelintcache
58+
59+
# Optional REPL history
60+
.node_repl_history
61+
62+
# Output of 'npm pack'
63+
*.tgz
64+
65+
# Yarn Integrity file
66+
.yarn-integrity
67+
68+
# dotenv environment variable files
69+
.env
70+
.env.*
71+
!.env.example
72+
73+
# parcel-bundler cache (https://parceljs.org/)
74+
.cache
75+
.parcel-cache
76+
77+
# Next.js build output
78+
.next
79+
out
80+
81+
# Nuxt.js build / generate output
82+
.nuxt
83+
dist
84+
.output
85+
86+
# Gatsby files
87+
.cache/
88+
# Comment in the public line in if your project uses Gatsby and not Next.js
89+
# https://nextjs.org/blog/next-9-1#public-directory-support
90+
# public
91+
92+
# vuepress build output
93+
.vuepress/dist
94+
95+
# vuepress v2.x temp and cache directory
96+
.temp
97+
.cache
98+
99+
# Sveltekit cache directory
100+
.svelte-kit/
101+
102+
# vitepress build output
103+
**/.vitepress/dist
104+
105+
# vitepress cache directory
106+
**/.vitepress/cache
107+
108+
# Docusaurus cache and generated files
109+
.docusaurus
110+
111+
# Serverless directories
112+
.serverless/
113+
114+
# FuseBox cache
115+
.fusebox/
116+
117+
# DynamoDB Local files
118+
.dynamodb/
119+
120+
# Firebase cache directory
121+
.firebase/
122+
123+
# TernJS port file
124+
.tern-port
125+
126+
# Stores VSCode versions used for testing VSCode extensions
127+
.vscode-test
128+
129+
# yarn v3
130+
.pnp.*
131+
.yarn/*
132+
!.yarn/patches
133+
!.yarn/plugins
134+
!.yarn/releases
135+
!.yarn/sdks
136+
!.yarn/versions
137+
138+
# Vite files
139+
vite.config.js.timestamp-*
140+
vite.config.ts.timestamp-*
141+
.vite/
142+
143+
bun.lock
144+
package-lock.json
145+
result.json
146+
*.html

README.md

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
# @d1y/kitty
2+
3+
仅仅用于展示小猫源编写,方便参考
4+
5+
![Image 350x314.gif](https://s2.loli.net/2025/10/12/EVSOIbTzfWkoNB7.gif)
6+
7+
```bash
8+
bun install
9+
bunx kitty-parse -o result.json
10+
```
11+
12+
订阅地址:
13+
14+
- JS: https://d1y.github.io/kitty/x.json
15+
- vod: https://d1y.github.io/kitty/vod.json
16+
- xvod: https://d1y.github.io/kitty/xvod.json
17+
- t4: https://d1y.github.io/kitty/t4.json
18+
19+
```log
20+
https://d1y.github.io/kitty/x.json
21+
https://d1y.github.io/kitty/vod.json
22+
https://d1y.github.io/kitty/xvod.json
23+
https://d1y.github.io/kitty/t4.json
24+
```
25+
26+
国内镜像加速
27+
28+
```log
29+
https://ghfast.top/https://raw.githubusercontent.com/d1y/kitty/refs/heads/gh-pages/x.json
30+
https://ghfast.top/https://raw.githubusercontent.com/d1y/kitty/refs/heads/gh-pages/vod.json
31+
https://ghfast.top/https://raw.githubusercontent.com/d1y/kitty/refs/heads/gh-pages/xvod.json
32+
https://ghfast.top/https://raw.githubusercontent.com/d1y/kitty/refs/heads/gh-pages/t4.json
33+
```

package.json

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
{
2+
"name": "kitty",
3+
"version": "1.0.0",
4+
"description": "",
5+
"main": "index.js",
6+
"scripts": {
7+
"build": "kitty-parse -o result.json"
8+
},
9+
"repository": {
10+
"type": "git",
11+
"url": "git+https://github.com/d1y/kitty.git"
12+
},
13+
"keywords": [],
14+
"author": "",
15+
"license": "ISC",
16+
"type": "module",
17+
"bugs": {
18+
"url": "https://github.com/d1y/kitty/issues"
19+
},
20+
"homepage": "https://github.com/d1y/kitty#readme",
21+
"dependencies": {
22+
"@types/kitty": "https://gitpkg.vercel.app/waifu-project/movie/JS/types?dev",
23+
"kitty": "https://gitpkg.vercel.app/waifu-project/movie/JS/cli?dev",
24+
"cheerio": "^1.1.2",
25+
"typescript": "^5.9.2"
26+
}
27+
}

pages.ts

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
import { writeFileSync, readFileSync } from "fs"
2+
3+
function getChinaDate() {
4+
const chinaDate = new Intl.DateTimeFormat('zh-CN', {
5+
timeZone: 'Asia/Shanghai',
6+
year: 'numeric',
7+
month: '2-digit',
8+
day: '2-digit'
9+
}).format(new Date());
10+
return chinaDate.replace(/^(\d{2})/, "").replace(/\//g, '/')
11+
}
12+
13+
const kPageUrl = `https://gist.githubusercontent.com/d1y/4d0551fc8105c9d57f85da8cbbdc8b2e/raw/fabu.html`
14+
15+
const config = {
16+
sponsorship: "https://s2.loli.net/2025/09/24/ByRvOsQhWzKLXNo.jpg",
17+
sourceTotal: 0,
18+
update: getChinaDate(),
19+
baseUrl: "https://d1y.github.io/kitty",
20+
}
21+
22+
function getSourceTotal() {
23+
let total = 0
24+
const files = ["vod.json", "xvod.json", "x.json", "t4.json"]
25+
for (const file of files) {
26+
try {
27+
const list: any[] = JSON.parse(readFileSync(file, "utf8"))
28+
total += list.length
29+
} catch (error) {
30+
console.error(error)
31+
}
32+
}
33+
return total
34+
}
35+
36+
;(async ()=> {
37+
const total = getSourceTotal()
38+
let text = await (await fetch(kPageUrl)).text()
39+
for (const [key, value] of Object.entries(config)) {
40+
let realValue = ''+value
41+
if (key == "sourceTotal") {
42+
realValue = `${total}`
43+
}
44+
text = text.replaceAll(`$$${key}`, realValue)
45+
}
46+
const file = process.argv[2]
47+
writeFileSync(file, text)
48+
})()

t4.ts

Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
import { writeFileSync } from 'fs'
2+
3+
// 从 TG 群和 @CxiaoyuN 那里抄过来的
4+
// 目的是为了测试 t4 的效果
5+
// 不是 @d1y 本人的 drpy-node 实例, 所以不要来骚扰我(@d1y)
6+
const t4 = [
7+
{
8+
"id": "py_DianYingTanTang",
9+
"name": "🫐电影天堂(T4)",
10+
"api": "https://py.doube.eu.org/spider?site=DianYingTanTang",
11+
"nsfw": false,
12+
},
13+
{
14+
"id": "py_Dm84",
15+
"name": "🍋动漫巴士(T4)",
16+
"api": "https://py.doube.eu.org/spider?site=Dm84",
17+
"nsfw": false,
18+
},
19+
{
20+
"id": "py_BadNews",
21+
"name": "🔞BadNews(T4)",
22+
"api": "https://py.doube.eu.org/spider?site=BadNews",
23+
"nsfw": true,
24+
},
25+
{
26+
"id": "py_Miss",
27+
"name": "🔞MissAV(T4)",
28+
"api": "https://py.doube.eu.org/spider?site=Miss",
29+
"nsfw": true,
30+
},
31+
].map(item => {
32+
const { id, name, api, nsfw } = item
33+
return <Iconfig>{
34+
id,
35+
name,
36+
api,
37+
nsfw,
38+
type: 1,
39+
extra: {
40+
template: "t4",
41+
}
42+
}
43+
})
44+
45+
const file = process.argv[2]
46+
writeFileSync(file, JSON.stringify(t4, null, 2))
47+
48+
// ;(async ()=> {
49+
// const resp: { spiders: Array<{
50+
// api: string
51+
// key: string
52+
// name: string
53+
// type: 4
54+
// }> } = await (await fetch("https://learnpython.ggff.net/api/list_spiders")).json()
55+
// const data = resp.spiders.map(item=> {
56+
// const { api, key, name } = item
57+
// return <Iconfig>{
58+
// id: key,
59+
// name,
60+
// api,
61+
// nsfw: false,
62+
// type: 1,
63+
// extra: {
64+
// template: "t4",
65+
// }
66+
// }
67+
// })
68+
// const file2 = process.argv[3]
69+
// writeFileSync(file2, JSON.stringify(data, null, 2))
70+
// })()

0 commit comments

Comments
 (0)