Example Basic Curated Content Creation from RSS feed

Here’s an example of a basic template that can be used to have regular new posts on your blogs.

  1. It scrapes an RSS feed
  2. then parses the content from the latest URL
  3. it asks GPT to write a new title
  4. it asks GPT to come up with relevant tags
  5. it asks GPT4 to rewrite the parsed article
  6. then it posts it to wordpress using the tags and to a specific category

import this file to get this exact setup
basic curated content creation from RSS feed.wpitl (1.6 KB)

It uses a specific URL as if/condition, which should be set as cronjob using (for example) a cronjob manager plugin.

1. Scrape RSS feed
https://eol-feeds.eonline.com/rssfeed/us/top_stories
This is the RSS feed URL which is scrapes, this is a celebrity news/gossip website

2. Parse URL
%%rss.link.0%%
This token gets replaced by the 1st link it finds in the array of RSS feed results (that it scraped in the 1st step).

3. OpenAI ChatGPT Prompt:

%%name = title
[ORIGINAL]
%%rss.title.0%%

[INSTRUCTIONS]
rewrite [ORIGINAL]. keep it under 66 characters.

[REWRITTEN TITLE]

Here we first use %%name = title to name the output, which makes it easier to reuse the response later. In later actions we can thus simply use %%gpt.title%% to insert the output from this prompt.

%%rss.title.0%% gets replaced by the 1st title it finds in the array of the RSS feed results.

Thus we’ve simply asked GPT to rewrite the title.

4. OpenAI ChatGPT Prompt:

%%name = tags
[INSTRUCTIONS]
provide a list of 2-6 comma seperated tags which would go well with an blogpost about '%%rss.title.0%%'

[TAGS]

Here we name the output tags, so that later we can use the %%gpt.tags%% shortcode to insert the output from this prompt. Again the title from the first RSS feed result gets used in the prompt.

Thus we’re simply asking GPT to come up with 2 to 6 relevant tags

5. OpenAI ChatGPT Prompt:

%%name = article
%%gpt_model = gpt-4-turbo-2024-04-09
[SOURCE]
%%parsed.%%rss.link.0%%%%

[INSTRUCTIONS]
Rewrite the [SOURCE] article. Make it opinionated. Don't add a conclusion. Use markdown. Remove references to the source author and to the source. Remove all images.
Add subheadings if appropiate.

[REWRITTEN ARTICLE]

Again we start by naming the output article, so that we can use %%gpt.article%% as shortcode to use the prompt output. Then we set the GPT model to gpt-4-turbo-2024-04-09. I have gpt-3.5-turbo-0125 set as default model (cos its cheaper and faster), GPT3.5 is fine for simple tasks, but for more complex tasks I prefer to use the latest GPT4 model as it’s way more reliable. It also provides better articles imo.
Last we use the %%parsed.URL%% shortcode to provide the prompt with the source article. Note that the URL is another shortcode: %%rss.link.0%%, which is why the shortcode is a bit longer %%parsed.%%rss.link.0%%%%

GPT4 is given some extra instructions on how to rewrite the article. Because we don’t want it referencing the source or original author. We don’t want it to hallucinate images (which it sometimes does). We want it to add subheadings if appropiate. We want it to use markdown (so that it has some proper markup; markdown is the default that GPT uses, this is what gives the best and most consistent output). And we don’t really want it to add a conclusion (as that’s an easy footprint for AI content).

6. Create Post:

%%post_title = %%gpt.title%%
%%post_tags = %%gpt.tags%%
%%post_category = celeb
%%post_content = 
%%%parsedown.%%gpt.article%%%%%

Here we tell it to create a post. It uses the title created by the 1st GPT prompt as title, it uses the tags provided by the 2nd prompt as tags, it uses the category ‘celeb’ (which I have on this site) and it uses the %%%parsedown.CONTENT%%% shortcode to parse down the content from markdown to HTML.
Note that this again is a nested shortcode, as we’re using %%gpt.article%% as content.


So what do we get after it runs?
In a run I had it do just now it used Golden Bachelor’s Theresa Responds to Angry Fans After Split as source article

And this is the post it created:

Golden Bachelor Theresa on Fans’ Outrage over Gerry Turner Breakup

Whirlwind Romance Ends in Disappointment for Golden Bachelor’s Theresa Nist

A Brief but Intense Love Story Comes to a Close

Theresa Nist of the Golden Bachelor series, found herself amidst a heartbreaking situation as her husband Gerry Turner officially filed for divorce on April 12. Their remarkably swift separation feels like a betrayal of the fairy tale that reality TV often promises. Just three months post their live televised wedding, which was nothing short of a spectacle, the couple has decided to part ways. The emotional turmoil didn’t just end with their split. What’s even more disheartening is the public outcry and the wave of criticism directed towards Theresa since the unfortunate news broke out.

An Emotional Plea Amid Harsh Scrutiny

Despite the public backlash, Theresa maintains a dignified composure. In her poignant Instagram post dated April 15, she expressed her unexpected journey, stating it as “one of the most incredible experiences of my life,” and acknowledging her naivety in believing that love could be ever-lasting even at her age. She emphasized her lack of regrets for joining Bachelor Nation, claiming the experience and friendships forged were invaluable. Yet, it’s evident that the sting of a very public breakup is taking its toll on her.

Disappointment and Divorce: An All-Too-Common Tale in The Spotlight

What is truly appalling is the vitriol and lack of compassion from the audience. How can fans claim to support love and then turn so mercilessly on those same individuals when fairy tales don’t pan out as expected? Theresa’s heartfelt plea for kindness and understanding mirrors a maturity and grace that seems to be sorely lacking in the court of public opinion. Fans need to realize that the characters on these shows are real people dealing with genuine feelings and the harsh realities that follow suit with difficult decisions like divorce.

Clarity and Closure Amidst the Chaos

Gerry and Theresa’s attempt to maintain dignity in the face of a very public dissolution of their brief marriage is somewhat overshadowed by the need to explain their situation. During their joint appearance on Good Morning America on April 12, Gerry cited “irretrievable breakdown” as the rationale for the divorce. Despite the drama, both seemed committed to mutual respect and clarity—a rarity in the tempestuous arena of celebrity breakups.

A Never-Ending Cycle of Celebrity Romance Drama

While Theresa and Gerry’s love story concludes on a somber note, the spectacle surrounding it continues to demonstrate the endless public fascination with celebrity relationships. Instead of support and understanding, we witness judgement and disillusionment, showing a troubling side of fandom culture.

Fans and the public alike should take a leaf out of Theresa’s book; aiming for kindness and empathy, rather than contributing to the resentment and harsh judgments that often plague popular figures upon the disintegration of their romantic engagements. Whether this will lead to any change in the overall perception and reception of similar events in the future, only time will tell.

Since in this setup we don’t check if the source article has already been used. The cronjob should be set in a way that minimizes the chance for it to re-use the same source article.
Now eonline.com (which is used for the RSS feed in the above setup) posts multiple articles each day. Thus if the cronjob only runs once per day, it shouldn’t reuse the same source article.

Another option is to add a check to see if an URL has already been used, such as in this example.
Alternatively we could add multiple RSS feed URLs and randomize them, although they would also lead to posting content thats maybe a bit more ‘outdated’ (news from a few days ago).