Repository navigation
VFG-83 GitHub Blog と Qiita の記事の本文を台本の材料にする - #52
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
概要
台本の材料が要約だけで薄くなる問題に対し、選んだ題材が GitHub Blog か Qiita の記事のときだけ、本文を取って材料 (
article) に入れます。Zenn と、はてな・HN のリンク先は取りません。変更内容
src/sources/article.ts: GitHub Blog はフィードのcontent:encoded、Qiita は公式 API v2 のbodyから本文を取る (ページの HTML は取らない)。Qiita の API 呼び出しは RSS のソースと共有src/sources/article-text.ts: HTML・Markdown から文字だけを取り出す (コードの塊は残し、画像・スクリプト・装飾は除く)articleBody.maxChars(既定 12,000 文字) に持つ。超えたら本文は使わないtopic.jsonには書かず、article-body.txtを段階の間だけ置いて終わりに消す。archive の許可の一覧には入れない。ログとscript.check.jsonには成否と文字数だけを出すarticleBodyを元の本文として当てる (既存のtopicSource)videoforge/<版> (+https://github.com/HyuuNyackman/videoforge)の User-Agent を付けるconfig/feeds.jsonのfullText.urlPatternで全文を使うフィードを指定 (GitHub Blog。Changelog は除く)受け入れ条件
動作確認
pnpm lint、pnpm typecheck、pnpm test、pnpm format:checkが通るリスクの確認
.env*、キー、トークン) を含めていない人が確認すること
pnpm vf generate --to scriptなどを、GitHub Blog・Qiita の題材で)補足