I've created a website which shows me what's on telly for the day, based on the name and episode it's able to pull the episode information, the time it airs, and other bits and pieces. I've created a flatfile to store the episode information in, in the following format:
Entourage--Entourage||3x17
Family Guy--Family%20Guy||5x16
Drive--Drive||1x05
Heroes--Heroes||1x21
Jericho--Jericho||1x22
Lost--Lost||3x20
Where the flatfile has following format:
ShowName--RegexSearchfortheshow||SeasonXEpisode
I'm wanting to run a script each week to increment the number on the end, to maintain the current episode for the week. I've done a bit of work with reading and writing but have always written to the end of the file. Is there going to be anyway to read the episode values and then overwrite the existing value? It'll be a piece of cake to read the number, increment it, but I have no idea how to write it back where it came from. Any ideas?
I'd also like to be able to put ||Hold on the end, suggesting that the show has currently stalled so the number doesn't increment. Once again, I'm pretty sure I can figure that out but need to know about the number writing first.
Thanks