Skip to content

feat: ✨ Expand news system to cover comprehensive mobile development #32

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions .github/workflows/auto_news.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Generate Weekly Flutter News with AI
name: Generate Weekly Mobile Development News with AI

on:
schedule:
Expand Down Expand Up @@ -49,18 +49,18 @@ jobs:
- name: Create Pull Request
if: steps.check_files.outputs.files_changed == 'true'
run: |
BRANCH_NAME="news/flutter-news-$(date +%Y%m%d)"
COMMIT_MESSAGE="feat: ✨ Add weekly Flutter news for $(date +%Y-%m-%d)"
PR_TITLE="週刊Flutterニュース: $(date +%Y-%m-%d)号"
PR_BODY="AIによって自動生成された週刊Flutterニュースです。内容を確認・修正してマージしてください。"
BRANCH_NAME="news/mobile-news-$(date +%Y%m%d)"
COMMIT_MESSAGE="feat: ✨ Add weekly mobile development news for $(date +%Y-%m-%d)"
PR_TITLE="週刊モバイル開発ニュース: $(date +%Y-%m-%d)号"
PR_BODY="AIによって自動生成された週刊モバイル開発ニュースです。Flutter、React Native、Swift/iOS、Kotlin/Android関連の最新情報を含んでいます。内容を確認・修正してマージしてください。"

# Gitのユーザー情報を設定
git config --global user.name "AI News Bot"
git config --global user.email "github-actions[bot]@users.noreply.github.com"

# 新しいブランチを作成して変更をコミット
git checkout -b $BRANCH_NAME
git add src/data/blog/flutter-news-*.md
git add src/data/blog/mobile-news-*.md
git commit -m "$COMMIT_MESSAGE"
git push origin $BRANCH_NAME

Expand All @@ -70,6 +70,6 @@ jobs:
--body "$PR_BODY" \
--base main \
--head $BRANCH_NAME \
--label "news,automated"
--label "news,automated,mobile"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
64 changes: 49 additions & 15 deletions scripts/generate_article.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,18 +9,47 @@
DAYS_AGO = 7
# ニュースソースのRSSフィードURL
RSS_FEEDS = {
# Flutter関連
"Flutter 公式": "https://medium.com/feed/flutter",
"Flutter Community": "https://medium.com/feed/flutter-community",
"Flutter YouTube": "https://www.youtube.com/feeds/videos.xml?channel_id=UCwXdFgeE9KYzlDdR7TG9cMw",
"Reddit Flutter": "https://www.reddit.com/r/FlutterDev/.rss",
"Hatena Flutter": "https://b.hatena.ne.jp/q/Flutter?mode=rss",

# React Native関連
"React Native Blog": "https://reactnative.dev/blog/rss.xml",
"React Native Community": "https://medium.com/feed/react-native-community",
"Reddit React Native": "https://www.reddit.com/r/reactnative/.rss",
"Qiita (React Native)": "https://qiita.com/tags/react-native/feed",
"React Native YouTube": "https://www.youtube.com/feeds/videos.xml?channel_id=UCMYS7PYW8T9lHVtNXbLvR3w",

# Swift/iOS関連
"Swift.org Blog": "https://swift.org/blog/rss.xml",
"iOS Dev Weekly": "https://iosdevweekly.com/issues.rss",
"Ray Wenderlich": "https://www.kodeco.com/rss.xml",
"NSHipster": "https://nshipster.com/feed.xml",
"Swift by Sundell": "https://www.swiftbysundell.com/feed.rss",
"Apple Developer": "https://developer.apple.com/news/rss/news.rss",
"Reddit iOS Programming": "https://www.reddit.com/r/iOSProgramming/.rss",
"Qiita (Swift)": "https://qiita.com/tags/swift/feed",
"Qiita (iOS)": "https://qiita.com/tags/ios/feed",

# Kotlin Native/Android関連
"Kotlin Blog": "https://blog.jetbrains.com/kotlin/feed/",
"Android Developers Blog": "https://android-developers.googleblog.com/feeds/posts/default",
"Android Weekly": "https://androidweekly.net/rss",
"Kotlin Multiplatform Mobile": "https://kotlinlang.org/docs/multiplatform/multiplatform-mobile-getting-started.html",
Copy link
Preview

Copilot AI Jul 15, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This entry points to a documentation HTML page rather than an RSS feed URL. It may fail during feed parsing; consider replacing it with a valid RSS endpoint or removing it.

Suggested change
"Kotlin Multiplatform Mobile": "https://kotlinlang.org/docs/multiplatform/multiplatform-mobile-getting-started.html",
# "Kotlin Multiplatform Mobile": "https://kotlinlang.org/docs/multiplatform/multiplatform-mobile-getting-started.html", # Removed due to invalid RSS feed URL

Copilot uses AI. Check for mistakes.

"Reddit Android Dev": "https://www.reddit.com/r/androiddev/.rss",
"Qiita (Kotlin)": "https://qiita.com/tags/kotlin/feed",
"Qiita (Android)": "https://qiita.com/tags/android/feed",

# 汎用開発・技術
"Zenn": "https://zenn.dev/feed",
"Qiita (Flutter)": "https://qiita.com/tags/flutter/feed",
"dev.to": "https://dev.to/feed",
"Hacker News": "https://hnrss.org/frontpage",
"Reddit Flutter": "https://www.reddit.com/r/FlutterDev/.rss",
"Google Developers": "https://developers.googleblog.com/feeds/posts/default",
"OpenAI Blog": "https://openai.com/blog/rss.xml",
"Reddit Artificial": "https://www.reddit.com/r/artificial/.rss",
"Hatena Flutter": "https://b.hatena.ne.jp/q/Flutter?mode=rss",
"Flutter YouTube": "https://www.youtube.com/feeds/videos.xml?channel_id=UCwXdFgeE9KYzlDdR7TG9cMw",
"Connpass Events": "https://connpass.com/explore/ja.atom",
}
# --- ここまで ---
Expand Down Expand Up @@ -75,9 +104,13 @@ def fetch_recent_articles():

