Wednesday 2023-06-14 – Link List

Blogging Intensifies Link List for Wednesday 2023-06-14

14-Jun-2023 – Google Home Scripting

Brief Summary: “It is always controversial to have home assistants like the ones from Google or Amazon. There are pr”

14-Jun-2023 – Feds Tell Automakers Not To Comply With Massachusetts ‘Right To Repair’ Law

Brief Summary: “An anonymous reader quotes a report from Ars Technica: In 2020, voters in Massachusetts chose to ext”

14-Jun-2023 – Example of OpenAI function calling API to extract data from LAPD newsroom articles

Brief Summary: “Example of OpenAI function calling API to extract data from LAPD newsroom articles
Fascinating code “

14-Jun-2023 – Microsoft Now Sells Surface Replacement Parts, Including Displays, Batteries, and SSDs

Brief Summary: “Microsoft is starting to sell replacement components for its Surface devices. The software giant now”

14-Jun-2023 – Music Publishers Sue Twitter for Copyright Infringement

Brief Summary: “A group of 17 music publishers sued Twitter on Wednesday, accusing it of copyright infringement on a”

14-Jun-2023 – Raspberry Pi: Read Analog Inputs with Python (MCP3008)

Brief Summary: “In this guide, you’ll learn how to read analog signals on the Raspberry Pi GPIOs using a Python prog”

Tuesday 2023-06-13 – Link List

Blogging Intensifies Link List for Tuesday 2023-06-13

13-Jun-2023 – Reddit’s API pricing changes stem from LLMs driving up the value of the site’s data, an upcoming IPO, and third-party apps generating no revenue for the company (Casey Newton/Platformer)

Brief Summary: ”
Casey Newton / Platformer:
Reddit’s API pricing changes stem from LLMs driving up the value of the”

Monday 2023-06-12 – Link List

Blogging Intensifies Link List for Monday 2023-06-12

12-Jun-2023 – Cruise robotaxi appears to hinder emergency crews after mass shooting

Brief Summary: “Company said vehicle never obstructed access to scene in San Francisco even as police in video say i”

12-Jun-2023 – Apple TV+ ‘Monsterverse’ Show Filming In 3D For Vision Pro Viewing

Brief Summary: “The upcoming Apple TV+ show “Monarch: Legacy of Monsters,” based on Legendary’s Monsterverse franchi”

12-Jun-2023 – Illinois Attorney General issues scam prevention tips

Brief Summary: “June 12, 2023 – Illinois Attorney General Kwame Raoul recently issued a list of tips to help residen”

12-Jun-2023 – Convert JPG/PNG Image to PDF on Windows for FREE

Brief Summary: “Windows allows to convert JPG/PNG images to PDF for free without having to install any additional so”

12-Jun-2023 – When I lost my job, I learned to code. Now AI doom mongers are trying to scare me all over again | Tristan Cross

Brief Summary: “Silicon Valley wants to make us believe humans are predictable and our skills replaceable. I’ve lear”

12-Jun-2023 – Introducing the Hello World newsletter

Brief Summary: “Launched six years ago, Hello World magazine is the education magazine about computing and digital m”

Code Project: Fresh RSS to WordPress Digest V 2

A while back, I talked about a little simple project that I build that produces a daily RSS digest post on this blog. This of course broke when my RSS Reader died on me. I managed to get Fresh RSS up and running again in Docker, and I’ve been slowly recovering my feeds, which is incredibly slow and tedious to do because there are a shitload of feeds, and i essentially have to cut and paste each URL into FreshRSS, and select the category and half the time they don’t work, so I need to make a note of it for later checking and it’s just… slow.

But since it’s mostly working, I decided to reset up my RSS poster. I may look into setting up a Docker instance just for running Python automations, but for now, I put it on a different Pi I have floating around that plays music. The music part will be part of a different post, but for this purpose, it runs a script, once a day, that pulls a feed, formats it, and posts it. It isn’t high overhead.

While poking around on setting this up, I decided to get a bit more ambitious and found out that, basically every view has it’s own RSS feed. Previously, I was taking the feed from the Starred Articles. But it turns out that Tags each have their own feed. This allowed me to do something I wanted from the start here, which is create TWO feeds, for both of my blogs. So now, articles related to Technology, Politics, Food, and Music, get fed into Blogging Intensifies, and articles related to toys, movies, and video games, go into Lameazoid.

I’ve also filtered both of these out of the main page. I do share these little link digests for others, if they want to read them, but primarily, it’s a little record for myself, to know what I found interesting and was reading that day. This way if say, my Fresh RSS reader crashes, I still have all the old interesting links available.

The other thing I wanted to do was to use some sort of AI system to produce a summary of each article. Right now it just clips off the first 200 characters or so. At the end of the day, this is probably plenty. I’m not really trying to steal content, I just want to share links, but links are also useful with just a wee bit of context to them.

