ifmeorg / ifme

Free, open source mental health communication web app to share experiences with loved ones
http://www.if-me.org/
GNU Affero General Public License v3.0
1.49k stars 745 forks source link

Atom/RSS feed should be generated when new blog posts are added #628

Closed andy5995 closed 6 years ago

andy5995 commented 7 years ago

When new blog posts are added, or existing ones updated, if me should generate its own xml feed that is on the if-me.org server.

Ideally, the feed should be validated after it's created or changed. There may be an existing tool or external library that could do that. Some type of alert (email, message to a Slack channel) should get sent if the feed fails to validate.

Here is an example of an xml file with two entries:

<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[if me - Medium]]></title>
        <description><![CDATA[We are an open source, not-for-profit mental health app you can use at www.if-me.org to share your stories with loved ones. Our blog aims to break the stigma of mentaI health one resource, one story, one community member at a time. - Medium]]></description>
        <link>https://medium.com/ifme?source=rss----40f6ef4435b2---4</link>
        <image>
            <url>https://cdn-images-1.medium.com/proxy/1*MXL-j6S8fTEd8UFP_foEEw.png</url>
            <title>if me - Medium</title>
            <link>https://medium.com/ifme?source=rss----40f6ef4435b2---4</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Wed, 13 Sep 2017 18:25:01 GMT</lastBuildDate>
        <atom:link href="https://medium.com/feed/ifme" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com" rel="hub"/>
        <item>
            <title><![CDATA[13 Songs to Reduce Anxiety & Stress]]></title>
            <link>https://medium.com/ifme/13-songs-to-reduce-anxiety-stress-58eb9b362867?source=rss----40f6ef4435b2---4</link>
            <guid isPermaLink="false">https://medium.com/p/58eb9b362867</guid>
            <category><![CDATA[mental-health]]></category>
            <category><![CDATA[psychology]]></category>
            <category><![CDATA[anxiety]]></category>
            <category><![CDATA[stress]]></category>
            <category><![CDATA[music]]></category>
            <dc:creator><![CDATA[Desi Rottman]]></dc:creator>
            <pubDate>Sun, 10 Sep 2017 18:05:07 GMT</pubDate>
            <atom:updated>2017-09-11T11:16:20.344Z</atom:updated>
            <content:encoded><![CDATA[<p>By: <a href="https://medium.com/u/c78548ff1065">Desi Rottman</a></p><h4>A Playlist Of Songs to Pick You Up When You’re Down</h4><p><em>If you’re interested contributing to our project in any capacity, email </em><a href="mailto:join.ifme@gmail.com"><em>join.ifme@gmail.com</em></a><em>!</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*n4IbOhfGm1nLu4iF." /><figcaption><a href="https://unsplash.com/@leferme">Source</a></figcaption></figure><p>When your mind is running a thousand miles a minute, the last thing you need is some loud music in the background to serve as an additional distraction. Sometimes if you’re having a bad day, you might even want to dive into sad music, which will just feed the negativity. But often, music helps calm us down when struggling with our mental health. It’s key to have a list of calming music in your toolbox for times where you feel too overwhelmed to make a choice as to an easy, quiet soundtrack to help relax your mind. Music can be a really healthy <a href="https://medium.com/ifme/stress-awareness-2ed490e9a4be">stress-buster</a>!</p><p><a href="https://www.if-me.org/strategies">if me’s Strategies section</a> is the perfect place to keep a link or list of songs that help you calm down. Maybe there’s a particular album you like, or a <a href="https://www.youtube.com/playlist?list=PLynl2AdLA6UGR4YE-5Rc8UNAgt6DXwW4V">YouTube playlist of videos</a> you prefer.</p><p>The Strategies feature is a great place to turn to when you’re having a tough time and need ideas on practicing self-care. It can remind you of <a href="https://medium.com/ifme/strategies-for-coping-with-anxiety-3783e3a9365f">activities or actions that help you when you’re feeling anxious, depressed, or angry</a>. Having your stress-busting playlist here will make it more accessible — finding it faster will help you feel better sooner. By setting up your Strategies beforehand, you don’t have to think about what will make you feel better in the moment — you can just consult your list and start working to feel better.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*5T7FfCmEWKqgP4qC." /><figcaption><a href="https://unsplash.com/@juja_han">Source</a></figcaption></figure><p>It’s been scientifically proven that music helps cheer us up, <a href="http://www.jstor.org/stable/10.1086/665048">increase productivity</a>, <a href="https://psychcentral.com/lib/the-power-of-music-to-reduce-stress/">reduce anxiety</a>, and <a href="http://www.sciencedirect.com/science/article/pii/S0304394009003279">feel more positive</a>. <a href="https://www.theguardian.com/science/audio/2017/jan/22/a-neuroscientist-explains-how-music-affects-the-brain-podcast">Neuroscientist Dr. Daniel Glaser</a> even talks about how music can be effective in therapy for mental illness.</p><p>It’s not just the studies that prove the efficacy of music in difficult times. Some patients use music to better connect to how they’re feeling, rather than change their emotions. This is one way that can be really effective in coping with anxiety and feeling better. Listening to music in an effort to shift away from negative or anxious feelings can be a really impactful way to try to even out mood.</p><p>To start you off, we’ve put together a Spotify playlist of some tracks that help us. Ambient, airy sounds can play lightly in the background — and the soothing sounds can <a href="https://www.consciouslifestylemag.com/music-and-the-brain-affects-mood/">help your brain waves even out</a>. Tuck this playlist in your if me’s Strategies section, and it will be ready for you when you need it.</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fopen.spotify.com%2Fembed%2Fuser%2Fdesilove%2Fplaylist%2F4lisfuyTzrAIFLQKtHYKaa&amp;url=https%3A%2F%2Fopen.spotify.com%2Fuser%2Fdesilove%2Fplaylist%2F4lisfuyTzrAIFLQKtHYKaa&amp;image=https%3A%2F%2Fmosaic.scdn.co%2F640%2Fc725ce7ea28a1d4f75d3eb363795141e7809e07607ff8c69e1716fc5cb93506778038e37eec66b9ff2149ab85b184959874006e82ec1c769dbbc6411186e02446e49829bdcae9a7a96dbc8215d497f17&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=spotify" width="300" height="380" frameborder="0" scrolling="no"><a href="https://medium.com/media/7aa17f341748c1936ed9a9c818c396be/href">https://medium.com/media/7aa17f341748c1936ed9a9c818c396be/href</a></iframe><p><a href="https://medium.com/ifme/3-practical-self-esteem-boosters-5dbb258098e0"><strong>Want more? Read 3 Practical Self-Esteem Boosters</strong></a></p><p><em>You can add this playlist to your Strategies, identify the circumstances that make for difficult and positive Moments, join </em><a href="https://medium.com/ifme/the-benefit-of-support-groups-829fe0e77518"><em>Groups</em></a><em> to share your mental health experiences in a safe setting, and much more of what makes for a </em><a href="https://medium.com/ifme/mentallyhealthy2017-129705b129ec"><em>healthy life</em></a><em> with our web app at </em><a href="http://ifme.org/"><em>if-me.org</em></a><em>! You can also </em><a href="https://www.patreon.com/ifme"><em>donate to us on Patreon</em></a><em> to support our work.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=58eb9b362867" width="1" height="1"><hr><p><a href="https://medium.com/ifme/13-songs-to-reduce-anxiety-stress-58eb9b362867">13 Songs to Reduce Anxiety &amp; Stress</a> was originally published in <a href="https://medium.com/ifme">if me</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[5 if me Articles To Be Mentally Ready for School!]]></title>
            <link>https://medium.com/ifme/5-if-me-articles-to-be-mentally-ready-for-school-8b6bb5c43d7c?source=rss----40f6ef4435b2---4</link>
            <guid isPermaLink="false">https://medium.com/p/8b6bb5c43d7c</guid>
            <category><![CDATA[mental-illness]]></category>
            <category><![CDATA[education]]></category>
            <category><![CDATA[mental-health]]></category>
            <category><![CDATA[college]]></category>
            <category><![CDATA[back-to-school]]></category>
            <dc:creator><![CDATA[Bee Martinez]]></dc:creator>
            <pubDate>Sun, 20 Aug 2017 22:02:51 GMT</pubDate>
            <atom:updated>2017-08-21T23:44:50.382Z</atom:updated>
            <content:encoded><![CDATA[<p>By: <a href="https://medium.com/u/c6147bdcbf79">Bee Martinez</a></p><h4>Read, re-read, and share some first class advice</h4><p><em>If you’re interested contributing to our project in any capacity, email </em><a href="mailto:join.ifme@gmail.com"><em>join.ifme@gmail.com</em></a><em>!</em></p><p>Dear friends,</p><p>I work in education. Ever since I can remember, I barely sleep the night before the first day of school. I thought it useful to revisit advice we have shared before for different situations instead of coming up with a generic back to school post. <em>Also, I’m swamped.</em></p><h4>Without further ado…</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/800/1*AmsPTNdDsxsAZHtu72vCuw.png" /><figcaption><a href="https://www.instagram.com/ifmeorg/"><strong>We’re on Instagram</strong></a></figcaption></figure><h3>1) <a href="https://medium.com/ifme/mentallyhealthy2017-129705b129ec?source=collection_detail----40f6ef4435b2-----27----------------">Here’s to a Mentally Healthy 2017</a></h3><p>Just add 2018 after 2017!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*8-43lwSkfPu43zTbU3iE3w.jpeg" /><figcaption><a href="https://static.pexels.com/photos/8704/pen-idea-bulb-paper.jpg">Source</a></figcaption></figure><p>Our <a href="https://medium.com/ifme/mentallyhealthy2017-129705b129ec"><strong>very first article</strong></a> talks about how you can use our app to organize your allies, support groups, and self-care strategies. We also share our favourite resources to bookmark whenever things become a little too much to handle on our own.</p><h3>2) <a href="https://medium.com/ifme/bullying-more-complicated-and-hurtful-than-you-think-4cc0a2898f71?source=collection_detail----40f6ef4435b2-----25----------------">Bullying: More Complicated and Hurtful Than You Think</a></h3><p>A rundown of types, risks, and effects of bullying, and what we can do about it.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*izp6ypEzDkuN0q-xtbJtXw.jpeg" /><figcaption><a href="https://static.pexels.com/photos/6571/pexels-photo.jpeg"><strong>Source</strong></a></figcaption></figure><p>Bullying is a sad reality at school, and it’s something we should all hold ourselves accountable for whether you’re a teacher, parent, or student. <a href="https://medium.com/ifme/bullying-more-complicated-and-hurtful-than-you-think-4cc0a2898f71"><strong>Start here</strong></a>.</p><h3>3) <a href="https://medium.com/ifme/4-tips-to-beat-fomo-f414902e8cc8?source=collection_detail----40f6ef4435b2-----21----------------">Tips to Beat FoMO</a></h3><p>Yes, there’s probably going to be a lot of exciting opportunities and new things to try this year, but remember that you don’t have to do it all!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/640/1*qKSkWB5zXVYf6Yw5kQiSHA.jpeg" /><figcaption><a href="https://unsplash.com/photos/_pc8aMbI9UQ"><strong>Source</strong></a></figcaption></figure><p>So, how do we choose and take care of ourselves at the same time? <a href="https://medium.com/ifme/4-tips-to-beat-fomo-f414902e8cc8"><strong>Read to find out!</strong></a></p><h3>4)<a href="https://medium.com/ifme/stress-awareness-2ed490e9a4be?source=collection_detail----40f6ef4435b2-----10----------------"> Stress Awareness</a></h3><p>We are going to be stressed — it’s a fact. In fact, <em>I am stressed right now!</em> Tomorrow I go back to my educational aide job, I don’t really know the teachers or students I’m going to work with, and I’m still doing laundry.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/640/1*mF69H-1P6sdkRffBc0pxSg.jpeg" /><figcaption><a href="https://medium.com/ifme/4-tips-to-beat-fomo-f414902e8cc8"><strong>Source</strong></a></figcaption></figure><p>In this post, you can review the types of stress and stressors, the signs, and the difference between negative and positive responses. Maybe you will be stressed, but you will also be ready to cope with it as you should! <a href="https://medium.com/ifme/stress-awareness-2ed490e9a4be"><strong>Read more</strong></a><strong>.</strong></p><h3>5) <a href="https://medium.com/ifme/beyond-the-university-viewbook-515a5137d670?source=collection_detail----40f6ef4435b2-----4----------------">Beyond the University Viewbook</a></h3><p>Going to university or college? First of all, we’re so proud of you!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/700/1*VZRvWSzu9vvsBDrLiywqVA.jpeg" /><figcaption><a href="http://www.uc.utoronto.ca/about-uc"><strong>Source</strong></a></figcaption></figure><p>It’s an exciting time no doubt, but so many major life changes take a toll on your mental health. <a href="https://medium.com/ifme/beyond-the-university-viewbook-515a5137d670"><strong>Read this article </strong></a>to be prepared for the things that no one tells you about until it’s too late. Do take care of yourself, stay safe, and enjoy this new chapter in your life!</p><p><em>Looking for more helpful articles? </em>Check the full list of our published articles <a href="https://medium.com/ifme/stories/published"><strong>here</strong></a>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/300/1*cXrpX2eqwdmAcViRZV5dyQ.png" /></figure><p>You can document and share your mental health experiences, Moods, and Strategies, in a safe setting with<strong> </strong><a href="http://ifme.org/"><strong>if-me.org</strong></a> (now available in <a href="https://medium.com/ifme/announcing-if-me-org-in-spanish-40cb5de25b4a">Spanish</a> and <a href="https://medium.com/ifme/announcing-if-me-org-in-brazilian-portuguese-34824a163b30">Portuguese</a>).</p><p>You can add Allies and form Groups to share your Moments and receive support.</p><p>We are open source, built and maintained solely by volunteers. <a href="https://www.if-me.org/about"><strong>Contact us</strong></a> or visit our <a href="https://www.patreon.com/ifme"><strong>Patreon</strong></a> page to support us!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8b6bb5c43d7c" width="1" height="1"><hr><p><a href="https://medium.com/ifme/5-if-me-articles-to-be-mentally-ready-for-school-8b6bb5c43d7c">5 if me Articles To Be Mentally Ready for School!</a> was originally published in <a href="https://medium.com/ifme">if me</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>

In this feed, the content tag contains the complete text and any html code contained in the blog post. Some feeds only use the first x number of characters (an excerpt).

zawmoelwin commented 7 years ago

Hi @andy5995 , I’m a little confused. Can you help me by walking through the workflow you are suggesting?

I think this is what’s happening:

What I understand is we don't use medium rss feed anymore and generate our own rss feed with some route if-me.org/rss and sending our own generated xml feed.

andy5995 commented 7 years ago

Hi @zawmoelwin , I made the suggestion (post above) but not sure yet if the developers want to implement it or simply continue using the feed from medium. Someone will let you know about any specifics. :)

UPDATE: Ah, I see @julianguyen changed a label, so I'd assume the suggestion is being considered, but low priority right now.

andy5995 commented 5 years ago

I see this was also closed without discussion. I take that to mean that the medium feed is considered perfectly adequate and a native RSS feed isn't needed for any purpose. Is that correct?