Added check for empty post db, added deletion of "media unsupported" string in preprocessor

master
Steven Saus 4 years ago
parent 56b14b9e2b
commit 1a9d0aef44
  1. 4
      agaetr.ini
  2. 6
      agaetr_send.sh
  3. 2
      rss_preprocessor.sh
  4. 132
      xml_references/ttrss_parsed.xml

@ -42,14 +42,14 @@ matches = bullying abuse PTSD abusive domestic incest pedophilia pedophile sexua
[CW4]
keyword = violence
matches = gun PTSD death dead dying gore hostage hostages hunting kidnap torture murder rape suicide suicidal terrorism violence weapons war warfare poison captivity captive
matches = gun PTSD death dead dying gore hostage hostages hunting kidnap torture murder rape suicide suicidal terrorism violence weapons war warfare poison captivity captive holocaust decimate kill clash attack
[CW5]
keyword = reproduction
matches = baby abortion fetus childbirth miscarriage pregnancy reproduction birth c-section
[CW6]
keyword = disorders
keyword = mental-health
matches = anorexia eating bulimia disorder mental psychatry psychatrist psychologist psychology schizophrenia psychotic psychosis bipolar borderline alcoholism AA NA
[CW7]

@ -19,6 +19,12 @@ rm "$HOME/.local/share/agaetr/posts_back.db"
#Adding string to the "posted" db
if [ -z "$instring" ];then
echo "Nothing to post."
exit
fi
echo "$instring" >> "$HOME/.local/share/agaetr/posted.db"

@ -11,4 +11,4 @@ wget -O- "https://ideatrash.net/feed" | sed -e 's/<div class="more-link-wrapper"
# <updated> -> <pubDate> (and closing tags)
wget -O- "https://my.ttrss.install/public.php?op=rss&id=-2&view-mode=all_articles&key=8293847903" | sed 's@<updated>@<pubDate>@g' | sed 's@</updated>@</pubDate>@g' > /home/steven/documents/programming/agaetr/xml_references/ttrss_parsed.xml
wget -O- "https://my.ttrss.install/public.php?op=rss&id=-2&view-mode=all_articles&key=8293847903" | sed 's@<updated>@<pubDate>@g' | sed 's@</updated>@</pubDate>@g' | sed 's@Media playback is unsupported on your device @@g' > /home/steven/documents/programming/agaetr/xml_references/ttrss_parsed.xml

