Browse Source

Introduce Software Freedom Podcast: episodes as HTML and RSS (#1065)

pull/1110/head
Max Mehl 1 month ago
parent
commit
24f32049b1

+ 13
- 1
build/xslt/fsfe_headings.xsl View File

@@ -8,7 +8,8 @@
<!-- Apply news page PRE-rules -->
<xsl:if test="string(/buildinfo/document/@newsdate) and
(not(string(/buildinfo/document/@type)) or
/buildinfo/document/@type != 'newsletter')">
/buildinfo/document/@type != 'newsletter' and
/buildinfo/document/@type != 'podcast')">
<!-- add link to press/press.xx.html -->
<xsl:element name="p">
@@ -31,6 +32,17 @@
</xsl:element>
</xsl:if>
<!-- Apply podcast page PRE-rules -->
<xsl:if test="string(/buildinfo/document/@newsdate) and /buildinfo/document/@type = 'podcast'">
<xsl:element name="p">
<xsl:attribute name="id">category</xsl:attribute>
<xsl:element name="a">
<xsl:attribute name="href">/news/podcast.<xsl:value-of select="/buildinfo/@language"/>.html</xsl:attribute>
<xsl:call-template name="fsfe-gettext"><xsl:with-param name="id" select="'podcast'" /></xsl:call-template>
</xsl:element>
</xsl:element>
</xsl:if>

<!-- auto generate ID for headings if it doesn't already exist -->
<xsl:call-template name="generate-id" />

BIN
graphics/podcast-logo.png View File


+ 56
- 0
graphics/services/podcast.svg View File

@@ -0,0 +1,56 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
viewBox="0 0 512 512"
version="1.1"
id="svg4"
sodipodi:docname="podcast.svg"
width="512"
height="512"
inkscape:version="0.92.4 5da689c313, 2019-01-14">
<metadata
id="metadata10">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title></dc:title>
</cc:Work>
</rdf:RDF>
</metadata>
<defs
id="defs8" />
<sodipodi:namedview
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1"
objecttolerance="10"
gridtolerance="10"
guidetolerance="10"
inkscape:pageopacity="0"
inkscape:pageshadow="2"
inkscape:window-width="1920"
inkscape:window-height="1010"
id="namedview6"
showgrid="false"
inkscape:zoom="0.4609375"
inkscape:cx="234.84746"
inkscape:cy="256"
inkscape:window-x="0"
inkscape:window-y="23"
inkscape:window-maximized="1"
inkscape:current-layer="svg4" />
<path
d="M 299.429,488.563 C 294.286,507.573 274.858,512 256,512 237.143,512 217.714,507.573 212.572,488.563 204.927,460.134 192,388.898 192,355.75 192,320.594 223.142,312 256,312 c 32.858,0 64,8.594 64,43.75 0,32.949 -12.871,104.179 -20.571,132.813 z M 188.867,288.554 c -18.693,-18.308 -29.958,-44.173 -28.784,-72.599 2.054,-49.724 42.395,-89.956 92.124,-91.881 C 306.862,121.958 352,165.807 352,220 c 0,26.827 -11.064,51.116 -28.866,68.552 -2.675,2.62 -2.401,6.986 0.628,9.187 9.312,6.765 16.46,15.343 21.234,25.363 1.741,3.654 6.497,4.66 9.449,1.891 C 383.271,297.95 400.998,259.21 399.956,216.428 398.101,140.222 336.361,78.22 260.163,76.059 178.869,73.753 112,139.215 112,220 c 0,41.361 17.532,78.7 45.55,104.989 2.953,2.771 7.711,1.77 9.453,-1.887 4.774,-10.021 11.923,-18.598 21.235,-25.363 3.029,-2.2 3.304,-6.566 0.629,-9.185 z M 256,0 C 132.204,0 32,100.185 32,224 c 0,89.992 52.602,165.647 125.739,201.408 4.333,2.118 9.267,-1.544 8.535,-6.31 -2.382,-15.512 -4.342,-30.946 -5.406,-44.339 -0.146,-1.836 -1.149,-3.486 -2.678,-4.512 C 110.79,338.441 79.626,284.231 80.003,222.9 80.595,126.663 159.293,48.252 255.532,48.001 352.793,47.747 432,126.797 432,224 c 0,61.932 -32.158,116.49 -80.65,147.867 -0.999,14.037 -3.069,30.588 -5.624,47.23 -0.732,4.767 4.203,8.429 8.535,6.31 C 427.227,389.727 480,314.187 480,224 480,100.205 379.815,0 256,0 Z m 0,160 c -35.346,0 -64,28.654 -64,64 0,35.346 28.654,64 64,64 35.346,0 64,-28.654 64,-64 0,-35.346 -28.654,-64 -64,-64 z"
id="path2"
inkscape:connector-curvature="0"
style="fill:#000000;fill-opacity:1" />
</svg>

BIN
graphics/services/podcast_white.png View File


+ 2
- 0
index.sources View File

