Looking through an EPG for a large number of channels can be a tiresome business.
I often find myself looking in the 'Episodes' column for s01.e01 to see when a new series is coming along
that I might want to record.
However the Web UI won't sort on the 'Episodes' column, so scanning it is tedious and error prone.
I've put together a script to automate that:
newseries.sh
#!/bin/bash
curl -s --user "admin:secret" --digest http://localhost:9981/api/epg/events/grid?limit=999999 | sed -e 's/^.*\"entries\":\[//' -e 's/\}]\}$/\}/' -e 's/},/}\n/g' | grep -i s01.e01 | /usr/local/bin/epgparse.py > /tmp/newseries.txt
/usr/local/bin/epgparse.py
#!/usr/bin/python
import json
import sys
from pprint import pprint
lines = sys.stdin.readlines()
length = len(lines)
idx = 0
while idx < length:
data = json.loads(lines[idx])
print data["channelName"], " - " ,data["title"].encode('utf-8'), " - " ,data["description"].encode('utf-8'),"\n"
idx += 1
These scripts pull out the entire EPG and look for Episodes s01e01 and then print the Channel, Title and Description fields.
It should be run on a crontab equal to the period your EPG extends for [e.g. if your EPG covers a week, run it weekly,
if you run it daily you'll get a lot of overlap].
Note that this will only be useful if the EPG provider puts in consistent episode numbering.
You can pull the EPG from the API with new=1 set, but I found that got me lots of stuff like news programs etc.