2006-07-12, 19:25
for anyone interested (and not actively reading the xbox-scene scripting forum), i'm finally updating xmovieguide. i plan to make it modular in a way that will make it easy for people to write parsers for webpages other than hollywood.com, and xmovieguide just use the movie list provided by those parsers.
okay, here's what i'm currently looking at. i'm just designing it at the moment, so it might change significantly once i'm guts-deep in writing it, but i wanted to give you a basic idea.
the xmovieguide folder will contain a handful of python files with names that start with "mgsource_" such as "mgsource_hollywood".
each of those mgsource files will contain specific instructions for reading and parsing a particular movie website. xmovieguide will hand it some sort of identifier (such as a zip code in the us), and it will hand xmovieguide back a list (well, actually a dictionary) of movies.
so, instead of rewriting xmovieguide to work with a different website, all anyone would have to do is figure out how to parse the html for that website, and write up a new mgsource file and drop it in the folder. i'll have to add an option in xmovieguide for choosing which mgsource to use, but that won't be hard.
this will make it a lot easier for people to develop compatibility with different sites. they will need to know python, and they will need to be pretty good at regular expressions probably, but they won't have to deal much with my code, and it will be a lot simpler to know which parts to replace, and which parts to leave the same. i'll probably even write up a tutorial on how to build an mgsource file, based on the work i do to get hollywood.com (or movietickets or whomever i use) working again.
but, i want to be clear. i don't really intend to write all those mgsource files. just make it a lot easier for interested parties to make and share that level of support.
anyone interested in working on that, follow this thread for updates on exactly how i'm setting these up, and details on how and when to start building source files. you can feel free to visit your favorite movie guide site and start viewing the source html, to try to get an idea for what will and won't work, when we get to that point.
okay, here's what i'm currently looking at. i'm just designing it at the moment, so it might change significantly once i'm guts-deep in writing it, but i wanted to give you a basic idea.
the xmovieguide folder will contain a handful of python files with names that start with "mgsource_" such as "mgsource_hollywood".
each of those mgsource files will contain specific instructions for reading and parsing a particular movie website. xmovieguide will hand it some sort of identifier (such as a zip code in the us), and it will hand xmovieguide back a list (well, actually a dictionary) of movies.
so, instead of rewriting xmovieguide to work with a different website, all anyone would have to do is figure out how to parse the html for that website, and write up a new mgsource file and drop it in the folder. i'll have to add an option in xmovieguide for choosing which mgsource to use, but that won't be hard.
this will make it a lot easier for people to develop compatibility with different sites. they will need to know python, and they will need to be pretty good at regular expressions probably, but they won't have to deal much with my code, and it will be a lot simpler to know which parts to replace, and which parts to leave the same. i'll probably even write up a tutorial on how to build an mgsource file, based on the work i do to get hollywood.com (or movietickets or whomever i use) working again.
but, i want to be clear. i don't really intend to write all those mgsource files. just make it a lot easier for interested parties to make and share that level of support.
anyone interested in working on that, follow this thread for updates on exactly how i'm setting these up, and details on how and when to start building source files. you can feel free to visit your favorite movie guide site and start viewing the source html, to try to get an idea for what will and won't work, when we get to that point.