@@ -6,6 +6,8 @@ news/nl/nl-$thisyear*:[front-page]
news/nl/nl-$lastyear*:[front-page]
news/nl/.nl-$thisyear*:[front-page]
news/nl/.nl-$lastyear*:[front-page]
#news/podcast/episode-*:[front-page]
#news/podcast/.episode-*:[front-page]
events/$thisyear/event-*:[front-page]
tools/frontpage/*:[]
tools/static-elements/element-*:[]

+ 239
- 0
look/elements/sharebuttons.less View File

@@ -0,0 +1,239 @@
/* SOCIAL NETWORK SHARE BUTTONS (below articles and pages) */
.share-buttons.bottom {
margin: 4em 0 -2em 0;
}

.share-buttons-top {
align-items: center;
display: flex;
flex-wrap: wrap;
}

.share-buttons-sidebar {
padding-left: 2rem;
}

.share-button-top,
.share-button-sidebar,
.share-buttons.bottom button.button,
.share-buttons.bottom label.button {
display: inline-block;
margin: 2.5px 5px 2.5px 0;
color: #fff;
font-weight: normal;
font-size: 1em;
line-height: normal;
text-align: center;
text-decoration: none;
padding: 7px 7px 7px 20px;
width: 19%;
min-width: 100px;
max-width: 110px;
border: none;
border-radius: 3px;
background-position: left 5px center;
background-repeat: no-repeat;
background-size: 20px auto;
opacity: 0.9;
vertical-align: top;
}

.share-buttons-inline button{
vertical-align: middle;
}

.share-button-top,
.share-buttons.bottom,
.share-buttons-inline,
.share-buttons-sidebar {
font-size: .7em;
}

.share-buttons-top,
.share-buttons-sidebar,
.share-buttons-inline,
.share-buttons.bottom {

a:hover {
text-decoration: none;
}

.share-rss {
background-color: #f4a000;
background-image: url("/graphics/services/rss_white.png");
}

.share-rss:hover {
background-color: #f78200 !important;
}

.share-mail {
background-color: #6e6e6e;
background-image: url("/graphics/services/mail_white.png");
}

.share-mail:hover {
background-color: #272727 !important;
}

.share-mastodon {
background-color: #2b90d9;
background-image: url("/graphics/services/mastodon_white.png");
}

.share-mastodon:hover {
background-color: #1060a9 !important;
}

.share-diaspora {
background-color: #404040;
background-image: url("/graphics/services/diaspora_white.png");
}

.share-diaspora:hover {
background-color: #101010 !important;
}

.share-facebook {
background-color: #3b5998;
background-image: url("/graphics/services/facebook_white.png");
}

.share-facebook:hover {
background-color: #143271 !important;
}

.share-twitter {
background-color: #55acee;
background-image: url("/graphics/services/twitter_white.png");
}

.share-twitter:hover {
background-color: #338acc !important;
}

.share-podcast {
background-color: #9AB30E;
background-image: url("/graphics/services/podcast_white.png");
}

.share-podcast:hover {
background-color: #738607 !important;
}

.share-support {
background-color: #9AB30E;
background-image: url("/graphics/services/fsfe_white.png");
padding-left: 25px;

&:hover {
background-color: #0a1763 !important;
}
}
}

.share-buttons.bottom .share-gplus {
background-color: #d34836;
background-image: url("/graphics/services/gplus_white.png");
}

.share-buttons.bottom .share-gplus:hover {
background-color: #b12614 !important;
}

.share-buttons.bottom .share-flattr {
background-color: #7ea352;
background-image: url("/graphics/services/flattr_white.png");
}

.share-buttons.bottom .share-flattr:hover {
background-color: #5a7f2e !important;
}

.share-buttons.bottom .share-reddit {
background-color: #ff5700;
background-image: url("/graphics/services/reddit_white.png");
}

.share-buttons.bottom .share-reddit:hover {
background-color: #dd3500 !important;
}

.share-buttons.bottom .share-gnusocial {
background-color: #a22430;
background-image: url("/graphics/services/gnusocial_white.png");
}

.share-buttons.bottom .share-gnusocial:hover {
background-color: #850713 !important;
}

.share-buttons.bottom .share-hnews {
background-color: #ff6600;
background-image: url("/graphics/services/hackernews_white.png");
}

.share-buttons.bottom .share-hnews:hover {
background-color: #dd3500 !important;
}

/* Share buttons form layout and behaviour hacks */
.share-buttons input[type="radio"],
.share-buttons input[type="radio"] + span,
.share-buttons input[type="checkbox"],
.share-buttons input[type="checkbox"] + span {
display: none;
}

.share-buttons input[type="radio"]:checked + span,
.share-buttons input[type="checkbox"]:checked + span {
position: absolute;
margin-top: 3.5em;
margin-left: -10em;
padding: .5em;
z-index: 3;
background-color: #333;
border-radius: .5em;
display: inline-block;
}

.share-buttons input[type="radio"]:checked + span:before,
.share-buttons input[type="checkbox"]:checked + span:before {
content: '';
position: absolute;
top: -1em;
height: 0em;
width: 0em;
border-bottom: 1em solid #333;
border-left: 1em solid transparent;
border-right: 1em solid transparent;
z-index: 3;
}

.share-buttons input[type="radio"] + span > * {
vertical-align: middle;
}

