| | | HTML Output Suggestion/Question | |
| |
| Author | Message |
|---|
esra Junior Member

Posts: 33 Join date: 2009-05-08
 | Subject: HTML Output Suggestion/Question Tue Sep 08, 2009 3:36 am | |
| Always wondered, is it possible to have the HTML file show more than just the title? I mean the link to IMdb is great, but could you have it say show the poster and the brief outline/summary for the movie also? i was just thinking it would be great to be able to use this fle as a way of telling friends and family what movies i have so they can borrow. And, this is probably going too far, but is there a way to have it maybe split by genre or day added etc? Anyway just an idea seeing as the information is there in the lists etc anyway. Thanks for the hard work. |
|  | | dbareis Senior Member


Posts: 180 Join date: 2008-12-08
 | Subject: Re: HTML Output Suggestion/Question Tue Sep 08, 2009 10:19 am | |
| | esra wrote: | Always wondered, is it possible to have the HTML file show more than just the title?
I mean the link to IMdb is great, but could you have it say show the poster and the brief outline/summary for the movie also?
i was just thinking it would be great to be able to use this fle as a way of telling friends and family what movies i have so they can borrow.
And, this is probably going too far, but is there a way to have it maybe split by genre or day added etc?
Anyway just an idea seeing as the information is there in the lists etc anyway.
Thanks for the hard work. |
It would also be great if we could supply template html for start/end and for each item. It would be very nice if we could refer to anything stored within thye XML .NFO via an XPATH or similar...
Bye, Dennis |
|  | | billyad2000 Admin

Posts: 890 Join date: 2008-09-20
 | Subject: Re: HTML Output Suggestion/Question Tue Sep 08, 2009 1:35 pm | |
| I would like to do more with the HTML output, but there are two things stopping me right now, Firstly and most importantly, I don't know html, I created the current system by creating a page with a few movies, linked to IMDB, and had a look at the HTML, I am not sure how a template system would work. Secondly, only limited information from the movie is actually held in memory. The actual list is These are: title year IMDB ID genre rating top250 playcount Any additional information would need to be loaded from the nfo file. This would not be difficult, but it would take longer to create the HTML list as each movie nfo was loaded. As for art, this would slow things down more as MC found the path for the poster or fanart, and I am not certain how that would work, would the images be linked directly from their current location, or would thumbnails be made and stored with the HTML file. What I need is guidance on how to achieve what people want, accessing the XML elements would not be an issue, its just a case of knowing how to add the elements to the html. |
|  | | dbareis Senior Member


Posts: 180 Join date: 2008-12-08
 | Subject: Re: HTML Output Suggestion/Question Mon Nov 09, 2009 9:37 am | |
| | billyad2000 wrote: | | What I need is guidance on how to achieve what people want, accessing the XML elements would not be an issue, its just a case of knowing how to add the elements to the html. |
Sorry meant to answer this ages ago...
One way of generated HTML would be via style sheets but that is perhaps too advanced for most, what I'd suggest is that you provide template HTML for the start/end of the htm and also for each item. The user can override any of these. It is basically html as you must have now with some form of replacement syntax for example "...<b><<SomeXpathWhichI'veForgottenWhatTheyLookLike>></b> so if you find "<<" you look for ">>" and what is in between is an XPATH, you may want to support a more advanced syntax but that would be be basics, I chose "<<" and ">>" as that wouldn't be allowed in normal html and so there would be no mistaking a user's intention.
You could allow variations where its not an xpath but a friendly name like "title" so users only need xpaths for more unusual elements.
Bye, Dennis |
|  | | StormyKnight Senior Member

Posts: 204 Join date: 2008-10-08
 | Subject: Re: HTML Output Suggestion/Question Mon Nov 09, 2009 10:26 am | |
