Your own daily dose … (of the news)

  1. Below is a general recipe for experimenting with RSS feeds AND speech synthesizers.
  2. For the speech synthesis there are two scripts, very similar, one will work with ESPEAK (free open source), the other works with Microsoft SAPI.
  3. In order to run these scripts you will need MYSQL installed. You will need a minimum level of understanding of how MYSQL works. You can easily translate the database piece to ODBC, and the rest to PowerShell or whatever. That’s your business, not mine.
  4. Once you’ve installed MYSQL and the server is running, create a database called “NEWS”: create database NEWS;
  5. After you’ve created the NEWS database, using the CLI (command line interface) as above, type command: use NEWS;
  6. Once you are in the NEWS database, copy and paste the entire script below into the CLI or save as text file and consult from the CLI using the command: source rss.sql (assuming you stored the create table text below in that file)
  7. In the example I’m using the ROOT database, why? – because IDGAF. But best practice is to create special database users with limited permissions. If you’ve installed your MYSQL database without granting permission to external (port) connections? – then it’s not a concern.
  8. Running the aggregator might trigger a site to block you or even your own network. This behavior, which was innocuous 20 years ago, is now attacked and classified as an aggressive network behavior. Just be careful.
  9. After you’ve run the aggregation script (and the script can be run by CRON or Task Manager daily or hourly if you like), then you can run one of the speech synthesis apps, reading headlines.
  10. If you have a compatible shortwave radio, with upper and lower side band, and a LINUX computer running JS8 Call with appropriate libraries for CAT control? – then look into this and you can set up a headline service over shortwave: https://planetarystatusreport.com/?p=7432

Have fun getting your daily dose of the fucking news.

Create Table Script for RSS Database

SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";

