[mythtv] Format of new post-0.25 config.xml

Brian J. Murrell brian at interlinx.bc.ca
Sat Jun 2 17:33:15 UTC 2012


On 12-06-02 12:35 PM, Michael T. Dean wrote:
> 
> And, speaking of which, there are a lot of already-written scripts
> available to do most of the things with MythTV that people are likely to
> need to do in external scripts.  So, what exactly are your scripts
> doing?

Here's a good example of one of the one-liners I previously mentioned:

------
#!/bin/bash

. ~/.mythtv/mysql.txt

ORIG_AIR_DATE_OFFSET=60

echo "Premiers"
echo "--------"
mysql -h $DBHostName -u $DBUserName -p$DBPassword $DBName << EOF | tr '\200-\377' '@' | sed -e 's/              /               /g' | while IFS="       " read c si t s st; do if [ "$si" = "1" ]; then si="A"; else si="D"; fi; if [ "$c" = "callsign" ]; then si="S"; fi; printf "%1.1s/%-8.8s %-40.40s %-30.30s %-19.19s\n" "$si" "$c" "$t" "$s" "$st"; done
SELECT c.callsign, c.sourceid, program.title, program.subtitle, program.starttime FROM program LEFT JOIN channel as c ON program.chanid = c.chanid LEFT JOIN record as r ON program.title = r.title AND program.subtitle = r.subtitle WHERE c.channum IS NOT NULL AND r.title IS NULL AND program.starttime > NOW() AND program.first > 0 AND program.programid LIKE "EP%0001" AND ABS(DATEDIFF(DATE(program.starttime),program.originalairdate)) < $ORIG_AIR_DATE_OFFSET ORDER BY program.starttime, program.title
EOF
------

> Are you sure there aren't already-written scripts that use the
> bindings that do what you want?

I don't know.  It was probably easier to just write that than the time
it would have taken to hunt down an existing script.

b.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 262 bytes
Desc: OpenPGP digital signature
URL: <http://www.mythtv.org/pipermail/mythtv-dev/attachments/20120602/75e7ab2b/attachment.sig>


More information about the mythtv-dev mailing list