# 公開日が指定された日付よりも新しいかチェック
if published_date >= since_date:
# Connpassイベントの場合はFlutter関連のみフィルタリング
# Connpassイベントの場合はモバイル開発関連のみフィルタリング
if name == "Connpass Events":
if "flutter" not in entry.title.lower() and "flutter" not in entry.get('summary', '').lower():
mobile_keywords = ["flutter", "react native", "swift", "ios", "android", "kotlin", "mobile", "モバイル"]
title_lower = entry.title.lower()
summary_lower = entry.get('summary', '').lower()

if not any(keyword in title_lower or keyword in summary_lower for keyword in mobile_keywords):
continue


Expand Down Expand Up @@ -105,16 +138,17 @@ def generate_article_with_ai(articles):

# AIへの指示(プロンプト)
prompt = f"""
あなたは日本の優秀なFlutterエンジニア兼テクニカルライターです
以下のFlutter、開発、AI関連のニュースリストを元に、Astroブログで使えるMarkdown形式の記事を生成してください。
あなたは日本の優秀なモバイルアプリエンジニア兼テクニカルライターです
以下のFlutter、React Native、Swift/iOS、Kotlin/Android、AI関連のニュースリストを元に、Astroブログで使えるMarkdown形式の記事を生成してください。

## 記事構成の要件
1. **導入文**: 読者が興味を持つような、フレンドリーで分かりやすい導入文から始める
2. **カテゴリ分類**: ニュースを「Flutter・モバイル開発」「AI・機械学習」「開発者向け情報」「その他技術トピック」などに分類(カテゴリは「##」を使用)
2. **カテゴリ分類**: ニュースを「Flutter・クロスプラットフォーム開発」「React Native開発」「Swift・iOS開発」「Kotlin・Android開発」「AI・機械学習」「開発者向け情報」「その他技術トピック」などに分類(カテゴリは「##」を使用)
3. **記事選定**: 各カテゴリから最も価値の高い記事を3-5個程度選んで紹介(すべて掲載する必要なし)
- **Flutter エンジニア向け**: モバイル開発、UI/UX、パフォーマンス最適化、状態管理、アーキテクチャ設計
- **モバイル開発者向け**: UI/UX、パフォーマンス最適化、状態管理、アーキテクチャ設計、クロスプラットフォーム戦略
- **プラットフォーム固有**: iOS特有の機能、Android特有の機能、ネイティブ開発のベストプラクティス
- **開発効率向上**: CI/CD、テスト、デバッグ、開発ツール、IDE拡張
- **技術トレンド**: 新しいフレームワーク、ライブラリ、開発手法、クロスプラットフォーム開発
- **技術トレンド**: 新しいフレームワーク、ライブラリ、開発手法、最新OS対応
- **チーム開発**: コードレビュー、設計パターン、プロジェクト管理、チームワーク
- **キャリア**: 技術選択、学習方法、業界動向、エンジニアとしての成長
- 新機能や重要なアップデート情報を優先
Expand All @@ -138,12 +172,12 @@ def generate_article_with_ai(articles):

## Frontmatter設定
---
title: "週刊Flutterニュース {today_str}号"
slug: "flutter-news-{today_str.replace('-', '')}"
title: "週刊モバイル開発ニュース {today_str}号"
slug: "mobile-news-{today_str.replace('-', '')}"
author: "kboy"
description: "[今週の主要なトピックを2-3文で要約]"
pubDatetime: "{today_str}"
tags: ["ニュース"]
tags: ["ニュース", "モバイル開発", "Flutter", "React Native", "Swift", "Kotlin"]
layout: "../../layouts/BlogPost.astro"
---

Expand All @@ -164,7 +198,7 @@ def save_markdown(content):

today_for_filename = datetime.datetime.now().strftime('%Y%m%d')
# Astroのブログ記事が格納されるパス
filepath = f"src/data/blog/flutter-news-{today_for_filename}.md"
filepath = f"src/data/blog/mobile-news-{today_for_filename}.md"

os.makedirs(os.path.dirname(filepath), exist_ok=True)
with open(filepath, "w", encoding="utf-8") as f:
Expand Down