CREATE TABLE `RSS` (
`ID` bigint(20) NOT NULL,
`SOURCE` varchar(100) COLLATE utf8_unicode_ci NOT NULL,
`LINK` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
`TITLE` varchar(400) COLLATE utf8_unicode_ci NOT NULL,
`PUBLISHED` datetime NOT NULL,
`ARTICLE` text COLLATE utf8_unicode_ci NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

ALTER TABLE `RSS`
ADD PRIMARY KEY (`ID`),
ADD UNIQUE KEY `unique_link` (`LINK`);

ALTER TABLE `RSS`
MODIFY `ID` bigint(20) NOT NULL AUTO_INCREMENT;
COMMIT;

Python Script for Aggregating RSS Feeds and storing stories locally

from __future__ import print_function

import os
import feedparser
import os.path, time
import json
import math
import time
import urllib.parse as pr
import xml.etree.ElementTree as ET
from bs4 import BeautifulSoup as BS
from requests import get
from os.path import exists
from socket import socket, AF_INET, SOCK_STREAM
from decimal import Decimal
from datetime import datetime, date, timedelta
from anyascii import anyascii
import mysql.connector

usern = "root"
passw = "password"
dbn = "NEWS"
servern = "localhost"
portn = 3306

newsServiceM3 = "ZEROHEDGE"

retHeadlines = 4

newsMode = 3

bigSleep = 90

def GetArt(number):
# Connect with the MySQL Server
cnx = mysql.connector.connect(user=usern, database=dbn, password=passw, host=servern, port=portn)
qry = "select ARTICLE, SOURCE, LINK from RSS where ID = %s" % (number)
cur = cnx.cursor(buffered=True)
cur.execute(qry)
retRes = cur.fetchall()
cnx.close()
return retRes[0]

def GetTopHourly(source):
# Connect with the MySQL Server
cnx = mysql.connector.connect(user=usern, database=dbn, password=passw, host=servern, port=portn)
qry = "select ID, TITLE, PUBLISHED, SOURCE, length(ARTICLE) as LOF from RSS where SOURCE = '%s' order by PUBLISHED desc limit 1" % source
cur = cnx.cursor(buffered=True)
cur.execute(qry)
retRes = cur.fetchall()
cnx.close()
return retRes

def GetTop(source, number):
# Connect with the MySQL Server
cnx = mysql.connector.connect(user=usern, database=dbn, password=passw, host=servern, port=portn)
qry = "select ID, TITLE, PUBLISHED, SOURCE, length(ARTICLE) as LOF from RSS where SOURCE = '%s' order by PUBLISHED desc limit %s" % (source, number)
cur = cnx.cursor(buffered=True)
cur.execute(qry)
retRes = cur.fetchall()
cnx.close()
return retRes

def AlreadySaved(link):
# Connect with the MySQL Server
cnx = mysql.connector.connect(user=usern, database=dbn, password=passw, host=servern, port=portn)
qry = "select ID from RSS where LINK = '" + link + "'"
cur = cnx.cursor(buffered=True)
cur.execute(qry)
cur.fetchall()
rc = cur.rowcount
cnx.close()
if rc > 0:
return True
else:
return False

def SaveRSS(source, title, link, published, article):

tit = title.replace("'", "''")

clean_text = anyascii(article)

art = str(clean_text)

art = art.replace("'", "''")

if len(art) > 5000:
art = art[0:5000]

cnx = mysql.connector.connect(user=usern, database=dbn, password=passw, host=servern, port=portn)

cur = cnx.cursor()

qry = """
INSERT INTO RSS
(SOURCE,
LINK,
TITLE,
PUBLISHED,
ARTICLE)
VALUES
(%s,%s,%s,%s,%s)
"""

val = (source, link, tit, published, art)

cur.execute(qry, val)

cnx.commit()

cnx.close()

def GrabRSS(RssURL, SourceName):

hdrs = {'User-Agent': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/50.0.2661.102 Safari/537.36'}

NewsFeed = feedparser.parse(RssURL)

for na in NewsFeed.entries:

try:
print(na.title)
print(na.link)
print(na.published)
print(na.published_parsed)
except:
continue

if AlreadySaved(na.link):
continue

print("*************************")

response = get(na.link, None, headers=hdrs)

print(na.keys())

soup = BS(response.content, 'html.parser')

txtChunk = ""

for data in soup.find_all("p"):
txtval = data.get_text()
txtval = txtval.strip()
txtarr = txtval.split()

if len(txtarr) == 1:
continue

if "posted" in txtval and ("hours" in txtval or "days" in txtval) and len(txtarr) == 4:
continue

if txtval == "No Search Results Found":
continue

if txtval == "Terms of Service":
continue

if txtval == "Advertise with us":
continue

if txtval == "Media Inquiries":
continue

txtChunk += " " + txtval + "\n"

tyr = na.published_parsed[0]
tmn = na.published_parsed[1]
tdy = na.published_parsed[2]
thr = na.published_parsed[3]
tmi = na.published_parsed[4]
tsc = na.published_parsed[5]

ptms = "%s-%s-%s %s:%s:%s" % (tyr, tmn, tdy, thr, tmi, tsc)

SaveRSS(SourceName, na.title, na.link, ptms, txtChunk.strip())

print(txtChunk.strip())

def debugHere():
input("Press enter to continue ...")

def clearConsole():
command = 'clear'
if os.name in ('nt', 'dos'): # If Machine is running on Windows, use cls
command = 'cls'
os.system(command)

def CycleFeeds():
infowars = "https://www.infowars.com/rss.xml"
zh = "https://feeds.feedburner.com/zerohedge/feed"
yahoo = "https://news.yahoo.com/rss/"
cnn = "http://rss.cnn.com/rss/cnn_topstories.rss"
bbc = "http://feeds.bbci.co.uk/news/world/us_and_canada/rss.xml"
nyt = "https://rss.nytimes.com/services/xml/rss/nyt/HomePage.xml"
onion = "https://www.theonion.com/rss"
bb = "https://babylonbee.com/feed"
print("Grabbing Babylon Bee ...")
GrabRSS(bb, "BB")
print("Grabbing ONION ...")
GrabRSS(onion, "ONION")
print("Grabbing INFOWARS ...")
GrabRSS(infowars, "INFOWARS")
print("Grabbing ZEROHEDGE ...")
GrabRSS(zh, "ZEROHEDGE")
#print("Grabbing YAHOO ...")
#GrabRSS(yahoo, "YAHOO")
print("Grabbing CNN ...")
GrabRSS(cnn, "CNN")
print("Grabbing BBC ...")
GrabRSS(bbc, "BBC")
print("Grabbing NYT ...")
GrabRSS(nyt, "NYT")

# FEEDS:
# 1. INFOWARS: https://www.infowars.com/rss.xml
# 2. ZEROHEDGE: https://feeds.feedburner.com/zerohedge/feed
# 3. YAHOO: https://news.yahoo.com/rss/
# 4. CNN: http://rss.cnn.com/rss/cnn_topstories.rss

time.sleep(1)

CycleFeeds()

Python Speech Synthesis Scripts

A: Windows – SAPI

#this script reads headlines from the RSS news feed
#database.

import win32com.client

speaker = win32com.client.Dispatch("SAPI.SpVoice")

import os
import time
import mysql.connector

usern = "root"
passw = "password"
dbn = "NEWS"
servern = "localhost"
portn = 3306

def TOS(text):
os.system(f"espeak -s 130 -v en+m1 '{text}'")

def GetSql(qry):
# Connect with the MySQL Server
cnx = mysql.connector.connect(user=usern, database=dbn, password=passw, host=servern, port=portn)
cur = cnx.cursor(buffered=True)
cur.execute(qry)
retRes = cur.fetchall()
cnx.close()
return retRes

#+-----------+--------------+------+-----+---------+----------------+
#| Field | Type | Null | Key | Default | Extra |
#+-----------+--------------+------+-----+---------+----------------+
#| ID | bigint(20) | NO | PRI | NULL | auto_increment |
#| SOURCE | varchar(100) | NO | | NULL | |
#| LINK | varchar(255) | NO | UNI | NULL | |
#| TITLE | varchar(400) | NO | | NULL | |
#| PUBLISHED | datetime | NO | | NULL | |
#| ARTICLE | text | NO | | NULL | |
#+-----------+--------------+------+-----+---------+----------------+

qry1 = "select SOURCE, TITLE from RSS where PUBLISHED > curdate()-1 order by PUBLISHED desc;"

res = GetSql(qry1)

for rec in res:
src = rec[0]
tit = rec[1].replace("''", "")
print(src + ": " + tit)

phrase = "From " + src + ", HEAD LINE, " + tit

speaker.Speak(phrase)

time.sleep(2)

B: Linux – ESPEAK

import os
import time
import mysql.connector

usern = "root"
passw = "password"
dbn = "NEWS"
servern = "localhost"
portn = 3306

def TOS(text):
os.system(f"espeak -s 130 -v en+m1 '{text}'")

def GetSql(qry):
# Connect with the MySQL Server
cnx = mysql.connector.connect(user=usern, database=dbn, password=passw, host=servern, port=portn)
cur = cnx.cursor(buffered=True)
cur.execute(qry)
retRes = cur.fetchall()
cnx.close()
return retRes

#+-----------+--------------+------+-----+---------+----------------+
#| Field | Type | Null | Key | Default | Extra |
#+-----------+--------------+------+-----+---------+----------------+
#| ID | bigint(20) | NO | PRI | NULL | auto_increment |
#| SOURCE | varchar(100) | NO | | NULL | |
#| LINK | varchar(255) | NO | UNI | NULL | |
#| TITLE | varchar(400) | NO | | NULL | |
#| PUBLISHED | datetime | NO | | NULL | |
#| ARTICLE | text | NO | | NULL | |
#+-----------+--------------+------+-----+---------+----------------+

qry1 = "select SOURCE, TITLE from RSS where PUBLISHED > curdate()-1 order by PUBLISHED desc;"

res = GetSql(qry1)

for rec in res:
src = rec[0]
tit = rec[1].replace("''", "")
print(src + ": " + tit)
phrase = "From " + src + ", HEAD LINE, " + tit
TOS(phrase)
time.sleep(0.5)

I’m beginning to think …

I’m beginning to think the approach I’ve been taking with JS8 call is a bridge too far – and that I would be better off learning to compile the code, and just create my own branch. Make the changes I want in C++ to include interop with websites that are accessible on some given network using standard REST calls. Also, allow it a scripted response model so that any given JS8Call app can act as a “radio service” taking messages, and replying. Also, add in flexible topology and multi-app running instances on the same computer. Who knows, add in a built in connector for MYSQL for data logging and event logging for outside of process coding and scripting by other consumers … so I don’t know if I can, I’m 53 and burnt out and believe the world could explode, figuratively, in a few months.

But is it the end of the world? – no, not by a long shot …

So maybe I try.

Will it be easy? – don’t know … I think

And here’s the other thing …

JS8Call, RIGHT NOW, AS IS would allow you to build an organic twitter style decentralized relationship with other people using CB radio and this network WORKS even if the WWW is down … is it good for secrets, as is? – no … is it good enough for the public square? – yes.

You could sell eggs, right now, using JS8Call on CB Radio – just need to expand the network, more users, bigger world.

And I would think a lot of real anarchists and libertarians would be into this …

CB RADIO – NO HAM LICENSE …

(and then we go from there)

And this is all in JS8CALL.COM right now.

With some work? – who the fuck knows what’s possible.

I feel like the world of shortwave radio, and CB, needs a revolution – and this could be the beginning.

RADENGINEERING.TECH

RAD-TERMINAL: HOW TO HAVE FREE OFF GRID INTERNET 4-LIFE!

Where: https://www.preppershowsusa.com/prepper-show/be-prepared-expo-2022/

When: 4/23/2022, 11 AM MST (Utah Time)

Room: Classroom B

What: Class/Presentation “RAD ENGINEERING: FIFL”

Presenters: Justin Land and Dan Sullivan

Outline:

  1. Introduction: How we got into this, the story of RAD ENGINEERING. WHAT IS THE RAD TERMINAL? (5 minutes)
  2. Hardware: a) radio, b) computer, c) linkages and wiring … history of the radio tech and how it’s being used. JS8 (20 minutes)
  3. Software: history of WWW, what happened to TECH in the 70’s … why couldn’t we hook up TRS-80 / C64 computers to a CB in 1983 … what are bulletin boards? – how is radio LIKE a bulletin board … encryption strategies … encoding … ARS: Amateur Radio Services … what is an ARS? – remote procedure calls over CB radio, hitting python-agent receivers, hooking into actions … >sendto: >email: >payment: … command tags … EDI for radio? – small compact messaging AND payment services using voice recognition (20 minutes)
  4. Q/A (15 minutes)