.share-buttons input[type="radio"] + span > button {
margin: 2.5px 0 2.5px 5px;
min-width: 4em;
padding: .25em;
font-weight: normal;
font-size: 1em;
line-height: normal;
}

.share-buttons input[type="radio"] + span > label {
position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
z-index: -1;
background-color: rgba(0, 0, 0, .5);
}

/* Separate share buttons form from possibly floating content */
form.share-buttons {
clear: both;
}

+ 2
- 225
look/fsfe.less View File

@@ -1,5 +1,6 @@
@import "style.less";
@import "elements/figure";
@import "elements/sharebuttons";
@import "pages/interview";

/* fsfe.org pages */
@@ -754,231 +755,6 @@ form.thankyou {
}


/* SOCIAL NETWORK SHARE BUTTONS (below articles and pages) */
.share-buttons.bottom {
margin: 4em 0 -2em 0;
}

.share-buttons-top {
align-items: center;
display: flex;
flex-wrap: wrap;
}

.share-buttons-sidebar {
padding-left: 2rem;
}

.share-button-top,
.share-button-sidebar,
.share-buttons.bottom a.button,
.share-buttons.bottom button.button,
.share-buttons.bottom label.button {
background-position: left 5px center;
background-repeat: no-repeat;
background-size: 20px auto;
border: none;
border-radius: 3px;
color: #fff;
cursor: pointer;
display: inline-block;
font-size: 1em;
font-weight: normal;
line-height: normal;
margin: 2.5px 5px 2.5px 0;
min-width: 100px;
opacity: 0.9;
padding: 7px 7px 7px 30px;
text-align: center;
text-decoration: none;
vertical-align: top;
}

.share-button-top,
.share-buttons.bottom,
.share-buttons-sidebar {
font-size: .7em;
}

.share-buttons-top,
.share-buttons-sidebar,
.share-buttons.bottom {

a:hover {
text-decoration: none;
}

.share-rss {
background-color: #f4a000;
background-image: url("/graphics/services/rss_white.png");
}

.share-rss:hover {
background-color: #f78200 !important;
}

.share-mail {
background-color: #6e6e6e;
background-image: url("/graphics/services/mail_white.png");
}

.share-mail:hover {
background-color: #272727 !important;
}

.share-mastodon {
background-color: #2b90d9;
background-image: url("/graphics/services/mastodon_white.png");
}

.share-mastodon:hover {
background-color: #1060a9 !important;
}

.share-diaspora {
background-color: #404040;
background-image: url("/graphics/services/diaspora_white.png");
}

.share-diaspora:hover {
background-color: #101010 !important;
}

.share-facebook {
background-color: #3b5998;
background-image: url("/graphics/services/facebook_white.png");
}

.share-facebook:hover {
background-color: #143271 !important;
}

.share-twitter {
background-color: #55acee;
background-image: url("/graphics/services/twitter_white.png");
}

.share-twitter:hover {
background-color: #338acc !important;
}

.share-support {
background-color: #202d79;
background-image: url("/graphics/services/fsfe_white.png");
padding-left: 25px;

&:hover {
background-color: #0a1763 !important;
}
}
}

.share-buttons.bottom .share-gplus {
background-color: #d34836;
background-image: url("/graphics/services/gplus_white.png");
}

.share-buttons.bottom .share-gplus:hover {
background-color: #b12614 !important;
}

.share-buttons.bottom .share-flattr {
background-color: #7ea352;
background-image: url("/graphics/services/flattr_white.png");
}

.share-buttons.bottom .share-flattr:hover {
background-color: #5a7f2e !important;
}

.share-buttons.bottom .share-reddit {
background-color: #ff5700;
background-image: url("/graphics/services/reddit_white.png");
}

.share-buttons.bottom .share-reddit:hover {
background-color: #dd3500 !important;
}

.share-buttons.bottom .share-gnusocial {
background-color: #a22430;
background-image: url("/graphics/services/gnusocial_white.png");
}

.share-buttons.bottom .share-gnusocial:hover {
background-color: #850713 !important;
}

.share-buttons.bottom .share-hnews {
background-color: #ff6600;
background-image: url("/graphics/services/hackernews_white.png");
}

.share-buttons.bottom .share-hnews:hover {
background-color: #dd3500 !important;
}

/* Share buttons form layout and behaviour hacks */
.share-buttons input[type="radio"],
.share-buttons input[type="radio"] + span,
.share-buttons input[type="checkbox"],
.share-buttons input[type="checkbox"] + span {
display: none;
}

.share-buttons input[type="radio"]:checked + span,
.share-buttons input[type="checkbox"]:checked + span {
position: absolute;
margin-top: 3.5em;
margin-left: -10em;
padding: .5em;
z-index: 3;
background-color: #333;
border-radius: .5em;
display: inline-block;
}

.share-buttons input[type="radio"]:checked + span:before,
.share-buttons input[type="checkbox"]:checked + span:before {
content: '';
position: absolute;
top: -1em;
height: 0em;
width: 0em;
border-bottom: 1em solid #333;
border-left: 1em solid transparent;
border-right: 1em solid transparent;
z-index: 3;
}

.share-buttons input[type="radio"] + span > * {
vertical-align: middle;
}

