Vlad Posted December 6, 2005 Share Posted December 6, 2005 It seems that the html output from EWS includes its own inline stylesheet. I'm trying to come up with a way to post the scores automatically to my club website, and one of the things I would have liked to do is style them according to site CSS. Anyone know a way to change he default styling or override it? If not I guess I'll have to take the text files and work my way from them. Link to comment Share on other sites More sharing options...
John Heiter Posted December 6, 2005 Share Posted December 6, 2005 Vlad, How automated are you talking about? As I understand it, you have to individually save each page that you want in HTML format from WinScore. Each of the files this generates contains a simple set of CSS class definitions. One option would be to write a little script to go through all the files in a directory and remove this style definition. I'm not sure exactly how you want to format the output but unless you plan to get really detailed with it, it would probably be much easier to create txt files instead and then create a set of templates that call the contents of those files into pre formatted cells. Once that was done all you would need to do would be to drop the txt files from each match into the appropriate directory and you would be done. You won't have all the text options that CSS gives you but how much markup do you really want on match results? John Link to comment Share on other sites More sharing options...
George Posted December 6, 2005 Share Posted December 6, 2005 Ditto on the start with plain text output and mark it up yourself method. If you mess with the existing html it will be just as much work, if not more. If you do what John says, it's a whole lot easier later and all the real work is in setting up the template. Link to comment Share on other sites More sharing options...
Vlad Posted December 6, 2005 Author Share Posted December 6, 2005 For the most part, I just wish the dw* styles EWS provides wouldnt include color information. I have no real problems with the layout and font choices, but the white background would look silly next to whatever other color scheme we end up using, even more so if I try to include them in a generic doc that includes a sidebar and other decorations. I think I might just leave them alone and open then in their own window and not worry about. Most of the automation I really want to do will mostly have to do with the layout of results of multiple matches, and the multiple links within those match to the actual results sets. I can do that without worrying to much about what the scores look afterwards. I was just curious if there was some magic option I miss that would allow me to override some the settings, but it seems that they are hard coded in the app. Link to comment Share on other sites More sharing options...
John Heiter Posted December 6, 2005 Share Posted December 6, 2005 Vlad...and anyone else interested.... I went ahead and put together a little script that opens every file in a specified directory looking for a particular string and replacing it. With it, you should be able to save all your files to html in Winscore and then run this script one time to change all the background color specs to whatever color you want. If you want a copy, PM me with your e-mail and I'll send it to you. John Link to comment Share on other sites More sharing options...
wgnoyes Posted December 9, 2005 Share Posted December 9, 2005 Huh! It's been a long time since I looked at the generated output from the 'save html' cmdbutton in ezwinscore, and there's apparently been quite a bit of work done on formatting that just wasn't there when I used to do this with version 1.x. I didn't know we had worked on that part of the system. If it wasn't for just a couple of piddly cosmetic issues (center the few data columns and cell-merge some title-containing cells), you could almost use these as is. Still not perfect, but its a hell of a lot better than it was before. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now