THE RAD MANIFESTO: radengineering.tech

MP3: https://planetarystatusreport.com/mp3/20220225_A_RAD_MANIFESTO.mp3

Donate: https://www.paypal.com/paypalme/doctorfreckles

"If it doesn't work, we don't give up, we try something else." - Dr. Freckles (or someone he ripped off that said the same thing)

I’ll get this out of the way – the ideas presented below are not SPECIAL or even original … I dunno … I don’t think I’m a dummy, but I’m certain many dummies don’t think they are … I don’t think I’m special, I’m just tired of the LEARNED HELPLESSNESS. I think we have a right to dream and do, as we have a right to breathe.

We support RIGHT-TO-REPAIR at RADENGINEERING.TECH, everything we design, we document, software or hardware, will be OPEN … we can’t control our suppliers … but we can foster NEW freedom friendly suppliers …

What you see below is not our companies vision in any complete or limited form … we reserve the right, as we succeed or fail, to add new dreams to our list.

Is it possible others are working on now or have solved the problems listed below? – I HOPE THEY HAVE … and if they have, they should consider the open source and right-to-repair philosophy … it isn’t communism, it is human understanding. You can’t enforce this philosophy, but that’s ok … there will always be assholes. We want to make money, but we also want to change the world.

… finally …

We reserve the right to fail and try again.