I mentioned before, making this work involved a bit to tweaking to the scrips I was using. First off is an auth.py file which has a structure like below, one dictionary for each blog, and then each dictionary gets put in a list. Adding additional blogs would be as simple as adding a new dictionary and then adding the entry to the list. I could have done this with a custom Class but this was simpler.

BLOG1 = {
    "blogtitle": "BLOG1NAME",
    "url": "FEEDURL1",
    "wp_user": "YOURUSERNAME",
    "wp_pass": "YOURPASSWORD",
    "wp_url": "BLOG1URL",
}

BLOG2 = {
    "blogtitle": "BLOG2NAME",
    "url": "FEEDURL2",
    "wp_user": "YOURUSERNAME",
    "wp_pass": "YOURPASSWORD",
    "wp_url": "BLOG2URL",
}

blogs = [BLOG1, BLOG2]

The script itself got a bit of modification as well, mostly, the addition of a loop to go through each blog in the list, then some variables changed to be Dictionary look ups instead of straight variables.

Also please excuse the inconsistency on the fstring use. I got errors at first so I started editing and removing the fstrings and then realized I just needed to be using Python3 instead of Python2.

from auth import *
import feedparser
from wordpress_xmlrpc import Client, WordPressPost
from wordpress_xmlrpc.methods.posts import NewPost
from wordpress_xmlrpc.methods import posts
import datetime
from io import StringIO
from html.parser import HTMLParser

cur_date = datetime.datetime.now().strftime(('%A %Y-%m-%d'))

### HTML Stripper from https://stackoverflow.com/questions/753052/strip-html-from-strings-in-python
class MLStripper(HTMLParser):
    def __init__(self):
        super().__init__()
        self.reset()
        self.strict = False
        self.convert_charrefs= True
        self.text = StringIO()
    def handle_data(self, d):
        self.text.write(d)
    def get_data(self):
        return self.text.getvalue()

def strip_tags(html):
    s = MLStripper()
    s.feed(html)
    return s.get_data()

# Get News Feed
def get_feed(feed_url):
    NewsFeed = feedparser.parse(feed_url)
    return NewsFeed

# Create the post text
def make_post(NewsFeed, cur_blog):
    # WordPress API Point
    build_url = f'https://{cur_blog["wp_url"]}/xmlrpc.php'
    #print(build_url)
    wp = Client(build_url, cur_blog["wp_user"], cur_blog["wp_pass"])

    # Create the Basic Post Info, Title, Tags, etc  This can be edited to customize the formatting if you know what you$    post = WordPressPost()
    post.title = f"{cur_date} - Link List"
    post.terms_names = {'category': ['Link List'], 'post_tag': ['links', 'FreshRSS']}
    post.content = f"<p>{cur_blog['blogtitle']} Link List for {cur_date}</p>"
    # Insert Each Feed item into the post with it's posted date, headline, and link to the item.  And a brief summary f$    for each in NewsFeed.entries:
        if len(strip_tags(each.summary)) > 100:
            post_summary = strip_tags(each.summary)[0:100]
        else:
            post_summary = strip_tags(each.summary)
        post.content += f'{each.published[5:-15].replace(" ", "-")} - <a href="{each.links[0].href}">{each.title}</a></$                        f'<p>Brief Summary: "{post_summary}"</p>'
        # print(each.summary_detail.value)
        #print(each)

    # Create the actual post.
    post.post_status = 'publish'
    #print(post.content)
    # For Troubleshooting and reworking, uncomment the above then comment out the below, this will print results instea$    post.id = wp.call(NewPost(post))

    try:
        if post.id:
            post.post_status = 'publish'
            call(posts.EditPost(post.id, post))
    except:
        pass
        #print("Error creating post.")

#Get the news feed
for each in blogs:
    newsfeed = get_feed(each["url"])
# If there are posts, make them.
    if len(newsfeed.entries) > 0:
        make_post(newsfeed, each)
        #print(NewsFeed.entries)

Sunday 2023-06-11 – Link List

Blogging Intensifies Link List for Sunday 2023-06-11

11-Jun-2023 – Hyundai is Doomed: Porting the 1993 Classic To a Hyundai Head Unit

Brief Summary: “In the natural order of the world, porting DOOM to any newly unlocked computing system is an absolut”

11-Jun-2023 – Marc Andreessen Criticizes ‘AI Doomers’, Warns the Bigger Danger is China Gaining AI Dominance

Brief Summary: “This week venture capitalist Marc Andreessen published “his views on AI, the risks it poses and the “

11-Jun-2023 – How to make digital business cards and share them via QR codes

Brief Summary: ”

A previous employer found it important that the whole team had business c”

11-Jun-2023 – Modern Brownie Camera Talks SD and WiFi

Brief Summary: “If you’re at all into nostalgic cameras, you’ve certainly seen the old Brownie from Kodak. They were”

11-Jun-2023 – Chocolate Mint drink with 10 times the minty refreshment: Is it really as strong as it looks?

Brief Summary: ”
Cafe de Crie chain celebrates its 10th anniversary in a big way.

With the weather heating up, it’s”