Skip to content

Instantly share code, notes, and snippets.

Last active December 17, 2015 13:28
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
What would you like to do?
Private Function CreateFeed(offset As Integer, count As Integer) As String
' ダミーデータ作成
Dim channelPubDate = Now
Dim items = New List(Of ComicItem)
For i = offset + 1 To count
Dim item = New ComicItem With {
.Title = "タイトル" & i.ToString,
.PubDate = Now.AddDays(count - i),
.ModifiedDate = Now.AddDays(count - i),
.Link = "" & i.ToString,
.Id = i.ToString,
.Volume = i,
.IsAvailable = True,
.MediaUrl = "" & i.ToString,
.ThumbnailUrl = "" & i.ToString,
.Creator = "Creator",
.Guid = "" & i.ToString}
' XDocument 作成
Dim xml =
<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
<description>高校生の暮井 慧(プロ生ちゃん)と、部活「情報処理研究会」のメンバー 戸増千由莉とフィネス・ヒルヴィレッジが活躍する Web 4コマ漫画「すぱこー」!</description>
<pubDate><%= channelPubDate.ToString("r") %></pubDate>
<%= From i In items
Select <item>
<title><%= i.Title %></title>
<dc:creator><%= i.Creator %></dc:creator>
<link><%= i.Link %></link>
<pubDate><%= i.PubDate.ToString("r") %></pubDate>
<description><%= i.Description %></description>
<dcndl:volume><%= i.Volume %></dcndl:volume>
<dc:modified><%= i.ModifiedDate.ToString("s") %></dc:modified>
<p:isAvailable><%= If(i.IsAvailable, "true", "false") %></p:isAvailable>
<media:content url=<%= i.MediaUrl %>></media:content>
<media:thumbnail url=<%= i.ThumbnailUrl %>></media:thumbnail>
<guid isPermaLink="false"><%= i.Guid %></guid>
' XML 文字列を返す
Return xml.ToString
End Function
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment