213 lines
35 KiB
HTML
213 lines
35 KiB
HTML
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
|
<html xmlns="http://www.w3.org/1999/xhtml">
|
|
<head>
|
|
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
|
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
|
|
<meta name="generator" content="Doxygen 1.8.15"/>
|
|
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
|
<title>remwharead: remwharead::Export::RSS Class Reference</title>
|
|
<link href="tabs.css" rel="stylesheet" type="text/css"/>
|
|
<script type="text/javascript" src="jquery.js"></script>
|
|
<script type="text/javascript" src="dynsections.js"></script>
|
|
<link href="search/search.css" rel="stylesheet" type="text/css"/>
|
|
<script type="text/javascript" src="search/searchdata.js"></script>
|
|
<script type="text/javascript" src="search/search.js"></script>
|
|
<link href="doxygen.css" rel="stylesheet" type="text/css" />
|
|
</head>
|
|
<body>
|
|
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
|
|
<div id="titlearea">
|
|
<table cellspacing="0" cellpadding="0">
|
|
<tbody>
|
|
<tr style="height: 56px;">
|
|
<td id="projectalign" style="padding-left: 0.5em;">
|
|
<div id="projectname">remwharead
|
|
 <span id="projectnumber">0.8.5</span>
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
<!-- end header part -->
|
|
<!-- Generated by Doxygen 1.8.15 -->
|
|
<script type="text/javascript">
|
|
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
|
|
var searchBox = new SearchBox("searchBox", "search",false,'Search');
|
|
/* @license-end */
|
|
</script>
|
|
<script type="text/javascript" src="menudata.js"></script>
|
|
<script type="text/javascript" src="menu.js"></script>
|
|
<script type="text/javascript">
|
|
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
|
|
$(function() {
|
|
initMenu('',true,false,'search.php','Search');
|
|
$(document).ready(function() { init_search(); });
|
|
});
|
|
/* @license-end */</script>
|
|
<div id="main-nav"></div>
|
|
<!-- window showing the filter options -->
|
|
<div id="MSearchSelectWindow"
|
|
onmouseover="return searchBox.OnSearchSelectShow()"
|
|
onmouseout="return searchBox.OnSearchSelectHide()"
|
|
onkeydown="return searchBox.OnSearchSelectKey(event)">
|
|
</div>
|
|
|
|
<!-- iframe showing the search results (closed by default) -->
|
|
<div id="MSearchResultsWindow">
|
|
<iframe src="javascript:void(0)" frameborder="0"
|
|
name="MSearchResults" id="MSearchResults">
|
|
</iframe>
|
|
</div>
|
|
|
|
<div id="nav-path" class="navpath">
|
|
<ul>
|
|
<li class="navelem"><b>remwharead</b></li><li class="navelem"><b>Export</b></li><li class="navelem"><a class="el" href="classremwharead_1_1Export_1_1RSS.html">RSS</a></li> </ul>
|
|
</div>
|
|
</div><!-- top -->
|
|
<div class="header">
|
|
<div class="summary">
|
|
<a href="#pub-methods">Public Member Functions</a> |
|
|
<a href="classremwharead_1_1Export_1_1RSS-members.html">List of all members</a> </div>
|
|
<div class="headertitle">
|
|
<div class="title">remwharead::Export::RSS Class Reference</div> </div>
|
|
</div><!--header-->
|
|
<div class="contents">
|
|
|
|
<p>Export as RSS feed.
|
|
<a href="classremwharead_1_1Export_1_1RSS.html#details">More...</a></p>
|
|
|
|
<p><code>#include <<a class="el" href="rss_8hpp_source.html">remwharead/export/rss.hpp</a>></code></p>
|
|
<div class="dynheader">
|
|
Inheritance diagram for remwharead::Export::RSS:</div>
|
|
<div class="dyncontent">
|
|
<div class="center">
|
|
<img src="classremwharead_1_1Export_1_1RSS.png" usemap="#remwharead::Export::RSS_map" alt=""/>
|
|
<map id="remwharead::Export::RSS_map" name="remwharead::Export::RSS_map">
|
|
<area href="classremwharead_1_1Export_1_1ExportBase.html" title="Base class for exports." alt="remwharead::Export::ExportBase" shape="rect" coords="0,0,194,24"/>
|
|
</map>
|
|
</div></div>
|
|
<table class="memberdecls">
|
|
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
|
|
Public Member Functions</h2></td></tr>
|
|
<tr class="memitem:a91c18ab8ac1ccc18f24988320b576670"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classremwharead_1_1Export_1_1RSS.html#a91c18ab8ac1ccc18f24988320b576670">print</a> () const override</td></tr>
|
|
<tr class="memdesc:a91c18ab8ac1ccc18f24988320b576670"><td class="mdescLeft"> </td><td class="mdescRight">Print output to std::ostream. <a href="#a91c18ab8ac1ccc18f24988320b576670">More...</a><br /></td></tr>
|
|
<tr class="separator:a91c18ab8ac1ccc18f24988320b576670"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:af376271c3dc90d8918171456ae4ff975"><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="classremwharead_1_1Export_1_1RSS.html#af376271c3dc90d8918171456ae4ff975">ExportBase</a> (const list< <a class="el" href="structremwharead_1_1Database_1_1entry.html">Database::entry</a> > &entries, ostream &out=cout)</td></tr>
|
|
<tr class="memdesc:af376271c3dc90d8918171456ae4ff975"><td class="mdescLeft"> </td><td class="mdescRight">Export list of <a class="el" href="structremwharead_1_1Database_1_1entry.html" title="Describes a database entry.">Database::entry</a>. <a href="#af376271c3dc90d8918171456ae4ff975">More...</a><br /></td></tr>
|
|
<tr class="separator:af376271c3dc90d8918171456ae4ff975"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:a11762caeee454debe00225c5596a4ae7"><td class="memItemLeft" align="right" valign="top"><a id="a11762caeee454debe00225c5596a4ae7"></a>
|
|
 </td><td class="memItemRight" valign="bottom"><b>ExportBase</b> (const <a class="el" href="classremwharead_1_1Export_1_1ExportBase.html">ExportBase</a> &)=delete</td></tr>
