basic code to generate podcast feed. Add buttons to generate and open feed. Validate input URLs

This commit is contained in:
dechert
2023-01-20 19:13:17 +01:00
parent 8a0c9d5539
commit 683e03c68d
7 changed files with 89 additions and 22 deletions

View File

@@ -1,8 +0,0 @@
{% extends "base.html" %}
{% block content %} Home Page {% endblock %}
<!--{%for _ in range(10) %}-->
<!-- <p>x</p>-->
<!--{% endfor %}-->

View File

@@ -4,10 +4,19 @@
{% block content %}
<p>Input youtube URL</p>
<p>Input youtube URL:</p>
<form action="#" method="post">
<p><input type="text" name="ytlink" placeholder="https://www.youtube.com/watch?v=abc" /> </p>
<p><input type="text" name="ytlink" placeholder="https://www.youtube.com/watch?v=b63l5MLuQcQ" /> </p>
{% if not isValidUrl %}
<label style="color: red">URL is invalid!</label>
{% endif %}
<p><input class="btn btn-primary" type="submit" value="submit" /> </p>
<input type="submit" value="generate-feed" name="generate-feed" />
{#<input type="submit" value="open-podcast" name="open-podcast" />#}
{#<a href="{{ url_for('serve_static',path = 'podcast.xml')}}">Open Podcast Feed</a>#}
<a class="btn btn-primary" href="{{ url_for('serve_static',path = 'podcast.xml')}}">Open Podcast Feed</a>
{#<button name="open-podcast" href="./static/podcast.xml"></button>#}
</form>
{% endblock %}