.share-buttons input[type="radio"] + span > button {
margin: 2.5px 0 2.5px 5px;
min-width: 4em;
padding: .25em;
font-weight: normal;
font-size: 1em;
line-height: normal;
}

.share-buttons input[type="radio"] + span > label {
position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
z-index: -1;
background-color: rgba(0, 0, 0, .5);
}

/* Separate share buttons form from possibly floating content */
form.share-buttons {
clear: both;
}

/* Free Your Andoid pages */
video#freeyourandroid {
max-width: 500px;
@@ -1066,3 +842,4 @@ video#freeyourandroid {
}

@import "pages/spreadtheword";


+ 2
- 0
news/news.sources View File

@@ -6,4 +6,6 @@ news/nl/nl-$thisyear*:[]
news/nl/nl-$lastyear*:[]
news/nl/.nl-$thisyear*:[]
news/nl/.nl-$lastyear*:[]
#news/podcast/episode-*:[]
#news/podcast/.episode-*:[]
tools/static-elements/element-*:[]

+ 25
- 0
news/podcast-opus.en.xhtml View File

@@ -0,0 +1,25 @@
<?xml version="1.0" encoding="utf-8" ?>

<html>
<head>
<meta name="description" content="Regular Podcast about Free Software progress and advocacy from the Free Software Foundation Europe" />
<meta name="keywords" content="podcast, free software, open source, news, update, information, audio" />
<title>FSFE - Podcast</title>
</head>

<body>
<h1>Podcast</h1>
<p>
This page is a placeholder for mere technical reasons. Please
refer to <a href="podcast.html">this page</a> for more
information on our podcast.
</p>

</body>
<timestamp>$Date$ $Author$</timestamp>
</html>
<!--
Local Variables: ***
mode: xml ***
End: ***
-->

+ 14
- 0
news/podcast-opus.rss.xsl View File

@@ -0,0 +1,14 @@
<?xml version="1.0" encoding="UTF-8"?>

<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">

<xsl:import href="podcast.rss.xsl" />
<xsl:output method="xml" encoding="utf-8" indent="yes" />

<xsl:template match="/">
<xsl:apply-templates select="/buildinfo/document">
<xsl:with-param name="audioformat" select="'opus'" />
</xsl:apply-templates>
</xsl:template>

</xsl:stylesheet>

+ 2
- 0
news/podcast-opus.sources View File

@@ -0,0 +1,2 @@
news/podcast/episode-*:[]
news/podcast/.episode-*:[]

+ 87
- 0
news/podcast.en.xhtml View File

@@ -0,0 +1,87 @@
<?xml version="1.0" encoding="UTF-8"?>

<html>
<head>
<title>Software Freedom Podcast - FSFE</title>

<meta name="description" content="Regular Podcast about Free Software progress and advocacy from the Free Software Foundation Europe" />
<meta name="keywords" content="podcast, free software, open source, news, update, information, audio" />
</head>

<body class="article">

<!-- Breadcumb -->
<p id="category"><a href="news.html">News</a></p>
<!-- / Breadcumb -->

<h1>Software Freedom Podcast</h1>

<p class="introduction">In addition to our <a href="news.html">regular news stories</a> and <a href="newsletter.html">monthly newsletter</a>, the FSFE regularly publishes the Software Freedom Podcast.</p>

<p>Subscribe with your podcast player:

<span class="share-buttons-inline">
<a href="podcast-opus.en.rss">
<button class="share-button-sidebar share-podcast">OPUS Feed</button>
</a>
<a href="podcast.en.rss">
<button class="share-button-sidebar share-podcast">MP3 Feed</button>
</a>
</span>

</p>

<include-news/>

</body>

<sidebar promo="none">
<div class="news-sidebar">
<h2>Follow our News</h2>

<p>
To keep up with our latest news, subscribe to our
<a href="news.rss">RSS feed</a> and our
<a href="newsletter.html">Newsletter</a>.
</p>

<div class="share-buttons-sidebar">
<a href="news.html">
<button class="share-button-sidebar share-support">FSFE News</button>
</a>
<a href="newsletter.html">
<button class="share-button-sidebar share-mail">Newsletter</button>
</a>
</div>

<h2>Social Media</h2>

<p>
For short news follow us on
<a href="https://mastodon.social/@fsfe">Mastodon</a>,
<a href="https://diasp.eu/u/fsfe">Diaspora</a>,
<a href="https://twitter.com/fsfe">Twitter</a>, and
<a href="https://facebook.com/thefsfe">Facebook</a>.
</p>

<div class="share-buttons-sidebar">
<a target="_blank" href="https://mastodon.social/@fsfe">
<button class="share-button-sidebar share-mastodon">Mastodon</button>
</a>
<a target="_blank" href="https://diasp.eu/u/fsfe">
<button class="share-button-sidebar share-diaspora">Diaspora</button>
</a><br/>
<a target="_blank" href="https://twitter.com/fsfe">
<button class="share-button-sidebar share-twitter">Twitter</button>
</a>
<a target="_blank" href="https://facebook.com/thefsfe">
<button class="share-button-sidebar share-facebook">Facebook</button>
</a>
</div>

<hr/>

<static-element id="video" />
</div>
</sidebar>
</html>

