FieldStation42 icon indicating copy to clipboard operation
FieldStation42 copied to clipboard

Add ability to export schedule as a text file/csv

Open pablomcnally opened this issue 7 months ago • 3 comments

Is it just me that wants to be able to print out the channel schedules so I can see what's coming up - sort of like a TV guide....

pablomcnally avatar May 11 '25 11:05 pablomcnally

This is a good one - currently you can run something like python3 station_42.py -u NBC and it will print a that channels current schedule to screen. Not an export though and not all the channels - I assume you're looking for something that shows all the channels togther (like TVGuide did)?

shane-mason avatar May 11 '25 15:05 shane-mason

That's the dream I guess, but even just the text out somehow might mean I end up actually making a monthly/qtr guide as a pdf, because, well I have too much time on my hands clearly. But anything is a fine start.

pablomcnally avatar May 11 '25 17:05 pablomcnally

Shane, what am I doing wrong here. Tried what you said above about getting it to print the schedule to screen and it is throwing up this:

Loading configuration for: confs/quiz.json Loading configuration for: confs/news.json Loading configuration for: confs/guide.json Loading configuration for: confs/afterschool.json Loading configuration for: confs/movies.json Loading configuration for: confs/scifi.json Loading configuration for: confs/teletext.json Loading configuration for: confs/comedy.json Loading configuration for: confs/saturdayTV.json Traceback (most recent call last): File "/home/pablo/FieldStation42/station_42.py", line 119, in main() File "/home/pablo/FieldStation42/station_42.py", line 80, in main LiquidManager().print_schedule(args.print_schedule, args.verbose) File "/home/pablo/FieldStation42/fs42/liquid_manager.py", line 124, in print_schedule for _block in self.schedules[network_name]: KeyError: 'comedy'

Anything simple my end?

pablomcnally avatar May 12 '25 18:05 pablomcnally

Going to go ahead and do this now. Should be pretty fast.

shane-mason avatar Jun 09 '25 02:06 shane-mason

The schedule is easily exportable now as json via the web api described here.

shane-mason avatar Aug 13 '25 04:08 shane-mason