Comments (14)
Just completed this feature now you will be able to use the custom tags as follows:
Lets say you have the following feed entry:
<entry>
<id>yt:video:DPnJldwv22o</id>
<yt:videoId>DPnJldwv22o</yt:videoId>
<yt:channelId>UCDCHcqyeQgJ-jVSd6VJkbCw</yt:channelId>
<title>FREE Icons! How to use Bootstrap Icons v1.0.0 | Bootstrap 5 (2020)</title>
<link rel="alternate" href="https://www.youtube.com/watch?v=DPnJldwv22o"/>
<author>
<name>codeSTACKr</name>
<uri>https://www.youtube.com/channel/UCDCHcqyeQgJ-jVSd6VJkbCw</uri>
</author>
<published>2020-09-05T14:00:02+00:00</published>
<updated>2020-09-07T16:48:52+00:00</updated>
<media:group>
<media:title>FREE Icons! How to use Bootstrap Icons v1.0.0 | Bootstrap 5 (2020)</media:title>
<media:content url="https://www.youtube.com/v/DPnJldwv22o?version=3" type="application/x-shockwave-flash" width="640" height="390"/>
<media:thumbnail url="https://i1.ytimg.com/vi/DPnJldwv22o/hqdefault.jpg" width="480" height="360"/>
<media:description>👉 Sign up for my newsletter to stay up-to-date on my new course: https://codestackr.com Did you know that Bootstrap has its own icon library? Apparently, they released the first stable version, 1.0.0, last week. In this video, we'll look at how we can implement these with any of our projects even if we are not using Bootstrap. That's right! You can use these independent of Bootstrap. Bootstrap 5 is not required. Since these are MIT licensed and they are just SVGs, we can use them anywhere for FREE! Let me know what you think. Website: https://icons.getbootstrap.com/ Timestamps: 00:00 - Introduction 00:34 - Installation 01:34 - Embedding 03:07 - Sprite 04:34 - External Image 06:26 - CSS 08:32 - Style _____________________________________ 💖 Show support! PayPal: https://paypal.me/codeSTACKr _____________________________________ Watch Next: Web Development - Beginners Roadmap (2020) - https://youtu.be/iogabydg2y0 Playlist: Web Development For Beginners - https://www.youtube.com/watch?v=Ez4yHS2dsN8&list=PLkwxH9e_vrAJ0WbEsFA9W3I1W-g_BTsbt _____________________________________ Connect With Me: Website: http://www.codestackr.com Twitter: https://twitter.com/codeSTACKr Instagram: https://instagram.com/codeSTACKr Facebook: https://facebook.com/codeSTACKr _____________________________________ ** Affiliate Disclaimer: Some of the above links may be affiliate links, which may generate me a sales commission at no additional cost to you. #codeSTACKr #bootstrap5 #icons</media:description>
<media:community>
<media:starRating count="346" average="4.95" min="1" max="5"/>
<media:statistics views="6093"/>
</media:community>
</media:group>
</entry>
Use the following code To get yt:channelId
and yt:videoId
in the template as channelId
and videoId
respectively:
name: Latest blog post workflow
on:
schedule: # Run workflow automatically
- cron: '0 * * * *' # Runs every hour, on the hour
workflow_dispatch: # Run workflow manually (without waiting for the cron to be called), through the Github Actions Workflow page directly
jobs:
update-readme-with-blog:
name: Update this repo's README with latest blog posts
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: gautamkrishnar/blog-post-workflow@master
with:
feed_list: "https://example.com/feeds"
custom_tags: "channelId/yt:channelId/,videoId/yt:videoId/"
template: [$title]($url) $channelId $videoId
from blog-post-workflow.
Thanks @gautamkrishnar! I was about to open an issue, but I'm glad I checked here because this is exactly what I was looking for.
from blog-post-workflow.
@ConstantinDev including videoId
as a parameter will go beyond the scope of this project. This project focuses on feed list gneration, i am not planning to include platform specific options other than the built in filters.
But i think adding a custom_tags
argument that allows you to get the tags you are looking for on your template will be a good option.
Eg this is a youtube feed item:
<entry>
<id>yt:video:DPnJldwv22o</id>
<yt:videoId>DPnJldwv22o</yt:videoId>
<yt:channelId>UCDCHcqyeQgJ-jVSd6VJkbCw</yt:channelId>
<title>FREE Icons! How to use Bootstrap Icons v1.0.0 | Bootstrap 5 (2020)</title>
<link rel="alternate" href="https://www.youtube.com/watch?v=DPnJldwv22o"/>
<author>
<name>codeSTACKr</name>
<uri>https://www.youtube.com/channel/UCDCHcqyeQgJ-jVSd6VJkbCw</uri>
</author>
<published>2020-09-05T14:00:02+00:00</published>
<updated>2020-09-07T16:48:52+00:00</updated>
<media:group>
<media:title>FREE Icons! How to use Bootstrap Icons v1.0.0 | Bootstrap 5 (2020)</media:title>
<media:content url="https://www.youtube.com/v/DPnJldwv22o?version=3" type="application/x-shockwave-flash" width="640" height="390"/>
<media:thumbnail url="https://i1.ytimg.com/vi/DPnJldwv22o/hqdefault.jpg" width="480" height="360"/>
<media:description>👉 Sign up for my newsletter to stay up-to-date on my new course: https://codestackr.com Did you know that Bootstrap has its own icon library? Apparently, they released the first stable version, 1.0.0, last week. In this video, we'll look at how we can implement these with any of our projects even if we are not using Bootstrap. That's right! You can use these independent of Bootstrap. Bootstrap 5 is not required. Since these are MIT licensed and they are just SVGs, we can use them anywhere for FREE! Let me know what you think. Website: https://icons.getbootstrap.com/ Timestamps: 00:00 - Introduction 00:34 - Installation 01:34 - Embedding 03:07 - Sprite 04:34 - External Image 06:26 - CSS 08:32 - Style _____________________________________ 💖 Show support! PayPal: https://paypal.me/codeSTACKr _____________________________________ Watch Next: Web Development - Beginners Roadmap (2020) - https://youtu.be/iogabydg2y0 Playlist: Web Development For Beginners - https://www.youtube.com/watch?v=Ez4yHS2dsN8&list=PLkwxH9e_vrAJ0WbEsFA9W3I1W-g_BTsbt _____________________________________ Connect With Me: Website: http://www.codestackr.com Twitter: https://twitter.com/codeSTACKr Instagram: https://instagram.com/codeSTACKr Facebook: https://facebook.com/codeSTACKr _____________________________________ ** Affiliate Disclaimer: Some of the above links may be affiliate links, which may generate me a sales commission at no additional cost to you. #codeSTACKr #bootstrap5 #icons</media:description>
<media:community>
<media:starRating count="346" average="4.95" min="1" max="5"/>
<media:statistics views="6093"/>
</media:community>
</media:group>
</entry>
You can pass custom_tags: videoId/yt:videoId/,channelId/yt:channelId/
this will give you yt:channelId
as $channelId and yt:videoId
as $videoId in the template.
This feature is not available yet.
from blog-post-workflow.
I will work on this when i have time. Lets keep this issue open so that someone else can pick it up if they are interested.
from blog-post-workflow.
Hi @gautamkrishnar ... this feature helps a lot, but one question: How do I reference a property of a tag, for example media:thumbnail
> url
?
from blog-post-workflow.
@kristofzerbe can you share an RSS feed example for the same?
from blog-post-workflow.
Take your example in your comment from Sep, 21 2020. There you have a tag <media:thumbnail url="https://i1.ytimg.com/vi/DPnJldwv22o/hqdefault.jpg" width="480" height="360"/>
. My feed has exactly the same tag and I want to use the url
property.
from blog-post-workflow.
@kristofzerbe right now there isn't any API to do that. if you are trying to include the youtube video's thumbnail I recommend you to use the youtube API. Get the video ID using the above example and use the following API to return the image:
https://img.youtube.com/vi/<insert-youtube-video-id-here>/hqdefault.jpg
Example: https://img.youtube.com/vi/DPnJldwv22o/hqdefault.jpg
You can use the above in combination with the templates to generate a table. You can refer this as an example: https://github.com/Dexters-Hub/Dexters-Hub/blob/master/.github/workflows/youtube-workflow.yml
from blog-post-workflow.
@gautamkrishnar ... hhmm, I don't understand you answer yet. Let me explain my thoughts:
You have implemented custom_tags
for getting the content of a tag inside an entry
of a feed. Like yt:channelId
in your example.
But there are other tags in the feed, which carry their information not in the content, but in a named property, like <media:thumbnail url="" />
or <media:starRating count="" />
.
My question is now, how do I get the value of those properties, for example count
in the tag media:starRating
?
from blog-post-workflow.
@kristofzerbe as I mentioned earlier. It is not supported. You can only access values that are wrapped by a tag. Example:
<yt:channelId>UCDCHcqyeQgJ-jVSd6VJkbCw</yt:channelId>
You cant access the named properties of tags.
from blog-post-workflow.
Do you see any chance to handle my question as a feature request?
from blog-post-workflow.
@kristofzerbe sorry, unfortunately as far as I know the library i am using to parse the rss feeds do not support that. That's why I am unable to implement that as a feature. This is a non standard use case btw.
from blog-post-workflow.
Hi @gautamkrishnar ... You are right. RSS-Parser doesn't provide attributes of entry tags yet. I have created a pull request to achieve that ... see rbren/rss-parser#224
With this change users of blog-post-workflow should be able to write custom_tags: "mediaThumbnailUrl/media:thumbnail.url/"
, to get the value of url
out the tag media:thumbnail
into the field mediaThumbnailUrl
, if you decide to use this changed version.
from blog-post-workflow.
@kristofzerbe That's great. Will upgrade once they merge it. 👍🏻
from blog-post-workflow.
Related Issues (20)
- [Feature]: Allow ignoring the commit step HOT 2
- [Feature]: Add more debug messages HOT 1
- [Bug]: Cannot read response->item->title HOT 1
- [Bug]: fatal: unable to access HOT 6
- [Bug]: Fails when there is no <title> in <item> HOT 1
- [Bug]: TypeError: Cannot convert object to primitive value HOT 6
- Action throws error after Update HOT 4
- Not working with personal blog website HOT 1
- Question: Custom WorkFlow, Fetch Blog Post HOT 1
- [Bug]: Youtube Thumbnail doesn't load - Content Security Policy (CSP) HOT 5
- remote: Permission to username/username.git denied to github-actions[bot]. HOT 1
- [Bug]: how can we add to a different file instead of readme
- [Bug]: The max_post_count parameter doesn't work for my workflow and feed elements HOT 1
- 403 error from Netlify hosted feeds HOT 1
- [Bug]: Substack RSS Feeds returning 403s? HOT 1
- [New Source]: NAVER
- [Bug]: Node.js 16 out of date. HOT 3
- [Bug]: Medium post count status 0 HOT 3
- [Bug]: WorkFlow failed with 404 error, But I'm sure the website does work HOT 1
- [New Source]: Tistory HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from blog-post-workflow.