We reserve the right to dream.

Here is what we dream of doing:

  1. THE RAD TERMINAL: this will begin as a home-brew movement, but we have the goal of building a ruggedized all-in-one terminal, with antenna deployment pack and DC battery power, within 1 year – version ONE of the RAD TERMINAL … RT-1. This system will be designed with right-to-repair features, to include simple, swappable, modules for components that have high variability within radio or computer design. As of this writing, 2/25/22, we are still in home brew phase.
  2. We talked about RTR (right-to-repair) already in terms of all our component designs and documentation.
  3. Rad TRUCK: this will be a self-sufficient (as possible given power features) communications node that would be useful in connection with WiFi based MESH networks AND as a local internet hub for folks that want their own local game nets, email, etc … and they don’t need to be connected ANYWHERE else.
  4. Project RTR #1: Local source all non-cpu, non-ram electronic components.
  5. Project RTR #2: Design and build a 3D printing system for CPU and RAM.
  6. We want to do #1 and #2 simultaneously, and that leads to project FREEDOM.
  7. Project Freedom: a project to build a 100% local sourced (within a few hundred miles, up to 2,000 miles) computer that is capable of running LINUX. It would be 100% right-to-repair friendly, to include a PDF describing how YOU TOO can build a system for 3D printing CPUs … and as much useful knowledge as we can share.
  8. Project Freedom has a sister project: Project RADIO: to design and build a 100% local sourced right-to-repair friendly radio system. We want to optimize component layout to make some parts of the radio optimized, stationary on the board (still repairable), and other parts in RTR-friendly component boxes that fold out, from a cube or cube-like module, where anyone can work on those parts too … but, perhaps certain intrinsically different radio components can be placed in a swap module component box – and that would mean switching bands/frequencies/wavelengths, event to include WiFi, would be as simple as swapping out a plastic plug, with an easy pop button.
  9. Project Tesla: a remotely controlled drone for radio-repeater operations. This will allow the use of microwave technology for data exchange, at high altitudes, and this system LINKED to ground RAD TERMINAL devices for even higher rates of no-nonsense communication.
  10. Project Space Diver: this will be our first foray into aerospace and tourism/entertainment/travel. We will run a “you can jump from the edge of space” business, where we design a very safe “pod” that is lifted to 20 miles, and has a velocity reduction/control multi-stage parachute system. Plus, we want to design a reusable/rechargeable balloon system, for hydrogen at first … the dangers from combustion are vastly reduced as you go up in altitude. This will be a way for people to see the “curve”, and I think we can reach a price point of around $1000.00 per dive. Again – they will be in an aerodynamically sound pod, with a pressure suit on in case of decompression. We will have as many safeguards against accidental harm as is feasible – but we’re talking about 20 miles up … so it’s dangerous, no matter the pod.
  11. Project S’klider: this will be our second foray into aerospace. This will be a tourism/entertainment like “Space Diver”, but we’re hoping ordinary people will be able to buy them, here’s the concept: design a lightweight glider, for high altitudes, that can fold into a gondola for a blimp type hydrogen balloon system. At say, 15 miles up, the balloon deflates and is pulled back into the glider, and the glider can then proceed, folding out its wings, like a well designed glider for high/medium altitudes. The S’klider should be able to repeat this maneuver, even in mid air, but slowly filling the balloon back up with stored hydrogen. The idea: you could glide a LONG WAYS, especially if you have atmospheric thermal mapping hardware and software, with a well designed glider … perhaps thousands of miles with AI computer assistance for optimal thermal altitude gain.
  12. Project FAST: quantum radio … I think IBM has been sitting on this … it would be hyper-bandwidth powerful, hyper-de-centralized, hyper-liberating … the internet would be dead after this … pretty much everyone would use a quantum radio … and encryption? – that gets fun using synchronized noise for message embedding … or quantum steganography …. fun …
  13. Project View: a high altitude array of dirigible micro-observatories … astronomical in nature. We would like to take high resolution pictures by combining many smaller high altitude drones into one large array optical telescope. You could have these all around the globe. They could assist in the early detection of dangerous near earth objects.
  14. Project Vacuum: the design and construction of a vacuum ship using magnetic field engineering to create an inner structure of force, whereby creating mass-free structure that can encapsulate a vacuum. This kind of ship would be “lighter than air” but in a very powerful way and it could allow for single-stage-to-orbit rocket ships.
  15. Project Orbit: if Project Vacuum is successful, build a convertible vacuum ship dirigible system, with a gondola system designed like a lifting body glider, so that in case of vacuum envelope failure, the gondola itself could breakaway and the passengers could land safely. This ship would use a standard chemical rocket engine to achieve orbit, but would be lifted by its vacuum envelopes to an optimal altitude. The ship would be capable of maneuvering around the planet, at 20 miles, to find an optimal launch location for orbit.
  16. Project D.B. Cooper: a jacket/pant system that, if worn onto a plane, would allow a person to have a better chance of surviving a catastrophic failure of a passenger airliner. The system would be designed with carbon fiber and kevlar structuring to ensure protection against shrapnel, and an easy to deploy parachute system. For more money? – you get the 20 lb raft/radio combo … not sure about the sharks though.
  17. Project Mars: Orbit + synthetic gravity drive
  18. Project Stellar: Mars + focal synthetic gravity => space time cavitation => low density space time => mole drive, basically a mole drive using synthetic, projected, moments of synthetic gravity. This would reduce space time distance, the same way a mole, tunneling through the earth does it … little bits at a time … but the attraction principles would become nonlinear as speed increased, and this is an interesting area of research. Bottom line: worm holes work, but are very dangerous … this usese Einstein-Rosen Bridge concepts, but on a micro basis
  19. G-Ray: Build a gamma ray laser …
  20. We want to sponsor an expedition to Antarctica … Justin might not want to go, that’s ok, I might want him to man our base station repeater system as I read AT THE MOUNTAINS OF MADNESS … from fucking Antarctica … over shortwave radio with repeaters. But we also want to map the continent, and explore it.
  21. Freeze Ray: discover a useful and non-hazardous quantum endothermic particle that would cancel out the effects of photons
  22. New ZTuff: design a means of constructing useful synthetic matter from pure energy …
  23. OPEN PHP: if there isn’t an open php initiative, I want to start one … easy custom builds … transparent module viewing AND swapping for custom builds … and an ALL IN ONE deployable PHP friendly web server … other languages/APIs will work with it, but the most advanced, easy to control, PHP language and server will always be the best. We will also develop a simplified serialization and storage system that installs with the system, you can set how much memory you want it to use, both RAM and hard drive …
  24. Temperature tolerant cheap and durable super conductive material, with the same malleability features of copper.
  25. We want to foster the mentoring of young people in technology, sciences, math, so that our lives, though never perfect, can be far more kind and at peace and joy filled.

(we won’t be doing time travel – that’s crap)