Skip to content

Instantly share code, notes, and snippets.

@andysylvester
andysylvester / getVotingRecord.py
Created September 18, 2026 19:19
Report an Oregon legislator's voting record from the OLIS OData API
"""Report an Oregon legislator's voting record from the OLIS OData API.
Covers chamber floor votes (MeasureVotes) and committee votes (CommitteeVotes),
annotated with each measure's CatchLine.
Usage:
python getVotingRecord.py --list
python getVotingRecord.py --district 19
python getVotingRecord.py --name Andersen
python getVotingRecord.py --district 26 --legislator "Rep Neron"
@andysylvester
andysylvester / getVotesOnLaws.py
Created September 18, 2026 19:19
Cross-reference enacted Oregon laws against one legislator's votes
"""Cross-reference enacted Oregon laws against one legislator's votes.
Joins the enacted-measure list from getEnactedMeasures with the floor and
committee votes from getVotingRecord, so you can see how your representative
voted on each measure that actually became law.
A measure can draw several floor votes (third reading, concurrence,
repassage). All of them are listed; the chronologically last one is treated
as the decisive vote and is what the summary tallies.
@andysylvester
andysylvester / getEnactedMeasures.py
Created September 18, 2026 19:17
Identify Oregon measures that became law, from the OLIS OData API
"""Identify Oregon measures that became law, from the OLIS OData API.
A measure is treated as enacted when it carries a real Oregon Laws chapter
number and was not stopped by a sustained veto. Each enacted measure is
classified by how it became law:
Signed by Governor "Governor signed." appears in its history
Law without signature chaptered, but never signed and never vetoed
Veto overridden repassed under Art. V sec. 15b, veto not sustained
@andysylvester
andysylvester / getMeasures.py
Created September 18, 2026 19:16
Fetch Oregon legislature measures for given sessions from the OLIS OData API
"""Fetch Oregon legislature measures for given sessions from the OLIS OData API.
Writes one plain-text report per session:
2025R1 -> measures_2025.txt
2026R1 -> measures_2026.txt
"""
import sys
import requests
@andysylvester
andysylvester / sitemap_to_rss.py
Created May 24, 2026 20:49
Python script to convert a news sitemap file to a RSS feed
#!/usr/bin/env python3
"""
sitemap_to_rss.py
=================
Convert a sitemap XML file (URL or local path) into an RSS 2.0 feed.
Supported namespaces
--------------------
• http://www.sitemaps.org/schemas/sitemap/0.9 (standard sitemap)
• http://www.google.com/schemas/sitemap-news/0.9 (Google News extension)

News Archive - Project Spec

Background

News websites publish new stories daily, but older content quickly becomes hard to find — buried behind pagination, missing from site search, or removed entirely. This project solves that by continuously collecting articles from RSS feeds and making them searchable through a simple web interface, creating a persistent archive that grows over time.

Target users: Anyone who wants to search or browse archived news stories across multiple sources.

Concept

@andysylvester
andysylvester / newsArchiveInitialPlan.md
Created May 7, 2026 18:54
Initial plan for News Archive app

News Archive - Project Spec

Background

News sites/newspapers create stories on a daily basis and make them available to readers. The stories are updated daily, but finding older content is difficult. How can this problem be solved?

Concept

An integrated RSS collection/search engine

@andysylvester
andysylvester / rssCloudLog.txt
Created August 19, 2025 02:19
Log from rssCloud test app
Listening at http://ron.mystatustool.com:2004
[Object: null prototype] {
session: 's3750',
domain: 'retiredkalam.com',
port: '80',
path: '/?rsscloud=notify',
feed: 'https://retiredkalam.com/feed/' }
s3750: POST https://retiredkalam.com/?rsscloud=notify https://retiredkalam.com/feed/
{ method: 'POST',
uri: 'https://retiredkalam.com/?rsscloud=notify',
{
"events": [
{
"method": "GET",
"path": "/feedupdated",
"params": {
"url": "https://rsscloud4.wordpress.com/feed/",
"challenge": "0f43e414a6ab0416c14bc1a0b73ce2"
},
"myResponse": "0f43e414a6ab0416c14bc1a0b73ce2",
const myVersion = "0.4.0", myProductName = "clouddemo";
const fs = require ("fs");
const utils = require ("daveutils");
const qs = require ("querystring");
const request = require ("request");
const davehttp = require ("davehttp");
const xml2js = require ("xml2js");
const reallysimple = require ("reallysimple");