+ 376
- 0
news/podcast.rss.xsl View File

@@ -0,0 +1,376 @@
<?xml version="1.0" encoding="utf-8"?>

<!-- XSL stylesheet for generating podcast RSS feeds -->

<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:dt="http://xsltsl.org/date-time"
xmlns:weekdays="."
xmlns:months="."
xmlns:content="http://purl.org/rss/1.0/modules/content/"
xmlns:atom="http://www.w3.org/2005/Atom"
xmlns:psc="http://podlove.org/simple-chapters"
xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd">

<xsl:output method="xml" encoding="utf-8" indent="yes"/>

<!-- $today = current date (given as <html date="...">) -->
<xsl:variable name="today">
<xsl:value-of select="/buildinfo/@date" />
</xsl:variable>

<!-- ====== -->
<!-- Months -->
<!-- ====== -->

<months:month-names>
<months:month ref="01">Jan</months:month>
<months:month ref="02">Feb</months:month>
<months:month ref="03">Mar</months:month>
<months:month ref="04">Apr</months:month>
<months:month ref="05">May</months:month>
<months:month ref="06">Jun</months:month>
<months:month ref="07">Jul</months:month>
<months:month ref="08">Aug</months:month>
<months:month ref="09">Sep</months:month>
<months:month ref="10">Oct</months:month>
<months:month ref="11">Nov</months:month>
<months:month ref="12">Dec</months:month>
</months:month-names>

<!-- ============= -->
<!-- Link handling -->
<!-- ============= -->

<xsl:template match="link">
<xsl:param name="lang" />

<!-- Original link text -->
<xsl:variable name="link">
<xsl:value-of select="normalize-space(.)" />
</xsl:variable>

<!-- Add leading "https://fsfe.org" if necessary -->
<xsl:variable name="full-link">
<xsl:choose>
<xsl:when test="starts-with ($link, 'https:')">
<xsl:value-of select="$link" />
</xsl:when>
<xsl:when test="starts-with ($link, 'https:')">
<xsl:value-of select="$link" />
</xsl:when>
<xsl:otherwise>https://fsfe.org<xsl:value-of select="$link" />
</xsl:otherwise>
</xsl:choose>
</xsl:variable>

<!-- Insert language into link -->
<xsl:choose>
<xsl:when test="starts-with ($full-link, 'http://www.fsfeurope.org/')
and substring-before ($full-link, '.html') != ''">
<xsl:value-of select="concat (substring-before ($full-link, '.html'),
'.', $lang, '.html')" />
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="$full-link" />
</xsl:otherwise>
</xsl:choose>
</xsl:template>

<!-- ============ -->
<!-- Main routine -->
<!-- ============ -->
<xsl:template match="/buildinfo">
<xsl:apply-templates select="document" />
</xsl:template>
<xsl:template match="/buildinfo/document">

<!-- param audioformat mp3 or opus (or none), set variable $format and $alternateformat -->
<xsl:param name="audioformat" />
<xsl:variable name="format">
<xsl:choose>
<!-- default format is mp3 -->
<xsl:when test="$audioformat = ''">
<xsl:text>mp3</xsl:text>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="$audioformat" />
</xsl:otherwise>
</xsl:choose>
</xsl:variable>
<xsl:variable name="alternateformat">
<xsl:choose>
<xsl:when test="$format = 'mp3'">
<xsl:text>opus</xsl:text>
</xsl:when>
<xsl:otherwise>
<xsl:text>mp3</xsl:text>
</xsl:otherwise>
</xsl:choose>
</xsl:variable>

<!-- Language -->
<xsl:variable name="lang">
<xsl:value-of select="@language" />
</xsl:variable>

<!-- Header -->
<rss version="2.0">
<channel>
<title>Software Freedom Podcast</title>
<description>The regular podcast about Software Freedom and ongoing activities hosted by the Free Software Foundation Europe</description>
<link>https://fsfe.org/news/podcast</link>
<language><xsl:value-of select="$lang" /></language>
<copyright>Copyright (c) Free Software Foundation Europe. Creative Commons BY-SA 4.0</copyright>
<managingEditor>press@fsfe.org (FSFE Press Team)</managingEditor>
<webMaster>web@lists.fsfe.org (FSFE Webmaster Team)</webMaster>
<image>
<url>https://fsfe.org/graphics/podcast-logo.png</url>
<title>Software Freedom Podcast</title>
<width>88</width>
<height>31</height>
<link>https://fsfe.org/news/podcast</link>
</image>