| Yep basically Billy, you would define some tokens like <<TITLE>> & <<RUNTIME>>. A text file will have the html code plus the tokens at the appropriate places....All you need to do is creat a temp .html file with the tokens replaced with the real data & then send the temp file off the the web browser to display it. In addition there will be some other commands that you will need to include to allow a header section, a body section & a footer section. Something like this perhaps... <<MC HTML Page>> {this will not be forwarded to the html file, but used to confirm that a "valid" file is trying to be used by MC <<Header>> {Start of header - not copied to html} -----Code in here is copied to html, but tokens are replaced (only some tokens are valid in the header section like current date etc) e.g. html code to display "Movie Title Runtime" <</Header>> {End of Header - not copied to html} <<Body>> {Start of body, not copied to html file but used by MC to know that this is the body section } -----Html Code with tokens in here & e.g html code to show <<TITLE>> <<RUNTIME>> again only some tokens are valid in the body <</Body>> {End of body section, MC repeats body section until all movies are done} <<Footer>>----Html code in here for the footer information e.g. html code to display "Movie Count=<<MOVIE COUNT>>" "Total Runtime=<<TOTAL RUNTIME>>" again only some tokens are valid in the footer <</Footer>>In the example above you would end up with something like this... | Code: | Movie Title Runtime Title 1 1:00 Title 2 2:00 Title 3 3:00 Movie Count = 3 Total Runtime=6:00
|
The advantage of this method is the file above can be created by the end users, thus allowing the imagination & creativity to flow thru. Using the above method, html code like tables can be used to format the final display making them look better. Pictures/thumbnails would easly be added too! _________________ My Setup... Using MC on XP SP3 32bit, Media is on NAS unit, XBMC on 2 XBOX's & 1 XP PC
|
|  | | billyad2000 Admin

Posts: 890 Join date: 2008-09-20
 | Subject: Re: HTML Output Suggestion/Question Mon Nov 09, 2009 8:03 pm | |
| That all seems do-able but how are images handled, some people want to be able to include a thumbsize poster with the movie details, how is this achieved. It would be a simple matter to display the image via the path, but for portability would not the thumbs need to be resized and stored in a location relative to the html file. |
|  | | StormyKnight Senior Member

Posts: 204 Join date: 2008-10-08
 | Subject: Re: HTML Output Suggestion/Question Mon Nov 09, 2009 11:17 pm | |
| | billyad2000 wrote: | That all seems do-able
but how are images handled, some people want to be able to include a thumbsize poster with the movie details, how is this achieved. It would be a simple matter to display the image via the path, but for portability would not the thumbs need to be resized and stored in a location relative to the html file. |
Yes this is correct.....
For portability, the created html code & associated media that is linked in that code would have to be exported together with the correct relative paths..... _________________ My Setup... Using MC on XP SP3 32bit, Media is on NAS unit, XBMC on 2 XBOX's & 1 XP PC
|
|  | | dbareis Senior Member


Posts: 180 Join date: 2008-12-08
 | Subject: Re: HTML Output Suggestion/Question Tue Nov 10, 2009 2:29 am | |
| | billyad2000 wrote: | | but how are images handled, some people want to be able to include a thumbsize poster with the movie details, how is this achieved. |
I'd be happy to keep images out of it at least for starters but if you wanted to support thumbs then you'd need to do the resizing also and my syntax need not just cause text replacement, it could be for instructions for example "<<$CreateThumb:40x30,...>>"... |
|  | | StormyKnight Senior Member

Posts: 204 Join date: 2008-10-08
 | Subject: Re: HTML Output Suggestion/Question Tue Nov 10, 2009 3:47 am | |
| | dbareis wrote: | | ....it could be for instructions for example "<<$CreateThumb:40x30,...>>"... |
Yes thats a valid point, the tokens really are codes to perform some sort of function, but I guess it would depend on the degree of complexity required....
In the header you could define thumbs as being 40x30 for example as in your example, if the token wasn't there then the defaults would be assumed so latter on in the text when <<MovieThumb>> was mentioned, the thumbs would be created and the relative path calculated & subtituted for the token.
However, if the thumbs were not required, then the time to create them would also not be required.....
I guess the key in the early stages, is to make it so that complexity can be added if deemed necessary, without having to break the syntax used in the earlier stages....although that cannot always be avoided....
I guess we need to have a think about what would be the end result we would aim for in terms of data manipulation?
e.g. Do we want to be able to refer it specific movies? e.g. Do we want to define the sort order from the text code? e.g. Do we want to define rules about whats listed & whats not? e.g. Do we want to be able to color code depending on returned information? e.g. Do we want to be able to create multiple page web sites, by using frames etc where one frame has a list of movies, the other frame displays the artwork & a 3rd displays the details of the selected movie for example? e.g. Weblinks to trailers?
Most of what I listed above would be the addition of new tokens to tell MC what to do with the data & could be added on at a later stage if deemed necessary.
As a start if we could list the movies in a table, that would be what the majority would need, the actual html code would be able to clean it up & make it a little more presentable however with the addition of backgrounds, colours & text alignments.
Cheers _________________ My Setup... Using MC on XP SP3 32bit, Media is on NAS unit, XBMC on 2 XBOX's & 1 XP PC
|
|  | | billyad2000 Admin

Posts: 890 Join date: 2008-09-20
 | Subject: Re: HTML Output Suggestion/Question Tue Nov 10, 2009 11:09 am | |
| I'll try to get a basic implementation of this added for the next build |
|  | | StormyKnight Senior Member

Posts: 204 Join date: 2008-10-08
 | Subject: Re: HTML Output Suggestion/Question Tue Nov 10, 2009 11:51 am | |
| Thanks Billy!  _________________ My Setup... Using MC on XP SP3 32bit, Media is on NAS unit, XBMC on 2 XBOX's & 1 XP PC
|
|  | | billyad2000 Admin

Posts: 890 Join date: 2008-09-20
 | Subject: Re: HTML Output Suggestion/Question Tue Nov 10, 2009 2:38 pm | |
| I've just setup a basic implementation of this, although their is no support for posters (yet) The template for the current simple list looks like this; <<MC HTML Page>> <<header>> <meta content="text/html; charset=UTF-8" http-equiv="Content-Type"> <h1 align="center"><font size="6"><b>XBMC Media Companion</b></font></h1> <h2 align="center"><font size="5"><b>HTML Output</b></font></h2> <h3 align="center"><<moviecount>> movies</h3> <p align=""center""> </p> <</header>> <<body>> <p align="center"><b><a href="<<imdb_url>>"><<movietitleandyear>></a></b></p> <</body>> <<footer>><</footer>> <</MC HTML Page>> The current supported tags are: <<moviecount>> <<title>> <<movietitleandyear>> <<movieyear>> <<runtime>> <<rating>> <<outline>> <<imdb_url>> <<fullpathandfilename>> I will add more to the list if they are needed, it should be noted that these tags are stored in the basic movie list and are quick to list, other tags, such as plot, while can be easily added would need to be loaded one at a time from the movie nfo file, the speed of this process depends on many things such as system and network speed. I just need to set up a method for allowing multiple templates and selection between them. |
|  | | StormyKnight Senior Member

Posts: 204 Join date: 2008-10-08
 | Subject: Re: HTML Output Suggestion/Question Wed Nov 11, 2009 12:59 am | |
| Looks good Billy, have you thought of how your going to handle errors? Such as an invalid token or invalid token syntax? I think you just need to keep that in mind when programming if you want to let the user know of an issue. The usual method is to report the error & the line number of the file that it found the error on. The other method is to simply ignore, & let the end user work out why something isn't being displayed as intended on the html output Both methods have merit ofcourse! _________________ My Setup... Using MC on XP SP3 32bit, Media is on NAS unit, XBMC on 2 XBOX's & 1 XP PC
|
|  | | billyad2000 Admin

Posts: 890 Join date: 2008-09-20
 | Subject: Re: HTML Output Suggestion/Question Wed Nov 11, 2009 1:35 am | |
| At the moment invalid tags are just ignored and as such will be added to the html, should be fairly obvious just by looking at the html where the error is. The only other issue I could think of is nfos that are missing fields, it is conceivable that in a large collection a person may have one or two incompleted fields, in this instance the information is just not added, no error will occur and the overall html should not be affected. btw, at the moment the list is generated according to the filtered list, so if any filters (text or genre) are applied then they will be applied to the output html, this also applies to the sortorder. |
|  | | dbareis Senior Member


Posts: 180 Join date: 2008-12-08
 | Subject: Re: HTML Output Suggestion/Question Wed Nov 11, 2009 2:28 am | |
| | billyad2000 wrote: | At the moment invalid tags are just ignored and as such will be added to the html, should be fairly obvious just by looking at the html where the error is.
The only other issue I could think of is nfos that are missing fields, it is conceivable that in a large collection a person may have one or two incompleted fields, in this instance the information is just not added, no error will occur and the overall html should not be affected.
btw, at the moment the list is generated according to the filtered list, so if any filters (text or genre) are applied then they will be applied to the output html, this also applies to the sortorder. |
You would probably want/need to convert the "<" to "<" etc. But outputting it (perhaps with a reason for failure) is probably the best way to handle it. |
|  | | | | HTML Output Suggestion/Question | |
|
| Page 1 of 2 | Goto page : 1, 2  |
| | Permissions of this forum: | You cannot reply to topics in this forum
| |
| |
| |