New Site Launch!
Posted
Comments
0
Snazzy!
I’ve switched the site over to Textpattern, a very DIY-friendly blog/CMS/etc. platform (you may remember me mentioning it in S0E6).
It’ll let us do some nifty things, most notably:
- Incorporated shownotes. Bye,
FeliciaMediaWiki! - Incorporated static pages (and let’s be honest, the “Bio” page was an utter mess).
- (Hopefully) more streamlined publishing.
- Announcements! Now we won’t need to whore out on Twitter!
- We no longer need to set cookies of any kind for visitors! (Why our previous publishing software, PodcastGen, was doing that I’ll never know.)
- It’s hella fast. Hella.
- More of that “responsive design” bullshit we keep hearing about (so it works a lot better on mobile devices, whatever they are).
- But best of all, it’s not WordPress.
So freakin’ what?
Well, first off, rude. Second, this is actually super important. We’ll be messing around with the GUID’s in our RSS feed to make them match the sha256sum of the file referenced.
“What?”
Exactly. If you weren’t verifying our files before (and if not, WHY NOT?), you probably have no idea what the hell we’re talking about. Which is fine, I guess, but we’re the only podcast that I know of that checksums/hashes and signs our episodes (via GPG).
If you’re one of those people that WERE checking those, good for you! (Keep an eye out for docs- the URL may be changing to fetch them, and the filenames DEFINITELY have changed.) Those will be available still, but with our new site platform we can dynamically serve content. Which is awesome! What’s not so awesome is dynamically generating 20+ sha256sums of files more than 40Mb every time a feed is checked. So I engineered something that won’t make you want to gouge your eyes out. But yeah, the big thing here is the hashes won’t be in the notes themselves, they’ll be in the raw feed – you can check it by fetching the XML directly and parsing.
Below is an example utility in python you can use to fetch the GUID. If anyone wants to expand on it and write a full-fledged python utility to verify sha256 of files in our feed and implement the GPG verification, we’d love to hear from you! We could do it ourselves, but jthan is lazy, I don’t have time, and I don’t think paden knows python. So it could be a while. Anyways, you should comment below or contact us. I wrote this before I changed some things around on the backend, so leave a comment if it doesn’t work.
#!/usr/bin/env python3
# http://beta.sysadministrivia.com/articles/every-new-beginning
# Requires urllib2 and lxml
import urllib.request, urllib.error, urllib.parse
from lxml import etree as lxml
baseurl = 'http://beta.sysadministrivia.com'
feed = [
baseurl + '/feed/podcast.xml',
baseurl + '/feed/oggcast.xml'
]
for url in feed:
req = urllib.request.Request(url,None)
xml = urllib.request.urlopen(req).read()
parseme = lxml.fromstring(xml)
episode = parseme.findtext("channel/item/title")
uri = ''.join(parseme.xpath("channel/item/enclosure/@url"))
broadcast = uri.split('/')[4].replace('mp3','pod') + 'cast'
guid = parseme.findtext("channel/item/guid")
print('TYPE: {0}\nTITLE: "{1}"\nURL: {2}\nSHA256: {3}\n'.format(broadcast,episode,uri,guid))
Which will give something like:
[bts@workhorse tmp]$ ./feedparse.py
TYPE: podcast
TITLE: "S0E0: Test Episode"
URL: http://beta.sysadministrivia.com/media/S0/E0/mp3/s0e0.test.episode.mp3
SHA256: 01492fee5347579ecf18e38fdc99ebd09d28dcad4b66cce151fc745e4a4eaa9f
TYPE: oggcast
TITLE: "S0E0: Test Episode"
URL: http://beta.sysadministrivia.com/media/S0/E0/ogg/s0e0.test.episode.ogg
SHA256: f3fde01b12427518fea150d3d5ce8c5bea34759963983ff63ddeb4e8b654aac0
Hope to see you around!
Comments
There are currently no comments on this article.
Comment...