<!-- self and alternate feeds (atom:link -->
<xsl:element name="atom:link">
<xsl:attribute name="href">
<xsl:text>https://fsfe.org/news/podcast</xsl:text>
<xsl:choose>
<xsl:when test="$format != 'mp3'">
<xsl:text>-</xsl:text>
<xsl:value-of select="$format" />
</xsl:when>
</xsl:choose>
<xsl:text>.</xsl:text>
<xsl:value-of select="$lang"/>.rss</xsl:attribute>
<xsl:attribute name="rel">self</xsl:attribute>
<xsl:attribute name="type">application/rss+xml</xsl:attribute>
<xsl:attribute name="title">Software Freedom Podcast (<xsl:value-of select="$format"/> Audio)</xsl:attribute>
</xsl:element>
<xsl:element name="atom:link">
<xsl:attribute name="href">
<xsl:text>https://fsfe.org/news/podcast</xsl:text>
<xsl:choose>
<xsl:when test="$alternateformat != 'mp3'">
<xsl:text>-</xsl:text>
<xsl:value-of select="$alternateformat" />
</xsl:when>
</xsl:choose>
<xsl:text>.</xsl:text>
<xsl:value-of select="$lang"/>.rss</xsl:attribute>
<xsl:attribute name="rel">alternate</xsl:attribute>
<xsl:attribute name="type">application/rss+xml</xsl:attribute>
<xsl:attribute name="title">Software Freedom Podcast (<xsl:value-of select="$alternateformat"/> Audio)</xsl:attribute>
</xsl:element>

<!-- PODCAST specific information -->
<lastBuildDate>
<xsl:variable name="timestamp">
<xsl:value-of select="/buildinfo/document/timestamp"/>
</xsl:variable>
<xsl:value-of select="substring-before(substring-after($timestamp, 'Date: '), ' $')"/>
</lastBuildDate>
<generator>FSFE website build system: podcast.rss.xsl</generator>
<itunes:type>episodic</itunes:type>
<itunes:owner>
<itunes:name>Free Software Foundation Europe (FSFE)</itunes:name>
<itunes:email>contact@fsfe.org</itunes:email>
</itunes:owner>
<itunes:author>Free Software Foundation Europe (FSFE)</itunes:author>
<itunes:category text="Technology" />
<itunes:category text="News">
<itunes:category text="Tech News" />
</itunes:category>
<itunes:keywords>free software, open source, libre, foss, floss, oss, programming, policy, talk, interview, news, tech, technology, freedom, liberty, fsfe, fsf, foundation</itunes:keywords>
<itunes:image href="https://fsfe.org/graphics/podcast-logo.png" />
<itunes:summary>The regular podcast about Software Freedom and ongoing activities hosted by the Free Software Foundation Europe</itunes:summary>
<itunes:subtitle>The monthly podcast about Free Software</itunes:subtitle>
<itunes:block>false</itunes:block>
<itunes:explicit>false</itunes:explicit>

<!-- Podcast episodes -->
<xsl:for-each select="/buildinfo/document/set/news[translate (@date, '-', '') &lt;= translate ($today, '-', '')]">
<xsl:sort select="@date" order="descending"/>
<xsl:element name="item">
<!-- Title -->
<xsl:element name="title">
<xsl:value-of select="title"/>
</xsl:element>
<xsl:element name="itunes:title">
<xsl:value-of select="title"/>
</xsl:element>

<!-- Podcast description -->
<xsl:element name="description">
<xsl:copy-of select="normalize-space(body)"/>
<xsl:text> Join the FSFE community and support the podcast: https://my.fsfe.org/support?ref=podcast</xsl:text>
</xsl:element>
<xsl:element name="itunes:summary">
<xsl:copy-of select="normalize-space(body)"/>
<xsl:text> Join the FSFE community and support the podcast: https://my.fsfe.org/support?ref=podcast</xsl:text>
</xsl:element>
<!-- Podcast body -->
<xsl:element name="content:encoded">
<xsl:text disable-output-escaping="yes">&lt;![CDATA[</xsl:text>
<xsl:choose>
<xsl:when test="body-complete">
<xsl:apply-templates select="body-complete/*"/>
</xsl:when>
<xsl:otherwise>
<xsl:copy-of select="normalize-space(body)"/>
</xsl:otherwise>
</xsl:choose>
<xsl:element name="p">
<xsl:element name="a">
<xsl:attribute name="href">https://my.fsfe.org/support?ref=podcast</xsl:attribute>
<xsl:text>Join the FSFE community and support the podcast</xsl:text>
</xsl:element>
</xsl:element>
<xsl:text disable-output-escaping="yes">]]&gt;</xsl:text>
</xsl:element>
<!-- Link and GUID -->
<xsl:if test="link != ''">
<xsl:variable name="link">
<xsl:apply-templates select="link">
<xsl:with-param name="lang" select="$lang" />
</xsl:apply-templates>
</xsl:variable>
<xsl:element name="link">
<xsl:value-of select="normalize-space($link)" />
</xsl:element>
<!-- guid -->
<xsl:element name="guid">
<xsl:attribute name="isPermaLink">false</xsl:attribute>
<xsl:value-of select="normalize-space($link)"/>
</xsl:element>
</xsl:if>

<!-- Date -->
<xsl:element name="pubDate">
<xsl:value-of select="substring-after(substring-after(@date, '-'), '-')" />
<xsl:variable name="month">
<xsl:value-of select="substring-before(substring-after(@date, '-'), '-')" />
</xsl:variable>
<xsl:text> </xsl:text>
<xsl:value-of select="document('')/*/months:month-names/months:month[@ref=$month]" />
<xsl:text> </xsl:text>
<xsl:value-of select="substring-before(@date, '-')" />
<xsl:text> 00:00:00 +0100</xsl:text>
</xsl:element>

<!-- PODCAST specific information (item) -->
<itunes:author>Free Software Foundation Europe (FSFE)</itunes:author>
<itunes:explicit>false</itunes:explicit>
<itunes:block>false</itunes:block>
<itunes:episodeType>full</itunes:episodeType>

<!-- Episode subtitle -->
<xsl:element name="itunes:subtitle">
<xsl:value-of select="podcast/subtitle"/>
</xsl:element>

<!-- Duration -->
<xsl:element name="itunes:duration">
<xsl:value-of select="podcast/duration"/>
</xsl:element>

<!-- Episode number -->
<xsl:element name="itunes:episode">
<xsl:value-of select="podcast/episode"/>
</xsl:element>

<!-- Enclosure (audio file path) -->
<xsl:element name="enclosure">
<xsl:attribute name="url">
<xsl:value-of select="podcast/*[name()=$format]/url"/>
</xsl:attribute>
<xsl:attribute name="length">
<xsl:value-of select="podcast/*[name()=$format]/length"/>
</xsl:attribute>
<xsl:attribute name="type">
<xsl:text>audio/</xsl:text>
<xsl:value-of select="$format" />
</xsl:attribute>
</xsl:element>

<!-- Chapters -->
<xsl:element name="psc:chapters">
<xsl:for-each select="podcast/chapters/chapter">
<xsl:element name="psc:chapter">
<xsl:attribute name="start"><xsl:value-of select="@start" /></xsl:attribute>
<xsl:attribute name="title"><xsl:value-of select="." /></xsl:attribute>
</xsl:element>
</xsl:for-each>
</xsl:element>

</xsl:element>
</xsl:for-each>

<!-- Footer -->
</channel>
</rss>
</xsl:template>
<!-- take care that links within <content:encoded> are not relative -->
<xsl:template match="a">
<xsl:element name="a">
<xsl:attribute name="href">
<xsl:choose>
<xsl:when test="substring(@href,1,1) = '/'">
<xsl:text>https://fsfe.org</xsl:text>
<xsl:value-of select="@href" />
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="@href" />
</xsl:otherwise>
</xsl:choose>
</xsl:attribute>
<xsl:value-of select="." />
</xsl:element>
</xsl:template>
<!-- as well as images -->
<xsl:template match="img">
<xsl:element name="img">
<xsl:attribute name="src">
<xsl:choose>
<xsl:when test="substring(@src,1,1) = '/'">
<xsl:text>https://fsfe.org</xsl:text>
<xsl:value-of select="@src" />
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="@src" />
</xsl:otherwise>
</xsl:choose>
</xsl:attribute>
</xsl:element>
</xsl:template>

<!-- remove newsteaser from <p> -->
<xsl:template match="p">
<xsl:copy>
<xsl:apply-templates select="node()" />
</xsl:copy>
</xsl:template>
<!-- Allow other basic styling elements, copy them verbatim -->
<xsl:template match="strong|em|ul|ol|li|h1|h2|h3|h4|h5|h6">
<xsl:copy>
<xsl:apply-templates select="node()"/>
</xsl:copy>
</xsl:template>
<!-- Do not copy <body-complete> to output at all -->
<xsl:template match="body-complete"/>
</xsl:stylesheet>

+ 2
- 0
news/podcast.sources View File

@@ -0,0 +1,2 @@
news/podcast/episode-*:[]
news/podcast/.episode-*:[]

+ 16
- 0
news/podcast.xsl View File

@@ -0,0 +1,16 @@
<?xml version="1.0" encoding="UTF-8" ?>

<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:import href="../tools/xsltsl/static-elements.xsl" />
<xsl:import href="../fsfe.xsl" />
<xsl:import href="news.xsl" />

<xsl:output method="html" encoding="utf-8" indent="yes" doctype-system="about:legacy-compat" />

<xsl:template match="/buildinfo/document/body">
<xsl:apply-templates />
</xsl:template>

</xsl:stylesheet>


+ 57
- 0
news/podcast/default.xsl View File

@@ -0,0 +1,57 @@
<?xml version="1.0" encoding="UTF-8"?>

<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:dt="http://xsltsl.org/date-time"
exclude-result-prefixes="dt">
<xsl:import href="../../fsfe.xsl" />
<xsl:output method="html" encoding="utf-8" indent="yes" doctype-system="about:legacy-compat" />

<!-- Podcast audio player for both MP3 and OPUS -->
<xsl:template match="audio-player">
<xsl:element name="audio">
<xsl:attribute name="controls" />
<xsl:attribute name="style">width:100%;</xsl:attribute>
<!-- OPUS -->
<xsl:element name="source">
<xsl:attribute name="src">
<xsl:value-of select="/buildinfo/document/podcast/opus/url" />
</xsl:attribute>
<xsl:attribute name="type">audio/ogg;codecs=opus</xsl:attribute>
</xsl:element>
<!-- MP3 -->
<xsl:element name="source">
<xsl:attribute name="src">
<xsl:value-of select="/buildinfo/document/podcast/mp3/url" />
</xsl:attribute>
<xsl:attribute name="type">audio/mp3</xsl:attribute>
</xsl:element>
<xsl:text>Your browser dows not support the audio element.</xsl:text>
</xsl:element>

<!-- Download -->
<xsl:element name="p">
<xsl:element name="em">
<xsl:call-template name="gettext">
<xsl:with-param name="id" select="'download'" />
</xsl:call-template>
</xsl:element>
<xsl:text>: </xsl:text>
<xsl:element name="a">
<xsl:attribute name="href">
<xsl:value-of select="/buildinfo/document/podcast/opus/url" />
</xsl:attribute>
OPUS
</xsl:element>
<xsl:text> | </xsl:text>
<xsl:element name="a">
<xsl:attribute name="href">
<xsl:value-of select="/buildinfo/document/podcast/mp3/url" />
</xsl:attribute>
MP3
</xsl:element>
</xsl:element>
</xsl:template>
</xsl:stylesheet>

+ 100
- 0
news/podcast/episode-1.en.xhtml View File

@@ -0,0 +1,100 @@
<?xml version="1.0" encoding="UTF-8"?>
<html newsdate="2019-10-12" type="podcast">
<head>
<title>SFP #1: On DRM with Cory Doctorow</title>
</head>
<body class="article">

<h1>
SFP #1: On DRM with Cory Doctorow
</h1>

<p newsteaser="yes">
We have a Podcast! Starting with this episode we will talk once a
month with people who have inspiring ideas about software freedom. In
our very first episode of our Software Freedom Podcast we address the
issue of DRM together with Cory Doctrow. There are just very few
people that inspired so many people from the Free Software community,
like Cory Doctorow. For those listeners, who don't know him: Cory
Doctorow is a British-Canadian writer and political activist and
co-editor of the blog boingboing.net. And he is a prominent supporter
of the idea of Software Freedom and a less restrictive copyright law.
His books are published under Creative Commons licenses.
</p>

<audio-player />

<p>
When we were planning the first episode, we exchanged some ideas for
possible guests. When we heard that the Day Against DRM will take
place in October we directly thought: we have to get Cory Doctorow as
our first guest on digital restriction management. In our Software
Freedom Podcast we talk about the difference between book and an
e-book with DRM, how authors and artist can make money without DRM
and lots of other questions related to this issue.
</p>

<h2>Today's "Day Against DRM"</h2>

<p>
Digital Restrictions Management (DRM) is any technology that is built
into an electronic product or service with the aim of limiting its
range of uses after purchase. It is designed to prevent customers
from using digital technology in ways that do not correspond to the
business agenda of a content provider or device manufacturer.
</p>

<p>
DRM is a class of technologies intended to limit the use of digital
media and devices after sale. In essence, DRM refers to technology
which inhibits a particular use of digital media where that use is
not desired or intended by the hardware manufacturer, publisher or
copyright holder. Free Software is software that puts the user in
control of their own computers and devices. In contrast, Digital
Restrictions Management is technology to put the user under control
of a third party: these two goals seem fundamentally incompatible.
</p>

<p>Read more:</p>

<ul>
<li><a href="https://www.defectivebydesign.org/dayagainstdrm/2019">Day against DRM 2019</a></li>
<li><a href="https://fsfe.org/activities/drm/drm.html">More information about DRM</a></li>
<li><a href="https://fsfe.org/contribute/spreadtheword#drm-leaflet">Informative leaflet explaining DRM</a></li>
<li><a href="https://boingboing.net/">Boing Boing</a></li>
</ul>

</body>

<tags>
<tag>front-page</tag>
</tags>

<!-- Meta data for podcast, update with each episode! -->
<podcast>
<subtitle>Interview with Cory Doctorow about DRM, how lack of technological control affects our society today and in the future, and his latest book "Unauthorized Bread". The perfect episode for the annual Day against DRM!</subtitle>
<duration>39:42</duration>
<episode>1</episode> <!-- number of episode -->
<!-- OPUS -->
<opus>
<url>https://download.fsfe.org/audio/podcast/SFP01.opus</url>
<length>9737111</length> <!-- size of file in bytes -->
</opus>
<!-- MP3 -->
<mp3>
<url>https://download.fsfe.org/audio/podcast/SFP01.mp3</url>
<length>38125101</length> <!-- size of file in bytes -->
</mp3>
<chapters>
<chapter start="0:00">Welcome to the podcast</chapter>
<chapter start="0:25">Introduction to DRM and Cory Doctorow</chapter>
<chapter start="38:38">Conclusion and closing words</chapter>
</chapters>
</podcast>

</html>
<!--
Local Variables: ***
mode: xml ***
End: ***
-->

+ 2
- 0
news/xhtml2xml.xsl View File

@@ -55,6 +55,8 @@
<xsl:copy-of select="/html/tags" />
<xsl:copy-of select="/html/author" />
<!-- Copy data of <podcast> to XML files -->
<xsl:copy-of select="/html/podcast" />
</xsl:element>
</xsl:element>

+ 1
- 0
tools/texts-en.xml View File

@@ -112,6 +112,7 @@
<text id="learn-more">Learn more</text>
<text id="press">Press</text>
<text id="newsletter">Newsletter</text>
<text id="podcast">Podcast</text>

<text id="go-to">Go to:</text>
<text id="search">Search</text>

Loading…
Cancel
Save