|
|
<tr class="separator:a11762caeee454debe00225c5596a4ae7"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:a50544901e2847dbc2dc4c009607ef7b8"><td class="memItemLeft" align="right" valign="top"><a id="a50544901e2847dbc2dc4c009607ef7b8"></a>
|
|
 </td><td class="memItemRight" valign="bottom"><b>ExportBase</b> (<a class="el" href="classremwharead_1_1Export_1_1ExportBase.html">ExportBase</a> &&)=delete</td></tr>
|
|
<tr class="separator:a50544901e2847dbc2dc4c009607ef7b8"><td class="memSeparator" colspan="2"> </td></tr>
|
|
</table><table class="memberdecls">
|
|
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="inherited"></a>
|
|
Additional Inherited Members</h2></td></tr>
|
|
<tr class="inherit_header pro_methods_classremwharead_1_1Export_1_1ExportBase"><td colspan="2" onclick="javascript:toggleInherit('pro_methods_classremwharead_1_1Export_1_1ExportBase')"><img src="closed.png" alt="-"/> Protected Member Functions inherited from <a class="el" href="classremwharead_1_1Export_1_1ExportBase.html">remwharead::Export::ExportBase</a></td></tr>
|
|
<tr class="memitem:a8d4245d0b37d82a3a8d95507d30ea671 inherit pro_methods_classremwharead_1_1Export_1_1ExportBase"><td class="memItemLeft" align="right" valign="top">list< <a class="el" href="structremwharead_1_1Database_1_1entry.html">Database::entry</a> > </td><td class="memItemRight" valign="bottom"><a class="el" href="classremwharead_1_1Export_1_1ExportBase.html#a8d4245d0b37d82a3a8d95507d30ea671">sort_entries</a> (list< <a class="el" href="structremwharead_1_1Database_1_1entry.html">Database::entry</a> > entries) const</td></tr>
|
|
<tr class="memdesc:a8d4245d0b37d82a3a8d95507d30ea671 inherit pro_methods_classremwharead_1_1Export_1_1ExportBase"><td class="mdescLeft"> </td><td class="mdescRight">Sort entries from newest to oldest and remove duplicates. <a href="classremwharead_1_1Export_1_1ExportBase.html#a8d4245d0b37d82a3a8d95507d30ea671">More...</a><br /></td></tr>
|
|
<tr class="separator:a8d4245d0b37d82a3a8d95507d30ea671 inherit pro_methods_classremwharead_1_1Export_1_1ExportBase"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:af376271c3dc90d8918171456ae4ff975 inherit pro_methods_classremwharead_1_1Export_1_1ExportBase"><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="classremwharead_1_1Export_1_1ExportBase.html#af376271c3dc90d8918171456ae4ff975">ExportBase</a> (const list< <a class="el" href="structremwharead_1_1Database_1_1entry.html">Database::entry</a> > &entries, ostream &out=cout)</td></tr>
|
|
<tr class="memdesc:af376271c3dc90d8918171456ae4ff975 inherit pro_methods_classremwharead_1_1Export_1_1ExportBase"><td class="mdescLeft"> </td><td class="mdescRight">Export list of <a class="el" href="structremwharead_1_1Database_1_1entry.html" title="Describes a database entry.">Database::entry</a>. <a href="classremwharead_1_1Export_1_1ExportBase.html#af376271c3dc90d8918171456ae4ff975">More...</a><br /></td></tr>
|
|
<tr class="separator:af376271c3dc90d8918171456ae4ff975 inherit pro_methods_classremwharead_1_1Export_1_1ExportBase"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:a11762caeee454debe00225c5596a4ae7 inherit pro_methods_classremwharead_1_1Export_1_1ExportBase"><td class="memItemLeft" align="right" valign="top"><a id="a11762caeee454debe00225c5596a4ae7"></a>
|
|
 </td><td class="memItemRight" valign="bottom"><b>ExportBase</b> (const <a class="el" href="classremwharead_1_1Export_1_1ExportBase.html">ExportBase</a> &)=delete</td></tr>
