parse topic content-types to recode content with non-utf8 charsets
[websub-hub] / test / test-data / link-helper.js
1 'use strict';
2
3 const rssFeedUrl = 'https://squeep.com/share/';
4 const rssFeedBody = `<?xml version="1.0" encoding="UTF-8"?>
5 <rss version="2.0"
6 xmlns:content="http://purl.org/rss/1.0/modules/content/"
7 xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
8 xmlns:atom="http://www.w3.org/2005/Atom"
9 xmlns:dc="http://purl.org/dc/elements/1.1/"
10 xmlns:wfw="http://wellformedweb.org/CommentAPI/" >
11 <channel>
12 <title>Things To Share</title>
13 <link>https://squeep.com/share</link>
14 <atom:link rel="hub" href="https://hub.squeep.com/" />
15 <description>Miscellaneous contents what interest some harmless mammal.</description>
16 <image>
17 <url>https://squeep.com/share/img/ratmap-128.png</url>
18 <width>128</width><height>128</height>
19 </image>
20 <pubDate>Tue, 10 Aug 2021 23:21:46 GMT</pubDate>
21 <generator>Blogofile</generator>
22 <sy:updatePeriod>weekly</sy:updatePeriod>
23 <sy:updateFrequency>1</sy:updateFrequency>
24 <item>
25 <title>arts I shall never be able to collect</title>
26 <link>https://squeep.com/share/2015/08/00000011</link>
27 <pubDate>Thu, 20 Aug 2015 20:42:37 PDT</pubDate>
28 <category><![CDATA[art]]></category>
29 <guid isPermaLink="false">00000011</guid>
30 <description>arts I shall never be able to collect</description>
31 <content:encoded><![CDATA[
32 <p>
33 <a href="http://www.followtheblackrabbit.com/">Beth Cavener</a> does phenomenal work.
34 This is the piece I'd most want for my wall. I could spend a lifetime appreciating those expressions.
35 </p>
36 <div>
37 <a href="http://www.followtheblackrabbit.com/gallery/the-sentimental-question-2/" title="1/2">
38 <img src="https://squeep.com/share/assets/2b7354e42e91cd42e161ad90243c9d6ffa1deba1-0000"
39 style="display:inline; height:40ex;"
40 alt="1/2"
41 />
42 </a>
43
44 <a href="http://www.followtheblackrabbit.com/gallery/the-sentimental-question-2/" title="2/2">
45 <img src="https://squeep.com/share/assets/470998dab71830e0dde4cd20d17a5c96ceb19278-0000"
46 style="display:inline; height:40ex;"
47 alt="2/2"
48 />
49 </a>
50 </div>
51 ]]></content:encoded>
52 </item>
53 </channel>
54 </rss>`;
55
56 const rssFeedUrl2 = 'https://puppetcircuits.wordpress.com/feed/';
57 const rssFeedBody2 = `<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
58 xmlns:content="http://purl.org/rss/1.0/modules/content/"
59 xmlns:wfw="http://wellformedweb.org/CommentAPI/"
60 xmlns:dc="http://purl.org/dc/elements/1.1/"
61 xmlns:atom="http://www.w3.org/2005/Atom"
62 xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
63 xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
64 xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
65 >
66
67 <channel>
68 <title>Puppet Circuits</title>
69 <atom:link href="https://puppetcircuits.wordpress.com/feed/" rel="self" type="application/rss+xml" />
70 <link>https://puppetcircuits.wordpress.com</link>
71 <description></description>
72 <lastBuildDate>Fri, 10 Feb 2012 19:26:16 +0000</lastBuildDate>
73 <language>en</language>
74 <sy:updatePeriod>
75 hourly </sy:updatePeriod>
76 <sy:updateFrequency>
77 1 </sy:updateFrequency>
78 <generator>http://wordpress.com/</generator>
79 <cloud domain='puppetcircuits.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
80 <image>
81 <url>https://s0.wp.com/i/buttonw-com.png</url>
82 <title>Puppet Circuits</title>
83 <link>https://puppetcircuits.wordpress.com</link>
84 </image>
85 <atom:link rel="search" type="application/opensearchdescription+xml" href="https://puppetcircuits.wordpress.com/osd.xml" title="Puppet Circuits" />
86 <atom:link rel='hub' href='https://puppetcircuits.wordpress.com/?pushpress=hub'/>
87 <item>
88 <title>Been a while! And: fun video from Eric</title>
89 <link>https://puppetcircuits.wordpress.com/2012/02/10/been-a-while-and-fun-video-from-eric/</link>
90 <comments>https://puppetcircuits.wordpress.com/2012/02/10/been-a-while-and-fun-video-from-eric/#respond</comments>
91
92 <dc:creator><![CDATA[raphaelabrams]]></dc:creator>
93 <pubDate>Fri, 10 Feb 2012 19:26:16 +0000</pubDate>
94 <category><![CDATA[Uncategorized]]></category>
95 <guid isPermaLink="false">http://puppetcircuits.wordpress.com/?p=164</guid>
96
97 <description><![CDATA[Yes, I DO think I can space my posts one year apart! Here&#8217;s a really very nice video that Eric Skiff made that features me and one of my creations.]]></description>
98 <content:encoded><![CDATA[<p>Yes, I DO think I can space my posts one year apart!</p>
99 <p>Here&#8217;s a really very nice video that Eric Skiff made that features me and one of my creations.</p>
100 <iframe class='youtube-player' width='560' height='315' src='https://www.youtube.com/embed/7yHF0Ubxdnc?version=3&#038;rel=0&#038;showsearch=0&#038;showinfo=1&#038;iv_load_policy=1&#038;fs=1&#038;hl=en&#038;autohide=2&#038;wmode=transparent' allowfullscreen='true' style='border:0;' sandbox='allow-scripts allow-same-origin allow-popups allow-presentation'></iframe>
101 ]]></content:encoded>
102
103 <wfw:commentRss>https://puppetcircuits.wordpress.com/2012/02/10/been-a-while-and-fun-video-from-eric/feed/</wfw:commentRss>
104 <slash:comments>0</slash:comments>
105
106 <media:content url="https://0.gravatar.com/avatar/c19e5ba7f3abc36656779edcc9c6b6eb?s=96&#38;d=identicon&#38;r=G" medium="image">
107 <media:title type="html">raphaelabrams</media:title>
108 </media:content>
109 </item>
110 <item>
111 <title>Botacon!</title>
112 <link>https://puppetcircuits.wordpress.com/2011/02/22/botacon/</link>
113 <comments>https://puppetcircuits.wordpress.com/2011/02/22/botacon/#respond</comments>
114
115 <dc:creator><![CDATA[raphaelabrams]]></dc:creator>
116 <pubDate>Tue, 22 Feb 2011 06:55:49 +0000</pubDate>
117 <category><![CDATA[robotics]]></category>
118 <category><![CDATA[servos]]></category>
119 <guid isPermaLink="false">http://puppetcircuits.wordpress.com/?p=158</guid>
120
121 <description><![CDATA[A little late, but here&#8217;s a video of me talking at Botacon a few months ago.]]></description>
122 <content:encoded><![CDATA[<p>A little late, but here&#8217;s a video of me talking at Botacon a few months ago.</p>
123 <iframe class='youtube-player' width='450' height='254' src='https://www.youtube.com/embed/OV5gG29jvaQ?version=3&#038;rel=1&#038;showsearch=0&#038;showinfo=1&#038;iv_load_policy=1&#038;fs=1&#038;hl=en&#038;autohide=2&#038;wmode=transparent' allowfullscreen='true' style='border:0;' sandbox='allow-scripts allow-same-origin allow-popups allow-presentation'></iframe>
124 ]]></content:encoded>
125
126 <wfw:commentRss>https://puppetcircuits.wordpress.com/2011/02/22/botacon/feed/</wfw:commentRss>
127 <slash:comments>0</slash:comments>
128
129 <media:content url="https://0.gravatar.com/avatar/c19e5ba7f3abc36656779edcc9c6b6eb?s=96&#38;d=identicon&#38;r=G" medium="image">
130 <media:title type="html">raphaelabrams</media:title>
131 </media:content>
132 </item>
133 <item>
134 <title>Oddball Hotplate</title>
135 <link>https://puppetcircuits.wordpress.com/2011/01/22/oddball-hotplate/</link>
136 <comments>https://puppetcircuits.wordpress.com/2011/01/22/oddball-hotplate/#comments</comments>
137
138 <dc:creator><![CDATA[raphaelabrams]]></dc:creator>
139 <pubDate>Sat, 22 Jan 2011 21:26:55 +0000</pubDate>
140 <category><![CDATA[electronics]]></category>
141 <guid isPermaLink="false">http://puppetcircuits.wordpress.com/?p=155</guid>
142
143 <description><![CDATA[I made a special hotplate for soldering all the circuit boards for the Blueman project. It&#8217;s 22&#8243; long and 1&#8243; wide. I made it out of a single block of aluminum that I CNC milled to fit two 750 watt heaters and a thermocouple. There&#8217;s also a PIC that monitors the thermocouple and has a [&#8230;]]]></description>
144 <content:encoded><![CDATA[<iframe class='youtube-player' width='450' height='254' src='https://www.youtube.com/embed/Va2SkWK1QII?version=3&#038;rel=1&#038;showsearch=0&#038;showinfo=1&#038;iv_load_policy=1&#038;fs=1&#038;hl=en&#038;autohide=2&#038;wmode=transparent' allowfullscreen='true' style='border:0;' sandbox='allow-scripts allow-same-origin allow-popups allow-presentation'></iframe>
145 <p>I made a special hotplate for soldering all the circuit boards for the Blueman project. It&#8217;s 22&#8243; long and 1&#8243; wide. I made it out of a single block of aluminum that I CNC milled to fit two 750 watt heaters and a thermocouple. There&#8217;s also a PIC that monitors the thermocouple and has a relay to turn the heaters on and off. The display shows target and current temperatures to within 1/4 degree Celcius. Having this to do my soldering kept me from losing my sanity. There&#8217;s 0ver 1000 solder joints on each wand!</p>
146 <p>&nbsp;</p>
147 ]]></content:encoded>
148
149 <wfw:commentRss>https://puppetcircuits.wordpress.com/2011/01/22/oddball-hotplate/feed/</wfw:commentRss>
150 <slash:comments>1</slash:comments>
151
152 <media:content url="https://0.gravatar.com/avatar/c19e5ba7f3abc36656779edcc9c6b6eb?s=96&#38;d=identicon&#38;r=G" medium="image">
153 <media:title type="html">raphaelabrams</media:title>
154 </media:content>
155 </item>
156 </channel>
157 </rss>`;
158
159 const atomFeedUrl = 'https://squeep.com/eats/atom/';
160 const atomFeedBody = `<?xml version="1.0" encoding="UTF-8"?>
161 <feed
162 xmlns="http://www.w3.org/2005/Atom"
163 xmlns:thr="http://purl.org/syndication/thread/1.0"
164 xml:lang="en" >
165 <title type="text">Fyne Vyttles</title>
166 <subtitle type="text">An incomplete collection of foods worth sharing.</subtitle>
167 <generator>Recipe Index v0.0</generator>
168 <updated>2020-10-08T19:47:16Z</updated>
169 <link rel="alternate" type="text/xhtml" href="https://squeep.com/eats/" />
170 <link rel="self" type="application/atom+xml" href="https://squeep.com/eats/atom/" />
171 <link rel="hub" href="https://hub.squeep.com/" />
172 <id>https://squeep.com/eats/atom/</id>
173 <entry>
174 <author>
175 <name></name>
176 <uri>https://squeep.com/eats/</uri>
177 </author>
178 <title>![CDATA[E&amp;O Trading Company Corn Fritters]]</title>
179 <link rel="alternate" type="text/xhtml" href="https://squeep.com/eats/secret/e-and-o-corn-fritters.xhtml" />
180 <id>https://squeep.com/eats/secret/e-and-o-corn-fritters.xhtml</id>
181 <category scheme="https://squeep.com/eats/" term="secret" />
182 <updated>2020-10-08T19:47:16Z</updated>
183 <published>2020-10-08T19:47:16Z</published>
184 </entry>
185 <entry>
186 <author>
187 <name></name>
188 <uri>https://squeep.com/eats/</uri>
189 </author>
190 <title>![CDATA[Chevy's Sweet Corn Tamalito]]</title>
191 <link rel="alternate" type="text/xhtml" href="https://squeep.com/eats/secret/chevys-sweet-corn-tamalito.xhtml" />
192 <id>https://squeep.com/eats/secret/chevys-sweet-corn-tamalito.xhtml</id>
193 <category scheme="https://squeep.com/eats/" term="secret" />
194 <updated>2020-07-15T02:15:28Z</updated>
195 <published>2020-07-15T02:15:28Z</published>
196 </entry>
197 </feed>
198 `;
199
200 const htmlUrl = 'https://squeep.com/eats/';
201 const htmlBody = `<?xml version="1.0" encoding="UTF-8" ?>
202 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
203 "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
204 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"
205 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
206 xsi:schemaLocation="http://www.w3.org/1999/xhtml
207 http://www.w3.org/MarkUp/SCHEMA/xhtml11.xsd"
208 >
209 <head>
210 <title>Squeep Recipe Book</title>
211 <link rel="preload" href="oldstyle.otf" as="font" type="font/opentype" crossorigin="anonymous" />
212 <link rel="stylesheet" type="text/css" href="eats.css" />
213 <link rel="hub" href="https://hub.squeep.com/" />
214 <link rel="alternate" type="application/atom+xml" title="Atom 1.0" href="https://squeep.com/eats/atom/" />
215 </head>
216 <body>
217 <hr />`;
218
219 module.exports = {
220 atomFeedBody,
221 atomFeedUrl,
222 htmlBody,
223 htmlUrl,
224 rssFeedBody,
225 rssFeedUrl,
226 rssFeedBody2,
227 rssFeedUrl2,
228 };