SELECT
T.[id],
P.[Title],
P.[Episode],
P.[Description],
P.[sub-title],
strftime('%d',P.[Date]),
P.[Start Time],
C.[Name]
FROM
programme P
INNER JOIN Channel C ON P.channelId = C.Id
LEFT JOIN Tracker T ON P.Description = T.Description
WHERE
P.[title] in ('The Simpsons','Mythbusters','Pawn Stars','Family Guy','South Park','American Dad!','QI')
AND (
(
date = date('now')
AND [start time]>=time('now')
)
OR date=date('now','+1 day')
)
AND P.[Episode] !=''
AND (
T.[Title] is null
OR T.[seen] =0
OR P.[title] LIKE 'Robot Chicken%'
)
ORDER BY [date],[start time]
#!/bin/bash
echo "Set Seen Tracker"
echo "================"
echo "(hit return with no value to exit)"
tid="nothing yet"
while [ ${#tid} != 0 ]
do
echo -n "tracker id:"
read tid
if [ ${#tid} != 0 ]; then
sqlite3 database/tv.db "update tracker set seen=1 where id=$tid"
fi
done
select [Title],[Genre],[Year],[Name],[Date],[Start Time] from programme P INNER JOIN Channel C ON P.channelId = C.Id where [Date] >= date('now') AND Film='true' ORDER BY [Date],[start time]
Selected Essays on the Technology, Creativity, Copyright, and the Future of the Future
egrep -lIUr $'\r$' raw/channels/*.dat | xargs sed -i 's/\r//'
sqlite3 database/tv.db "delete from programmeTEMP"
for i in raw/channels/*.dat;
do
channelid=$(echo "$i" | sed -e "s/[^0-9]*//g")
cat raw/channels/$channelid.dat | grep "~" | sed -e 's/\"/\\\"/gi' -e "s/'/''/gi" -e "s/~/','/gi" -e "s/^/insert into programmeTEMP values (null,$channelid,'/gi" -e "s/$/');/gi" | sqlite3 database/tv.db
done
sqlite3 database/tv.db "UPDATE programmeTEMP SET [Date] = (SUBSTR([Date],7,4)||'-'||substr([Date],4,2))||'-'||substr([Date],1,2) WHERE [Date] LIKE '__/__/____';"
echo "insert into programme select null,PT.channelId,PT.Title,PT.[Sub-Title],PT.Episode,PT.Year,PT.Director,PT.Performers,PT.Premiere,PT.Film,PT.Repear,PT.Subtitles,PT.Widescreen,PT.[New series],PT.[Deaf signed],PT.[Black and White],PT.[Film star rating],PT.[Film certificate],PT.Genre,PT.Description,PT.[Radio Times Choice],PT.Date,PT.[Start Time],PT.[End Time],PT.Duration from programmeTEMP PT \
LEFT JOIN programme P ON PT.channelId = P.channelId AND PT.Title = P.Title AND PT.Date = P.Date AND PT.[Start Time] = P.[Start Time] WHERE P.title IS NULL;" | sqlite3 database/tv.db
Please call Emma on
01482 380680
thankyou
2f is a trading name of Westcot credit services limited, registered in Scotland. no. 84131.
registered office: kyleshill house, 1 glencarin street, salcoats KA21 5JT
email
root
flog archives
In fact I'm not responsible for anything ever, so there!
Disclaimer:
This page is by me for me, if you are not me then please be aware of the following
I am not responsible for anything that works or does not work including files and pages made available at www.jumpstation.co.uk
I am also not responsible for any information(or what you or others do with it) available at www.jumpstation.co.uk