|
|
<tr class="separator:a11762caeee454debe00225c5596a4ae7 inherit pro_methods_classremwharead_1_1Export_1_1ExportBase"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:a283306ba9c9555db5df5ee3e78e24231 inherit pro_methods_classremwharead_1_1Export_1_1ExportBase"><td class="memItemLeft" align="right" valign="top"><a id="a283306ba9c9555db5df5ee3e78e24231"></a>
|
|
<a class="el" href="classremwharead_1_1Export_1_1ExportBase.html">ExportBase</a> & </td><td class="memItemRight" valign="bottom"><b>operator=</b> (const <a class="el" href="classremwharead_1_1Export_1_1ExportBase.html">ExportBase</a> &)=delete</td></tr>
|
|
<tr class="separator:a283306ba9c9555db5df5ee3e78e24231 inherit pro_methods_classremwharead_1_1Export_1_1ExportBase"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:a50544901e2847dbc2dc4c009607ef7b8 inherit pro_methods_classremwharead_1_1Export_1_1ExportBase"><td class="memItemLeft" align="right" valign="top"><a id="a50544901e2847dbc2dc4c009607ef7b8"></a>
|
|
 </td><td class="memItemRight" valign="bottom"><b>ExportBase</b> (<a class="el" href="classremwharead_1_1Export_1_1ExportBase.html">ExportBase</a> &&)=delete</td></tr>