@ -10,6 +10,138 @@
<link href="https://rss.stevesaus.me" rel="alternate"/>
<entry>
<id>tag:rss.stevesaus.me,2020-01-26:/25691</id>
<link href="https://friendlyatheist.patheos.com/2020/01/26/ca-mayor-removes-pledge-of-allegiance-from-meetings-because-trump-is-the-worst/" rel="alternate" type="text/html"/>
<title type="html">CA Mayor Removes Pledge of Allegiance from Meetings Because Trump is the Worst</title>
<summary type="html"><![CDATA[<p>CA Mayor Removes Pledge of Allegiance from Meetings Because Trump is the Worst
January 26,...</p>]]></summary>
<content type="html"><![CDATA[ <div>
<a href="https://friendlyatheist.patheos.com" rel="noopener noreferrer" target="_blank">
<img src="//media.patheos.com/~/media/patheos-images/wordpress/writer-themes/friendlyatheist/subdomain/friendlyatheist-logo-lg.png" alt referrerpolicy="no-referrer">
</a>
</div> <div>
<div>
<p>
<section>
<span>CA Mayor Removes Pledge of Allegiance from Meetings Because Trump is the Worst</span>
<span>January 26, 2020</span>
<span>Hemant Mehta</span> <div> </div>
<div>
<div>
<div>
<div>
<p><strong>Ford Greene</strong>, the mayor of San Anselmo, California, just pulled a move designed to infuriate conservatives who prefer symbols of patriotism over actual love of the country.</p>
<p>He decided, unilaterally, to <a href="https://www.marinij.com/2020/01/24/san-anselmo-mayor-ford-greene-dumps-pledge-of-allegiance-to-protest-trump/" rel="noopener noreferrer" target="_blank">end the practice of saying the Pledge of Allegiance</a> at town council meetings. Why? Because it&rsquo;s a mindless ritual&hellip; and because <strong>Donald Trump</strong> is an ass.</p> <blockquote><p><strong>Greene said after the meeting his decision to dump the pledge is intended to demonstrate his continuing disdain for President Donald Trump.</strong> In October 2017, Greene began taking a knee during the Pledge of Allegiance at any event he attended, including council meetings.</p>
<p>&hellip;</p>
<p>Regarding his decision to remove the pledge from the Town Council&rsquo;s routine, <strong>Greene said, &ldquo;For my taste, it&rsquo;s a little too rote an action. It smacks too much of mindless obedience in a time when independent thinking and independent municipal action is at a premium</strong> because there is so little happening on the federal level.</p>
<p>&ldquo;Over the course of the last two years, as I&rsquo;ve been taking a knee, I turn around and look at everybody,&rdquo; Greene said. &ldquo;People&rsquo;s hearts don&rsquo;t really seem to be in it. <strong>They&rsquo;re just doing something out of custom. What&rsquo;s the point?</strong>&rdquo;</p></blockquote>
<p>I don&rsquo;t know anything else about this man. But I love this man.</p>
<p>The rest of the town council, however, didn&rsquo;t approve of his action. At the very least, they&rsquo;ll have a more formal discussion about the Pledge at their next meeting on February 11. Perhaps they have a point there. But sometimes you need someone to shake up the system a little bit in order to move the discussion forward. </p>
<p>Even if the Pledge remains on the agenda, at least this gets a worthwhile conversation going about the purpose of a <em>de facto</em> prayer that adds nothing of value to these meetings.</p>
<p>(Thanks to <strong>Brian</strong> for the link)<br></p> </div>
</div>
</div> <div>
<div> <div>
<div>
</div>
<div>
</div>
</div> </div> </div>
</div> <div>
What Are Your Thoughts?<span>leave a comment</span>
</div>
<section> </section> </section>
</p> </div>
</div> ]]></content>
<pubDate>2020-01-26T13:30:21+00:00</pubDate>
<author><name>Hemant Mehta</name></author>
<source>
<id>https://friendlyatheist.patheos.com</id>
<link rel="self" href="https://friendlyatheist.patheos.com"/>
<pubDate>2020-01-26T13:30:21+00:00</pubDate>
<title>Friendly Atheist</title></source>
<category term="general"/>
<category term="politics"/>
</entry>
<entry>
<id>tag:rss.stevesaus.me,2020-01-26:/25608</id>
<link href="https://www.bbc.co.uk/news/world-asia-china-51254523" rel="alternate" type="text/html"/>
<title type="html">China coronavirus 'spreads before symptoms show'</title>
<summary type="html"><![CDATA[<p>Media playback is unsupported on your device
A new coronavirus th...</p>]]></summary>
<content type="html"><![CDATA[<figure readability="-24">
<div readability="7">
<p>Media playback is unsupported on your device</p>
</div>
</figure><p>A new coronavirus that has spread to more than 2,000 people is infectious in its incubation period - before symptoms show - making it harder to contain, Chinese officials say.</p><p>Fifty-six people have died from the virus. Health minister Ma Xiaowei told reporters the ability of the virus to spread appeared to be strengthening.</p><p>Several Chinese cities have imposed significant travel restrictions.</p><p>Wuhan in Hubei, the source of the outbreak, is in effective lockdown.</p><ul>
<li><a href="https://www.bbc.co.uk/news/world-asia-china-51202254" rel="noopener noreferrer" target="_blank">Wuhan: The London-sized city where the virus began</a></li>
<li><a href="https://www.bbc.co.uk/news/world-asia-china-51218014" rel="noopener noreferrer" target="_blank">How do you quarantine a city - and does it work?</a></li>
</ul><p>The infections were at a "crucial stage of containment", Ma Xiaowei said.</p><p>Officials announced that the sale of all wildlife in China would be banned from Sunday. The virus is thought to have originated in animals, but no cause has been officially identified.</p><p>In humans, the incubation period - during which a person has the disease, but no symptoms yet - ranges from between one and 14 days, officials believe. </p><p>Without symptoms, a person may not know they have the infection, but still be able to spread it.</p><figure>
</figure><figure>
</figure><p>This is a significant development in our understanding of the virus and the lengths China will have to go to, to stop it. </p><p>People with Sars (the last deadly coronavirus outbreak to hit China) and Ebola are contagious only when symptoms appear.</p><p>Such outbreaks are relatively easy to stop - identify and isolate people who are sick and monitor anyone they came into contact with. </p><p>Flu, however, is the most famous example of a virus that you spread before you even know you're ill. </p><p>We are not at the stage where people are saying this could be a global pandemic like swine flu.</p><p>But stopping such "symptomless spreaders" will make the job of the Chinese authorities much harder.</p><p>There are still crucial questions - how infectious are people during the incubation period, and did any of the patients outside China spread the disease in those countries before becoming sick?</p><p>And why did China's National Health Commission say the transmission ability of this virus is getting stronger?</p><figure>
</figure><h2>What's it like in Wuhan?</h2><p>The mayor of the city, Zhou Xianwang, has said he expects 1,000 new patients there. Wuhan has seen queues forming at hospitals as people seek treatment. </p><p>But Mr Zhou said an increase in private donations had helped reduce shortages of some medical equipment. </p><p>Sophie, from the UK, is inside the locked-down city. She told the BBC: "We've been stuck in the house four days. We found out about the virus on 31 December. It's just got worse and worse. Now it's really bad." </p><figure>
</figure><p>With no taxis on the streets, volunteer drivers are bringing people to the crowded hospitals.</p><p>"There are no cars, so we are responsible for bringing people there (to hospital), and we take them back, afterwards we will do disinfecting. All for free," Yin Yu told AFP news agency.</p><p>"We're fine," another driver, Zhang Lin, said. "There has to be someone who does this. We're from Wuhan, and even you guys [journalists] are here to help us, our own citizens should also come out to do this. This is our job."</p><h2>What is the virus?</h2><p>The virus itself is a new, or "novel" coronavirus - a family that normally affects animals.</p><p>One human variant causes the common cold, but another, Sars, killed hundreds in a major outbreak in 2003.</p><ul>
<li><a href="https://www.bbc.co.uk/news/health-51048366" rel="noopener noreferrer" target="_blank">Coronavirus: How worried should we be? </a></li>
<li><a href="https://www.bbc.co.uk/news/world-asia-china-51221394" rel="noopener noreferrer" target="_blank">Has China learned lessons since deadly Sars epidemic&lrm;?</a></li>
</ul><p>This new virus causes severe acute respiratory infection.</p><p>Symptoms seem to start with a fever, followed by a dry cough and then, after a week, lead to shortness of breath and some patients needing hospital treatment.</p><figure readability="-24">
<div readability="7">
<img src="https://ichef.bbci.co.uk/images/ic/720x405/p0818nlw.jpg" referrerpolicy="no-referrer">
<p>Media playback is unsupported on your device</p>
</div>
</figure><p>There is no specific cure or vaccine. </p><p>At the end of Saturday in China, there were 1975 cases and a further 2,684 suspected cases, China's National Health Commission said.</p><h2>How has it spread?</h2><p>The rapid spread of the disease coincides with the Lunar New Year festival, one of the busiest travel periods in the Chinese calendar.</p><p>From Wuhan, a city of 11 million people, the disease spread to neighbouring cities and provinces in smaller numbers. By Saturday, cases were reported across China.</p><ul>
<li><a href="https://www.bbc.co.uk/news/business-51232374" rel="noopener noreferrer" target="_blank">China's travel industry counts cost of coronavirus</a></li>
<li><a href="https://www.bbc.co.uk/news/world-asia-51224504" rel="noopener noreferrer" target="_blank">How is China coping with the coronavirus outbreak?</a></li>
</ul><p>But the disease also spread by air travel, and several countries are dealing with a handful of cases.</p><figure>
</figure><figure>
</figure><p>A small number of infections have been reported in neighbouring Asian nations, but also further afield.</p><p>Cases have been confirmed in Japan, Taiwan, Nepal, Thailand, Vietnam, Singapore, Australia, the US, and France.</p><p>Other countries have carried out tests on suspected cases - for example, the UK tested 31 people, but all results came back negative.</p><p>The US is extracting its consular staff in Wuhan, while Japan and the UK have both said they are considering evacuating citizens.</p><figure>
</figure><figure>
</figure><hr><h2>Learn more about the new virus</h2><figure>
</figure><figure>
</figure><p><strong>Are you in China? Have you been affected by the lockdown in various cities? Email </strong><a href="mailto:haveyoursay@bbc.co.uk?subject=Wuhan51230011" rel="noopener noreferrer" target="_blank"><span></span><span>haveyoursay@bbc.co.uk</span></a><strong>.</strong></p><p>Please include a contact number if you are willing to speak to a BBC journalist. You can also contact us in the following ways:</p>
<p><strong><a href="https://blockads.fivefilters.org" rel="noopener noreferrer" target="_blank">Let's block ads!</a></strong> <a href="https://blockads.fivefilters.org/acceptable.html" rel="noopener noreferrer" target="_blank">(Why?)</a></p>]]></content>
<pubDate>2020-01-26T16:07:33+00:00</pubDate>
<author><name></name></author>
<source>
<id>https://www.bbc.co.uk/news/</id>
<link rel="self" href="https://www.bbc.co.uk/news/"/>
<pubDate>2020-01-26T16:07:33+00:00</pubDate>
<title>BBC News - World</title></source>
</entry>
<entry>
<id>tag:rss.stevesaus.me,2020-01-20:/20710</id>
<link href="https://talkingpointsmemo.com/news/house-democrats-response-trump-senate-summons" rel="alternate" type="text/html"/>

Loading…
Cancel
Save