Skip to content

Commit

Permalink
updated
Browse files Browse the repository at this point in the history
  • Loading branch information
Shamaine committed Aug 21, 2024
1 parent 1d630aa commit 22dfcea
Show file tree
Hide file tree
Showing 3 changed files with 46 additions and 0 deletions.
43 changes: 43 additions & 0 deletions feed.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
import yaml
import xml.etree.ElementTree as xml_tree

with open('feed.yaml','r') as file:
yaml_data = yaml.safe_load(file)

rss_element = xml_tree.Element('rss',{
"version":"2.0" ,
"xmlns:itunes":"http://www.itunes.com/dtds/podcast-1.0.dtd",
"xmlns:content":"http://purl.org/rss/1.0/modules/content/"})

channel_element = xml_tree.SubElement(rss_element,'channel')

link_prefix = yaml_data['link']

xml_tree.SubElement(channel_element,'title').text = yaml_data ['title']
xml_tree.SubElement(channel_element,'format').text = yaml_data ['format']
xml_tree.SubElement(channel_element,'subtitle').text = yaml_data ['subtitle']
xml_tree.SubElement(channel_element,'itunes:author').text = yaml_data ['author']
xml_tree.SubElement(channel_element,'description').text = yaml_data ['description']
xml_tree.SubElement(channel_element,'itunes:image',{'href':link_prefix + yaml_data ['image']})
xml_tree.SubElement(channel_element,'language').text = yaml_data ['category']
xml_tree.SubElement(channel_element,'link').text = link_prefix

xml_tree.SubElement(channel_element,'itunes:category',{'text':yaml_data ['category']})

for item in yaml_data ['item']:
item_element = xml_tree.SubElement(channel_element,'item')
xml_tree.SubElement(item_element,'title').text=item['title']
xml_tree.SubElement(item_element,'itunes:author').text=yaml_data['author']
xml_tree.SubElement(item_element,'description').text=item['description']
xml_tree.SubElement(item_element,'itunes:duration').text=item['duration']
xml_tree.SubElement(item_element,'pubDate').text=item['published']

enclosure = xml_tree.SubElement(item_element,'enclosure',{'url':link_prefix + item['file'],'type':'audio/mpeg','length':item['length']})



output_tree = xml_tree.ElementTree(rss_element)
output_tree.write('podcast.xml',encoding ='UTF-8',xml_declaration =True)



1 change: 1 addition & 0 deletions feed.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ image: /images/artwork.jpg
language: en-us
category: Technology
format: audio/mpeg
link: https://shamaine.github.io/podcast-test/
item:
- title: EP01-What's Happening in 2023
description: Ray Villalobos and Content Managers Natalie Pao and Simon St. Laurent discuss what 2023 holds for the future in technology.
Expand Down
2 changes: 2 additions & 0 deletions podcast.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
<?xml version='1.0' encoding='UTF-8'?>
<rss version="2.0" xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd" xmlns:content="http://purl.org/rss/1.0/modules/content/"><channel><title>The Future in Tech</title><format>audio/mpeg</format><subtitle>Powered by LinkedIn Learning</subtitle><itunes:author>Ray Villalobos</itunes:author><description>Conversations with leaders building next generation techology tools.</description><itunes:image href="https://shamaine.github.io/podcast-test//images/artwork.jpg" /><language>Technology</language><link>https://shamaine.github.io/podcast-test/</link><itunes:category text="Technology" /><item><title>EP01-What's Happening in 2023</title><itunes:author>Ray Villalobos</itunes:author><description>Ray Villalobos and Content Managers Natalie Pao and Simon St. Laurent discuss what 2023 holds for the future in technology.</description><itunes:duration>00:00:36</itunes:duration><pubDate>Thu, 12 Jan 2023 18:00:00 GMT</pubDate><enclosure url="https://shamaine.github.io/podcast-test//audio/TFIT01.mp3" type="audio/mpeg" length="576,324" /></item><item><title>EP02-What is Generative AI?</title><itunes:author>Ray Villalobos</itunes:author><description>Pinar Demirdag discusses the fundamentals of generative AI, its practical applications, and future developments as companies create AI strategies in 2023.</description><itunes:duration>00:00:22</itunes:duration><pubDate>Thu, 19 Jan 2023 18:00:00 GMT</pubDate><enclosure url="https://shamaine.github.io/podcast-test//audio/TFIT02.mp3" type="audio/mpeg" length="351,963" /></item><item><title>EP03-How Generative AI Will Change DevOps</title><itunes:author>Ray Villalobos</itunes:author><description>Jerome Hardaway explores how generative AI can revolutionize the software development process by increasing efficiency, automating repetitive tasks, and creating more sophisticated and innovative solutions.</description><itunes:duration>00:00:19</itunes:duration><pubDate>Thu, 26 Jan 2023 18:00:00 GMT</pubDate><enclosure url="https://shamaine.github.io/podcast-test//audio/TFIT03.mp3" type="audio/mpeg" length="305,488" /></item><item><title>EP04-Building Responsible AI Systems</title><itunes:author>Ray Villalobos</itunes:author><description>Ayodele Odubela, a Data Scientist, Machine Learning professional and AI Entrepreneur, discusses the ethical issues surrounding the rapid adoption of AI systems, including transparency, minimizing bias, ensuring fairness, and potential ramifications around privacy, security, and governance.</description><itunes:duration>00:00:29</itunes:duration><pubDate>Thu, 2 Feb 2023 18:00:00 GMT</pubDate><enclosure url="https://shamaine.github.io/podcast-test//audio/TFIT04.mp3" type="audio/mpeg" length="470,668" /></item><item><title>EP05-Crafting an AI Strategy For Your Business</title><itunes:author>Ray Villalobos</itunes:author><description>Andreas Welsch joins this discussion to share insights on crafting an AI strategy for businesses that considers evolving technology, ethics, and legal implications, drawing from his extensive experience in managing stakeholder relationships and leading AI projects across Fortune 500 companies.</description><itunes:duration>00:00:22</itunes:duration><pubDate>Thu, 9 Feb 2023 18:00:00 GMT</pubDate><enclosure url="https://shamaine.github.io/podcast-test//audio/TFIT05.mp3" type="audio/mpeg" length="352,587" /></item></channel></rss>

0 comments on commit 22dfcea

Please sign in to comment.