|
|
<tr class="separator:a50544901e2847dbc2dc4c009607ef7b8 inherit pro_methods_classremwharead_1_1Export_1_1ExportBase"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:a84f9a443bc610d4f00ed8a9f4683262c inherit pro_methods_classremwharead_1_1Export_1_1ExportBase"><td class="memItemLeft" align="right" valign="top"><a id="a84f9a443bc610d4f00ed8a9f4683262c"></a>
|
|
<a class="el" href="classremwharead_1_1Export_1_1ExportBase.html">ExportBase</a> & </td><td class="memItemRight" valign="bottom"><b>operator=</b> (<a class="el" href="classremwharead_1_1Export_1_1ExportBase.html">ExportBase</a> &&)=delete</td></tr>
|
|
<tr class="separator:a84f9a443bc610d4f00ed8a9f4683262c inherit pro_methods_classremwharead_1_1Export_1_1ExportBase"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="inherit_header pro_attribs_classremwharead_1_1Export_1_1ExportBase"><td colspan="2" onclick="javascript:toggleInherit('pro_attribs_classremwharead_1_1Export_1_1ExportBase')"><img src="closed.png" alt="-"/> Protected Attributes inherited from <a class="el" href="classremwharead_1_1Export_1_1ExportBase.html">remwharead::Export::ExportBase</a></td></tr>
|
|
<tr class="memitem:a799001a9c7aba96eff66ca9180ead164 inherit pro_attribs_classremwharead_1_1Export_1_1ExportBase"><td class="memItemLeft" align="right" valign="top"><a id="a799001a9c7aba96eff66ca9180ead164"></a>
|
|
const list< <a class="el" href="structremwharead_1_1Database_1_1entry.html">Database::entry</a> > </td><td class="memItemRight" valign="bottom"><b>_entries</b></td></tr>
|
|
<tr class="separator:a799001a9c7aba96eff66ca9180ead164 inherit pro_attribs_classremwharead_1_1Export_1_1ExportBase"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:acc2eddcda442fc3688f7ba024f7120ad inherit pro_attribs_classremwharead_1_1Export_1_1ExportBase"><td class="memItemLeft" align="right" valign="top"><a id="acc2eddcda442fc3688f7ba024f7120ad"></a>
|
|
ostream & </td><td class="memItemRight" valign="bottom"><b>_out</b></td></tr>
|
|
<tr class="separator:acc2eddcda442fc3688f7ba024f7120ad inherit pro_attribs_classremwharead_1_1Export_1_1ExportBase"><td class="memSeparator" colspan="2"> </td></tr>
|
|
</table>
|
|
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
|
|
<div class="textblock"><p>Export as RSS feed. </p>
|
|
<dl class="section since"><dt>Since</dt><dd>0.8.0 </dd></dl>
|
|
</div><h2 class="groupheader">Member Function Documentation</h2>
|
|
<a id="af376271c3dc90d8918171456ae4ff975"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#af376271c3dc90d8918171456ae4ff975">◆ </a></span>ExportBase()</h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="mlabels">
|
|
<tr>
|
|
<td class="mlabels-left">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">remwharead::Export::ExportBase::ExportBase</td>
|
|
</tr>
|
|
</table>
|
|
</td>
|
|
<td class="mlabels-right">
|
|
<span class="mlabels"><span class="mlabel">explicit</span></span> </td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>Export list of <a class="el" href="structremwharead_1_1Database_1_1entry.html" title="Describes a database entry.">Database::entry</a>. </p>
|
|
<dl class="params"><dt>Parameters</dt><dd>
|
|
<table class="params">
|
|
<tr><td class="paramname">entries</td><td>List of <a class="el" href="structremwharead_1_1Database_1_1entry.html" title="Describes a database entry.">Database::entry</a> to export. </td></tr>
|
|
<tr><td class="paramname">out</td><td>Output stream. </td></tr>
|
|
</table>
|
|
</dd>
|
|
</dl>
|
|
<div class="fragment"><div class="line"><a name="l00023"></a><span class="lineno"> 23</span>  : _entries(<a class="code" href="classremwharead_1_1Export_1_1ExportBase.html#a8d4245d0b37d82a3a8d95507d30ea671">sort_entries</a>(entries))</div><div class="line"><a name="l00024"></a><span class="lineno"> 24</span>  , _out(out)</div><div class="line"><a name="l00025"></a><span class="lineno"> 25</span> {}</div><div class="ttc" id="classremwharead_1_1Export_1_1ExportBase_html_a8d4245d0b37d82a3a8d95507d30ea671"><div class="ttname"><a href="classremwharead_1_1Export_1_1ExportBase.html#a8d4245d0b37d82a3a8d95507d30ea671">remwharead::Export::ExportBase::sort_entries</a></div><div class="ttdeci">list< Database::entry > sort_entries(list< Database::entry > entries) const</div><div class="ttdoc">Sort entries from newest to oldest and remove duplicates.</div><div class="ttdef"><b>Definition:</b> export.cpp:28</div></div>
|
|
</div><!-- fragment -->
|
|
</div>
|
|
</div>
|
|
<a id="a91c18ab8ac1ccc18f24988320b576670"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#a91c18ab8ac1ccc18f24988320b576670">◆ </a></span>print()</h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="mlabels">
|
|
<tr>
|
|
<td class="mlabels-left">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">void remwharead::Export::RSS::print </td>
|
|
<td>(</td>
|
|
<td class="paramname"></td><td>)</td>
|
|
<td> const</td>
|
|
</tr>
|
|
</table>
|
|
</td>
|
|
<td class="mlabels-right">
|
|
<span class="mlabels"><span class="mlabel">override</span><span class="mlabel">virtual</span></span> </td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>Print output to std::ostream. </p>
|
|
|
|
<p>Implements <a class="el" href="classremwharead_1_1Export_1_1ExportBase.html#aee596eaefecdb1c21c37f5e3d129ed56">remwharead::Export::ExportBase</a>.</p>
|
|
<div class="fragment"><div class="line"><a name="l00040"></a><span class="lineno"> 40</span> {</div><div class="line"><a name="l00041"></a><span class="lineno"> 41</span>  <span class="keywordflow">try</span></div><div class="line"><a name="l00042"></a><span class="lineno"> 42</span>  {</div><div class="line"><a name="l00043"></a><span class="lineno"> 43</span>  XMLWriter writer(_out, XMLWriter::CANONICAL);</div><div class="line"><a name="l00044"></a><span class="lineno"> 44</span>  AttributesImpl attrs_rss;</div><div class="line"><a name="l00045"></a><span class="lineno"> 45</span>  AttributesImpl attrs_guid;</div><div class="line"><a name="l00046"></a><span class="lineno"> 46</span>  constexpr <span class="keywordtype">char</span> timefmt_rfc822[] = <span class="stringliteral">"%w, %d %b %Y %H:%M:%S %Z"</span>;</div><div class="line"><a name="l00047"></a><span class="lineno"> 47</span> </div><div class="line"><a name="l00048"></a><span class="lineno"> 48</span>  attrs_rss.addAttribute(<span class="stringliteral">""</span>, <span class="stringliteral">""</span>, <span class="stringliteral">"version"</span>, <span class="stringliteral">""</span>, <span class="stringliteral">"2.0"</span>);</div><div class="line"><a name="l00049"></a><span class="lineno"> 49</span>  attrs_rss.addAttribute(<span class="stringliteral">""</span>, <span class="stringliteral">""</span>, <span class="stringliteral">"xmlns:atom"</span>, <span class="stringliteral">""</span>,</div><div class="line"><a name="l00050"></a><span class="lineno"> 50</span>  <span class="stringliteral">"http://www.w3.org/2005/Atom"</span>);</div><div class="line"><a name="l00051"></a><span class="lineno"> 51</span>  attrs_guid.addAttribute(<span class="stringliteral">""</span>, <span class="stringliteral">""</span>, <span class="stringliteral">"isPermaLink"</span>, <span class="stringliteral">""</span>, <span class="stringliteral">"false"</span>);</div><div class="line"><a name="l00052"></a><span class="lineno"> 52</span> </div><div class="line"><a name="l00053"></a><span class="lineno"> 53</span>  writer.startDocument();</div><div class="line"><a name="l00054"></a><span class="lineno"> 54</span>  writer.startElement(<span class="stringliteral">""</span>, <span class="stringliteral">""</span>, <span class="stringliteral">"rss"</span>, attrs_rss);</div><div class="line"><a name="l00055"></a><span class="lineno"> 55</span>  writer.startElement(<span class="stringliteral">""</span>, <span class="stringliteral">""</span>, <span class="stringliteral">"channel"</span>);</div><div class="line"><a name="l00056"></a><span class="lineno"> 56</span> </div><div class="line"><a name="l00057"></a><span class="lineno"> 57</span>  writer.startElement(<span class="stringliteral">""</span>, <span class="stringliteral">""</span>, <span class="stringliteral">"title"</span>);</div><div class="line"><a name="l00058"></a><span class="lineno"> 58</span>  writer.characters(<span class="stringliteral">"Visited things"</span>);</div><div class="line"><a name="l00059"></a><span class="lineno"> 59</span>  writer.endElement(<span class="stringliteral">""</span>, <span class="stringliteral">""</span>, <span class="stringliteral">"title"</span>);</div><div class="line"><a name="l00060"></a><span class="lineno"> 60</span> </div><div class="line"><a name="l00061"></a><span class="lineno"> 61</span>  writer.startElement(<span class="stringliteral">""</span>, <span class="stringliteral">""</span>, <span class="stringliteral">"link"</span>);</div><div class="line"><a name="l00062"></a><span class="lineno"> 62</span>  writer.endElement(<span class="stringliteral">""</span>, <span class="stringliteral">""</span>, <span class="stringliteral">"link"</span>);</div><div class="line"><a name="l00063"></a><span class="lineno"> 63</span> </div><div class="line"><a name="l00064"></a><span class="lineno"> 64</span>  writer.startElement(<span class="stringliteral">""</span>, <span class="stringliteral">""</span>, <span class="stringliteral">"description"</span>);</div><div class="line"><a name="l00065"></a><span class="lineno"> 65</span>  writer.characters(<span class="stringliteral">"Export from remwharead."</span>);</div><div class="line"><a name="l00066"></a><span class="lineno"> 66</span>  writer.endElement(<span class="stringliteral">""</span>, <span class="stringliteral">""</span>, <span class="stringliteral">"description"</span>);</div><div class="line"><a name="l00067"></a><span class="lineno"> 67</span> </div><div class="line"><a name="l00068"></a><span class="lineno"> 68</span>  writer.startElement(<span class="stringliteral">""</span>, <span class="stringliteral">""</span>, <span class="stringliteral">"generator"</span>);</div><div class="line"><a name="l00069"></a><span class="lineno"> 69</span>  writer.characters(<span class="keywordtype">string</span>(<span class="stringliteral">"remwharead "</span>) + global::version);</div><div class="line"><a name="l00070"></a><span class="lineno"> 70</span>  writer.endElement(<span class="stringliteral">""</span>, <span class="stringliteral">""</span>, <span class="stringliteral">"generator"</span>);</div><div class="line"><a name="l00071"></a><span class="lineno"> 71</span> </div><div class="line"><a name="l00072"></a><span class="lineno"> 72</span>  <span class="keyword">const</span> <span class="keywordtype">string</span> now = DateTimeFormatter::format(DateTime(),</div><div class="line"><a name="l00073"></a><span class="lineno"> 73</span>  timefmt_rfc822);</div><div class="line"><a name="l00074"></a><span class="lineno"> 74</span>  writer.startElement(<span class="stringliteral">""</span>, <span class="stringliteral">""</span>, <span class="stringliteral">"lastBuildDate"</span>);</div><div class="line"><a name="l00075"></a><span class="lineno"> 75</span>  writer.characters(now);</div><div class="line"><a name="l00076"></a><span class="lineno"> 76</span>  writer.endElement(<span class="stringliteral">""</span>, <span class="stringliteral">""</span>, <span class="stringliteral">"lastBuildDate"</span>);</div><div class="line"><a name="l00077"></a><span class="lineno"> 77</span> </div><div class="line"><a name="l00078"></a><span class="lineno"> 78</span>  <span class="keywordflow">for</span> (<span class="keyword">const</span> Database::entry &entry : _entries)</div><div class="line"><a name="l00079"></a><span class="lineno"> 79</span>  {</div><div class="line"><a name="l00080"></a><span class="lineno"> 80</span>  writer.startElement(<span class="stringliteral">""</span>, <span class="stringliteral">""</span>, <span class="stringliteral">"item"</span>);</div><div class="line"><a name="l00081"></a><span class="lineno"> 81</span> </div><div class="line"><a name="l00082"></a><span class="lineno"> 82</span>  writer.startElement(<span class="stringliteral">""</span>, <span class="stringliteral">""</span>, <span class="stringliteral">"title"</span>);</div><div class="line"><a name="l00083"></a><span class="lineno"> 83</span>  <span class="keywordflow">if</span> (!entry.title.empty())</div><div class="line"><a name="l00084"></a><span class="lineno"> 84</span>  {</div><div class="line"><a name="l00085"></a><span class="lineno"> 85</span>  writer.characters(entry.title);</div><div class="line"><a name="l00086"></a><span class="lineno"> 86</span>  }</div><div class="line"><a name="l00087"></a><span class="lineno"> 87</span>  <span class="keywordflow">else</span></div><div class="line"><a name="l00088"></a><span class="lineno"> 88</span>  {</div><div class="line"><a name="l00089"></a><span class="lineno"> 89</span>  constexpr std::uint8_t maxlen = 100;</div><div class="line"><a name="l00090"></a><span class="lineno"> 90</span>  <span class="keywordtype">string</span> title = entry.description.substr(0, maxlen);</div><div class="line"><a name="l00091"></a><span class="lineno"> 91</span>  <span class="keywordflow">if</span> (entry.description.length() > maxlen)</div><div class="line"><a name="l00092"></a><span class="lineno"> 92</span>  {</div><div class="line"><a name="l00093"></a><span class="lineno"> 93</span>  title += <span class="stringliteral">" […]"</span>;</div><div class="line"><a name="l00094"></a><span class="lineno"> 94</span>  }</div><div class="line"><a name="l00095"></a><span class="lineno"> 95</span>  writer.characters(title);</div><div class="line"><a name="l00096"></a><span class="lineno"> 96</span>  }</div><div class="line"><a name="l00097"></a><span class="lineno"> 97</span>  writer.endElement(<span class="stringliteral">""</span>, <span class="stringliteral">""</span>, <span class="stringliteral">"title"</span>);</div><div class="line"><a name="l00098"></a><span class="lineno"> 98</span> </div><div class="line"><a name="l00099"></a><span class="lineno"> 99</span>  writer.startElement(<span class="stringliteral">""</span>, <span class="stringliteral">""</span>, <span class="stringliteral">"link"</span>);</div><div class="line"><a name="l00100"></a><span class="lineno"> 100</span>  writer.characters(entry.uri);</div><div class="line"><a name="l00101"></a><span class="lineno"> 101</span>  writer.endElement(<span class="stringliteral">""</span>, <span class="stringliteral">""</span>, <span class="stringliteral">"link"</span>);</div><div class="line"><a name="l00102"></a><span class="lineno"> 102</span> </div><div class="line"><a name="l00103"></a><span class="lineno"> 103</span>  writer.startElement(<span class="stringliteral">""</span>, <span class="stringliteral">""</span>, <span class="stringliteral">"guid"</span>, attrs_guid);</div><div class="line"><a name="l00104"></a><span class="lineno"> 104</span>  writer.characters(entry.uri + <span class="stringliteral">" at "</span></div><div class="line"><a name="l00105"></a><span class="lineno"> 105</span>  + timepoint_to_string(entry.datetime));</div><div class="line"><a name="l00106"></a><span class="lineno"> 106</span>  writer.endElement(<span class="stringliteral">""</span>, <span class="stringliteral">""</span>, <span class="stringliteral">"guid"</span>);</div><div class="line"><a name="l00107"></a><span class="lineno"> 107</span> </div><div class="line"><a name="l00108"></a><span class="lineno"> 108</span>  <span class="keyword">const</span> time_t time = system_clock::to_time_t(entry.datetime);</div><div class="line"><a name="l00109"></a><span class="lineno"> 109</span>  <span class="keyword">const</span> <span class="keywordtype">string</span> time_visited = DateTimeFormatter::format(</div><div class="line"><a name="l00110"></a><span class="lineno"> 110</span>  Timestamp::fromEpochTime(time), timefmt_rfc822);</div><div class="line"><a name="l00111"></a><span class="lineno"> 111</span>  writer.startElement(<span class="stringliteral">""</span>, <span class="stringliteral">""</span>, <span class="stringliteral">"pubDate"</span>);</div><div class="line"><a name="l00112"></a><span class="lineno"> 112</span>  writer.characters(time_visited);</div><div class="line"><a name="l00113"></a><span class="lineno"> 113</span>  writer.endElement(<span class="stringliteral">""</span>, <span class="stringliteral">""</span>, <span class="stringliteral">"pubDate"</span>);</div><div class="line"><a name="l00114"></a><span class="lineno"> 114</span> </div><div class="line"><a name="l00115"></a><span class="lineno"> 115</span>  <span class="keywordtype">string</span> description = entry.description;</div><div class="line"><a name="l00116"></a><span class="lineno"> 116</span>  <span class="keywordflow">if</span> (!description.empty())</div><div class="line"><a name="l00117"></a><span class="lineno"> 117</span>  {</div><div class="line"><a name="l00118"></a><span class="lineno"> 118</span>  description = <span class="stringliteral">"<p>"</span> + description.append(<span class="stringliteral">"</p>"</span>);</div><div class="line"><a name="l00119"></a><span class="lineno"> 119</span>  }</div><div class="line"><a name="l00120"></a><span class="lineno"> 120</span>  <span class="keywordflow">if</span> (!entry.tags.empty())</div><div class="line"><a name="l00121"></a><span class="lineno"> 121</span>  {</div><div class="line"><a name="l00122"></a><span class="lineno"> 122</span>  description += <span class="stringliteral">"<p><strong>Tags:</strong> "</span>;</div><div class="line"><a name="l00123"></a><span class="lineno"> 123</span>  <span class="keywordflow">for</span> (<span class="keyword">const</span> <span class="keywordtype">string</span> &tag : entry.tags)</div><div class="line"><a name="l00124"></a><span class="lineno"> 124</span>  {</div><div class="line"><a name="l00125"></a><span class="lineno"> 125</span>  description += tag;</div><div class="line"><a name="l00126"></a><span class="lineno"> 126</span>  <span class="keywordflow">if</span> (tag != *(entry.tags.rbegin()))</div><div class="line"><a name="l00127"></a><span class="lineno"> 127</span>  {</div><div class="line"><a name="l00128"></a><span class="lineno"> 128</span>  description += <span class="stringliteral">", "</span>;</div><div class="line"><a name="l00129"></a><span class="lineno"> 129</span>  }</div><div class="line"><a name="l00130"></a><span class="lineno"> 130</span>  }</div><div class="line"><a name="l00131"></a><span class="lineno"> 131</span>  description += <span class="stringliteral">"</p>"</span>;</div><div class="line"><a name="l00132"></a><span class="lineno"> 132</span>  }</div><div class="line"><a name="l00133"></a><span class="lineno"> 133</span>  <span class="keywordflow">if</span> (!entry.archive_uri.empty())</div><div class="line"><a name="l00134"></a><span class="lineno"> 134</span>  {</div><div class="line"><a name="l00135"></a><span class="lineno"> 135</span>  description += <span class="stringliteral">"<p><strong>Archived version:</strong> "</span></div><div class="line"><a name="l00136"></a><span class="lineno"> 136</span>  <span class="stringliteral">"<a href=\""</span> + entry.archive_uri + <span class="stringliteral">"\">"</span></div><div class="line"><a name="l00137"></a><span class="lineno"> 137</span>  + entry.archive_uri + <span class="stringliteral">"</a></p>"</span>;</div><div class="line"><a name="l00138"></a><span class="lineno"> 138</span>  }</div><div class="line"><a name="l00139"></a><span class="lineno"> 139</span>  writer.startElement(<span class="stringliteral">""</span>, <span class="stringliteral">""</span>, <span class="stringliteral">"description"</span>);</div><div class="line"><a name="l00140"></a><span class="lineno"> 140</span>  writer.characters(description);</div><div class="line"><a name="l00141"></a><span class="lineno"> 141</span>  writer.endElement(<span class="stringliteral">""</span>, <span class="stringliteral">""</span>, <span class="stringliteral">"description"</span>);</div><div class="line"><a name="l00142"></a><span class="lineno"> 142</span> </div><div class="line"><a name="l00143"></a><span class="lineno"> 143</span>  writer.endElement(<span class="stringliteral">""</span>, <span class="stringliteral">""</span>, <span class="stringliteral">"item"</span>);</div><div class="line"><a name="l00144"></a><span class="lineno"> 144</span>  }</div><div class="line"><a name="l00145"></a><span class="lineno"> 145</span> </div><div class="line"><a name="l00146"></a><span class="lineno"> 146</span>  writer.endElement(<span class="stringliteral">""</span>, <span class="stringliteral">""</span>, <span class="stringliteral">"channel"</span>);</div><div class="line"><a name="l00147"></a><span class="lineno"> 147</span>  writer.endElement(<span class="stringliteral">""</span>, <span class="stringliteral">""</span>, <span class="stringliteral">"rss"</span>);</div><div class="line"><a name="l00148"></a><span class="lineno"> 148</span>  writer.endDocument();</div><div class="line"><a name="l00149"></a><span class="lineno"> 149</span>  _out << endl;</div><div class="line"><a name="l00150"></a><span class="lineno"> 150</span>  }</div><div class="line"><a name="l00151"></a><span class="lineno"> 151</span>  <span class="keywordflow">catch</span> (std::exception &e)</div><div class="line"><a name="l00152"></a><span class="lineno"> 152</span>  {</div><div class="line"><a name="l00153"></a><span class="lineno"> 153</span>  cerr << <span class="stringliteral">"Error in "</span> << __func__ << <span class="stringliteral">": "</span> << e.what() << endl;</div><div class="line"><a name="l00154"></a><span class="lineno"> 154</span>  }</div><div class="line"><a name="l00155"></a><span class="lineno"> 155</span> }</div></div><!-- fragment -->
|
|
</div>
|
|
</div>
|
|
<hr/>The documentation for this class was generated from the following files:<ul>
|
|
<li>include/export/<a class="el" href="rss_8hpp_source.html">rss.hpp</a></li>
|
|
<li>src/lib/export/rss.cpp</li>
|
|
</ul>
|
|
</div><!-- contents -->
|
|
<!-- start footer part -->
|
|
<hr class="footer"/><address class="footer"><small>
|
|
Generated by  <a href="http://www.doxygen.org/index.html">
|
|
<img class="footer" src="doxygen.png" alt="doxygen"/>
|
|
</a> 1.8.15
|
|
</small></address>
|
|
</body>
|
|
</html>
|