-
-
Notifications
You must be signed in to change notification settings - Fork 104
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
RSSフィード作成 #387
Conversation
すぐ出せる情報のみでrssフィードページを作成しました。
|
公式のベストプラクティスによると、podcast側の必須タグは下記3点のようです。
|
カテゴリ情報はどれが適切でしょうか?🤔 |
追加のタグは必須ではないのですが、Apple Podcastsでおすすめとして紹介されやすくなるようなので追加しました。 cf. https://help.apple.com/itc/podcasts_connect/#/itcb54353390
暫定で下記のカテゴリ(サブカテゴリ)を設定してみました。 カテゴリ: Technology |
追加したいタグ
|
podcastsに推奨されていたので、ファイルの情報を追加しました。
やることに以下の二つが入っているのですが、オンラインで公開しないとテスト・検証・送信はできないのでこのPRのやることからは削除しようと思います。
|
よさそう d( ̄  ̄)✨ |
@odlovesq 割と簡単に作れそうだったのでひとまずこんな感じで作ってみました! 🎨 ✅ 他、必要な情報などあればお気軽にご連絡くださ〜い 😆✨ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
細かな点をいくつかコメントしましたが、大枠は良さそうに思います! 👍
PRありがとうございます〜 😌
app/models/podcast.rb
Outdated
@@ -36,6 +50,10 @@ def description | |||
@desc ||= exists? ? self.content.lines.reject{|l| l =~ /^(\n|<)/ }.second.delete('<br>').strip : '' | |||
end | |||
|
|||
def published_at | |||
@pubDate ||= exists? ? Time.parse(self.content.lines.second.gsub(/<.+?>/, '').delete('収録日: ')) : '' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
キャメルケースよりスネークケースの方がrubyっぽいと思いました。
s/@pubDate/@published_at/
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
「2行目に収録日が記載されている」というのは仕様になっている感じでしょうか?
仕様がわからなかったのでご存知なら教えてください。
仕様じゃないケースがあるかもという想定を考慮に入れると収録日:
で始まる行を探して、それ以降の文字列を切り抜く、という感じかなと思いました。
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
「2行目に収録日が記載されている」というのは仕様になっている感じでしょうか?
こちらは Issue に切り出しました ✂️
#407
app/views/podcasts/feed.rss.builder
Outdated
xml.description full_description "" | ||
xml.link root_url | ||
xml.author @author | ||
xml.copyright "Copyright © 2012-2018 一般社団法人 CoderDojo Japan" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@author
使えますでしょうか?
"Copyright © 2012-2018 #{@author}"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
s/2018/2019/
なので、
"Copyright © 2012-#{Time.current.year} #{@author}"
とするのはどうでしょうか?
app/views/podcasts/feed.rss.builder
Outdated
xml.author @author | ||
xml.description episode.description | ||
xml.link @domainname + episode.url | ||
xml.guid({:isPermaLink => "false"}, @domainname + episode.url) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
String Interpolationを使いたいと思いました。
"#{@domainname}#{episode.url}"
app/views/podcasts/feed.rss.builder
Outdated
xml.guid({:isPermaLink => "false"}, @domainname + episode.url) | ||
xml.itunes :explicit, "clean" | ||
xml.pubDate episode.published_at.rfc2822 | ||
xml.enclosure({:url => @domainname + episode.url + ".mp3", :length => episode.filesize, :type => "audio/mpeg"}) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
String Interpolationを使いたいと思いました。
"#{@domainname}#{episode.url}.mp3"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
こちら今日中にマージしちゃいたいので、僕の方で指摘点を対応して、さらに修正対応が必要であれば別途リファクタリングする方向で調整してみますね 🔧💨 ✨ |
xml.language "ja" | ||
xml.itunes :category, :text => "Technology" do | ||
xml.itunes :category, :text => "Software How-To" | ||
xml.itunes :category, :text => "Podcasting" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
サブカテゴリの追加の仕方ってこれであってるのかな 🤔💭 ちょっと確認してみよ 👀 💨
カテゴリ: Technology
サブカテゴリ: Software How-To, Podcasting
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
まぁひとまず検証してどんなデータが出てくるか試してみるのが早そうかな ✅
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
一旦マージして、テスト&検証していきますね 🔧 💨 ✅ |
確認遅くなりました! |
背景
TL;DR: DojoCastがPodcastから聴けると嬉しいというご意見がありました!
Fix #363
期待される結果
やること
Podcastでテスト・検証Podcastに送信やらなかったこと