mirror of
https://github.com/KazooTTT/kazoottt-blog-v2.git
synced 2025-06-23 18:51:30 +08:00
Update docs and sort content
This commit is contained in:
52
src/content/post/milklove 小项目产出汇总.md
Normal file
52
src/content/post/milklove 小项目产出汇总.md
Normal file
@ -0,0 +1,52 @@
|
||||
---
|
||||
toAstro: true
|
||||
astroType: post
|
||||
published: true
|
||||
toWexin: null
|
||||
toJuejin: null
|
||||
toZhihu: null
|
||||
date: 2025-03-24T00:00:00.000Z
|
||||
tags:
|
||||
- 项目
|
||||
- milklove
|
||||
category: null
|
||||
slug: null
|
||||
description: null
|
||||
title: milklove 小项目产出汇总
|
||||
date_created: 20250324
|
||||
date_modified: 20250324
|
||||
---
|
||||
|
||||
24 年 6 月入坑 milklove,不知不觉也做了一些小项目,在这里汇总一下。
|
||||
|
||||
## 一些小项目
|
||||
|
||||
### 重生计划分支可视化 - 2025-03-21
|
||||
|
||||
项目地址:[milklove-project-reborn](<https://github.com/KazooTTT/milklove-project-reborn>)
|
||||
|
||||
网站地址:[重生计划分支可视化](<https://reborn.milklovemuv.com/>)
|
||||
|
||||
预览:
|
||||
|
||||
### Rsshub 中新增 asianfanfics 路由 - 2025-02-21
|
||||
|
||||
项目地址:[github pull](<https://github.com/DIYgod/RSSHub/pull/18430>)
|
||||
|
||||
博文:[rsshub中新增asianfanfics路由 • 声控烤箱 | KazooTTT 博客](<https://blog.kazoottt.top/posts/fragmented-notes-2025-02-21-16-38-50/>)
|
||||
|
||||
网站地址:[rsshub 中新增 asianfanfics 路由](<https://docs.rsshub.app/zh/routes/reading#asianfanfics>)
|
||||
|
||||
预览:
|
||||
|
||||
### MUV 家元旦 24 H 限定食堂 - 2025-01-01
|
||||
|
||||
项目地址:[milklove-newyear-24h-fanworks](<https://github.com/KazooTTT/milklove-newyear-24h-fanworks>)
|
||||
|
||||
网站地址:[MUV 家元旦 24H 限定食堂](<https://milklovemuv.com/>)
|
||||
|
||||
预览:
|
||||
|
||||
## 一些可以参考的内容
|
||||
|
||||
[使用 google sheet + api 定时获取油管播放量 • 声控烤箱 | KazooTTT 博客](<https://blog.kazoottt.top/notes/use-google-sheet-api-to-get-youtube-playbacks-on-a-regular-basis/>)
|
63
src/content/post/milklove 重生计划 分支可视化.md
Normal file
63
src/content/post/milklove 重生计划 分支可视化.md
Normal file
@ -0,0 +1,63 @@
|
||||
---
|
||||
toAstro: true
|
||||
astroType: post
|
||||
published: true
|
||||
toWexin: null
|
||||
toJuejin: null
|
||||
toZhihu: null
|
||||
slug: milklove-project-reborn
|
||||
title: milklove 重生计划 分支可视化
|
||||
date: 2025-03-24T00:00:00.000Z
|
||||
tags:
|
||||
- 同人
|
||||
- milklove
|
||||
- vue
|
||||
- vue-flow
|
||||
category: 项目
|
||||
description: 使用 Vue Flow 实现 milklove 重生计划的分支可视化项目的过程
|
||||
date_created: 20250316
|
||||
date_modified: 20250324
|
||||
---
|
||||
|
||||
## 重生计划分支可视化
|
||||
|
||||
点击以下链接查看效果:
|
||||
|
||||
[milklove 重生计划-分支可视化](<https://reborn.milklovemuv.com/>)
|
||||
|
||||

|
||||
|
||||
源代码:[GitHub - KazooTTT/milklove-project-reborn](<https://github.com/KazooTTT/milklove-project-reborn>)
|
||||
|
||||
此项目使用 [vue flow](<https://vueflow.dev/>) 来实现,主要是为了练习 vue 和 vue flow,以及实现一个分支可视化的效果让这个同人企划的分支更加直观。
|
||||
|
||||
## 准备
|
||||
|
||||
[汇总原文](<https://weibo.com/7906190340/5141239977217903>)
|
||||
|
||||
### 获取投票数据
|
||||
|
||||
其中每一个章节都有对应的投票标题以及多个选项,我们需要把这些信息拿到
|
||||
|
||||
分析后发现,获取投票信息的方法有两种:
|
||||
|
||||
1. 如果微博内容中有投票,那么直接从查询微博内容的详情中获取
|
||||
2. 如果微博内容中没有投票,那么获取到投票的链接后,从查询投票的详情中获取
|
||||
|
||||
我先获取了两种接口的 response,然后使用 [JSON to TS](<https://marketplace.visualstudio.com/items?itemName=MariusAlchimavicius.json-to-ts>)[JSON to TS - Visual Studio Marketplace](<https://marketplace.visualstudio.com/items?itemName=MariusAlchimavicius.json-to-ts>) 的 vscode 插件快速把 json 转化为 ts 定义,非常好用。
|
||||
|
||||
再根据 ts 去写对应的解析逻辑,这样就可以很快速的把需要的投票数据拿到了。
|
||||
|
||||

|
||||
|
||||
如果不想安装浏览器插件也可以使用一些在线的网页来转化:<https://transform.tools/json-to-typescript>
|
||||
|
||||

|
||||
|
||||
## 节点关系定义
|
||||
|
||||
对于分支的可视化,分为两个部分,一个是节点,一个是边 edge。
|
||||
|
||||
对于章节和选项,我把它们看作是节点。
|
||||
|
||||
而需要被连接的边,是章节 - 选项(具体来说是得票最多的选项需要与下一个章节连接),然后在边上显示得票数和得票占比。
|
@ -5,7 +5,7 @@ published: true
|
||||
toWexin: null
|
||||
toJuejin: null
|
||||
toZhihu: null
|
||||
title: rsshub中新增asianfanfics路由
|
||||
title: rsshub 中新增 asianfanfics 路由
|
||||
date: 2025-02-21T00:00:00.000Z
|
||||
author: KazooTTT
|
||||
tags:
|
||||
@ -13,12 +13,13 @@ tags:
|
||||
- asianfanfics
|
||||
- rss
|
||||
- rsshub
|
||||
- milklove
|
||||
description: >-
|
||||
本文讲述了作者利用 RSSHub 实现 Asianfanfics
|
||||
特定标签/关键词更新订阅的过程。通过对网站结构的分析,确认了数据的获取方式。在实际操作中,遇到了反爬机制的问题,最终通过使用 ofetch 并手动设置
|
||||
User-Agent 解决。作者还分享了遇到的坑和参与开源项目的感想。
|
||||
slug: fragmented-notes-2025-02-21-16-38-50
|
||||
category: 碎片
|
||||
category: 项目
|
||||
date_created: 20250221
|
||||
date_modified: 20250304
|
||||
---
|
||||
@ -51,9 +52,9 @@ date_modified: 20250304
|
||||
|
||||

|
||||
|
||||
观察了一下,获取文章列表就是找到 primary-container 中的所有的.excerpt
|
||||
观察了一下,获取文章列表就是找到 primary-container 中的所有的。excerpt
|
||||
|
||||
现在再来看单个的.excerpt
|
||||
现在再来看单个的。excerpt
|
||||
|
||||
``` html
|
||||
<section class="excerpt">
|
||||
@ -167,4 +168,4 @@ tag 和 text-search 的分别根据上面的分析进行实现即可。代码很
|
||||
|
||||
后来在 pr 中咨询了维护的老师,才知道要手动设置 ua
|
||||
|
||||
感想就是自己做事情还是比较粗糙以及参与开源的项目,特别是会审查 pr 和提一定修改意见的,其实对自己会是很大的帮助. 可以多多参与。
|
||||
感想就是自己做事情还是比较粗糙以及参与开源的项目,特别是会审查 pr 和提一定修改意见的,其实对自己会是很大的帮助。可以多多参与。
|
||||
|
Reference in New Issue
Block a user