It is currently Fri Mar 29, 2024 11:25 am

All times are UTC + 1 hour [ DST ]




Post new topic Reply to topic  [ 27 posts ]  Go to page 1, 2  Next
Author Message
 Post subject: HTML export
PostPosted: Sat Nov 10, 2012 1:31 pm 
Offline
User avatar

Joined: Thu Jan 06, 2011 2:29 am
Posts: 707
Location: Jamaica
Warning! This is gonna be a pretty long thread...

About a year ago i suggested using html to format Coollector's printed lists.
(cool) Hector wrote:
kakashi wrote:
Could a feature be added to export a movie collection to a simple small and portable html? That would really help when showing movies to friends etc

Indeed, it had never occurred to me, but the simplicity of this idea is brilliant.
It's so easy to do, I'll give it a try very soon.
Thank you very very much !

At another point you mentioned exporting to a data file then adding transformations.
(cool) Hector wrote:
We'll proceed in several stages:
1) add a feature to export to XML (in a few months from now).
2) allow to apply XSLT transforms to the XML => to get an HTML file (shortly after).

2 days ago while reading some old posts i got to thinking. Why don't I try my hand at creating a HTML file for Coollector lists. Using a .Json file (eliminates the need for xml parsing) as my source i created a HTML application that would allow me to browse all movies in the list from Google Chrome.

Features (that i can remember from the top of my head):
- All movie/coollection data is loaded from the json file
- Show's list title e.g. "You own Videos of 230 movies and series"
- Shows owned/not owned via movie title font colour.
- drag and drop enabled
- selected movie gets a white border on grid
- Automatically uses blank movie poster if no image link is provided
- Tooltips show what will happen on clicking icons
- Movie posters can be loaded from default image location or specified folder
- links to youtube, imdb and tv.com work when present in data file
- shows wished and ordered status
- shows loaned information on hover when available
- rated icon changes to suit rating
- play button shows list of owned videos loaded from data file
- plays video files using VLC plugin or provides link to download/open locally where available
- shows synopsis (loaded from data file)

Stuff i haven't gotten around to:
- Scrollbar not yet programmed
- movie titles sometimes overflow their bounds


Last edited by kakashi on Mon Nov 12, 2012 2:30 pm, edited 4 times in total.

Top
 Profile  
 
 Post subject: Re: HTML export
PostPosted: Sat Nov 10, 2012 1:33 pm 
Offline
User avatar

Joined: Thu Jan 06, 2011 2:29 am
Posts: 707
Location: Jamaica
Attachment:
1_infopanel_focused.jpg
1_infopanel_focused.jpg [ 175.2 KiB | Viewed 7463 times ]


Attachment:
2_imagepanel_focused.jpg
2_imagepanel_focused.jpg [ 172.25 KiB | Viewed 7463 times ]


Attachment:
3_playlinks_visible.jpg
3_playlinks_visible.jpg [ 310.68 KiB | Viewed 7463 times ]


Last edited by kakashi on Mon Nov 12, 2012 2:25 pm, edited 1 time in total.

Top
 Profile  
 
 Post subject: Re: HTML export
PostPosted: Sat Nov 10, 2012 1:37 pm 
Offline
User avatar

Joined: Thu Jan 06, 2011 2:29 am
Posts: 707
Location: Jamaica
Attachment:
4_videoplayer.jpg
4_videoplayer.jpg [ 255.12 KiB | Viewed 7463 times ]


Files:
- HTML stuff 1.1 MB
- the rest is movie posters etc.

Attachment:
Coollector Web Edition.zip [2.45 MiB]
Downloaded 304 times


Last edited by kakashi on Mon Nov 12, 2012 2:26 pm, edited 2 times in total.

Top
 Profile  
 
 Post subject: Re: HTML export
PostPosted: Sat Nov 10, 2012 2:51 pm 
Offline
User avatar

Joined: Thu Jan 06, 2011 2:29 am
Posts: 707
Location: Jamaica
Currently only works in Google Chrome...


Top
 Profile  
 
 Post subject: Re: HTML export
PostPosted: Sat Nov 10, 2012 3:09 pm 
Offline
User avatar

Joined: Tue Sep 27, 2005 2:28 am
Posts: 7636
kakashi wrote:
Warning! This is gonna be a pretty long thread...

Wow! You are very motivated :D


kakashi wrote:
you mentioned exporting to a data file then adding transformations.

That's still the plan. We will export to XML. It's the universal export format, because it can be transformed into anything, with an XSLT transform. To transform XML into html, it's as simple as adding the location of the XSLT file into the header of the XML, and your browser will directly display the html.


kakashi wrote:
Using a .Json file (eliminates the need for xml parsing)

It's very easy to parse XML with XSLT. And as I said, an XSLT can transform the XML into anything. It can transform it into json if you really want, but in my opinion it's an unnecessary step.

My solution will be extremely simple for the users:

1) they'll decide what information they want to export.

2) they'll decide the style of the page (it's basically like choosing a skin).

The same way that anyone can contribute skins, anyone will be able to contribute XSLT files.

Choosing a style just means choosing what XSLT file will be added to the XML file.


kakashi wrote:
Currently only works in Google Chrome...

My solution works with all browsers 8)

With XSLT, you can tell what CSS file to use, what javascript, etc.. There's absolutely no limitation. You can obtain even the most complex html files. It's trivial to get the same you got with json.


Top
 Profile  
 
 Post subject: Re: HTML export
PostPosted: Sat Nov 10, 2012 3:34 pm 
Offline
User avatar

Joined: Tue Sep 27, 2005 2:28 am
Posts: 7636
Here is a small example to understand the power of XML + XSLT:

http://www.w3schools.com/xsl/tryxslt.asp?xmlfile=cdcatalog&xsltfile=cdcatalog


Top
 Profile  
 
 Post subject: Re: HTML export
PostPosted: Sat Nov 10, 2012 3:37 pm 
Offline
User avatar

Joined: Tue Sep 27, 2005 2:28 am
Posts: 7636
Also, if the file is basically an XML file to which is applied an XSLT, it's possible to have a combo box to change the style at any moment. It 'll just change the XSLT that is used.


Top
 Profile  
 
 Post subject: Re: HTML export
PostPosted: Sat Nov 10, 2012 4:13 pm 
Offline
User avatar

Joined: Thu Jan 06, 2011 2:29 am
Posts: 707
Location: Jamaica
(cool) Hector wrote:
Also, if the file is basically an XML file to which is applied an XSLT, it's possible to have a combo box to change the style at any moment. It 'll just change the XSLT that is used.

I've seen it in use before and there's no denying the benefits. :)

I however just couldn't resist the lure of webapp opening a data file vs. a HTML list output. :worried: For some reason with the train of thought i had it just felt like the natural thing to do. The primary thing going through my mind was how could i get my Coollection file available on all OS's using the export function. While aiming for a very interactive experience I tended to focus primarily on the javascript (hence it felt natural to use javascript data).
:(

The first solution that came to mind was to store Coollection information as javascript variables then write a Web Application that allows interaction with all those javascript variables in an interface that feels as close to the familiar Coollector interface as possible.

My driving thought was 'if this works right then it will feel almost like I'm using Coollector even when I'm on linux'. (a read only version of course) 8)

I hope I'll get to do that... :worried:


Top
 Profile  
 
 Post subject: Re: HTML export
PostPosted: Sat Nov 10, 2012 4:23 pm 
Offline
User avatar

Joined: Thu Jan 06, 2011 2:29 am
Posts: 707
Location: Jamaica
Please don't think I'm trying to replace my use of the Coollector exe :( . It's just that i'd like a temporary measure until I can run Coollector on Linux and the list export seemed like a good way to make that possible. :worried:

I'd have no problems settling for web version with limited functionality for now.


Top
 Profile  
 
 Post subject: Re: HTML export
PostPosted: Sat Nov 10, 2012 4:30 pm 
Offline
User avatar

Joined: Tue Sep 27, 2005 2:28 am
Posts: 7636
kakashi wrote:
It's just that i'd like a temporary measure until I can run Coollector on Linux and the list export seemed like a good way to make that possible. :worried:

Have you tried running Coollector with WINE ? A long time ago, I've been told that it worked fine. I don't know if it's still the case.


Top
 Profile  
 
 Post subject: Re: HTML export
PostPosted: Sun Nov 11, 2012 6:39 am 
Offline
User avatar

Joined: Thu Jan 06, 2011 2:29 am
Posts: 707
Location: Jamaica
Nope, i didn't. I'll be cool as soon as the export feature is complete though. :D

- Sorry i took so long, i was busy. Its not everyday that I'm free to do all that i please. :(


Top
 Profile  
 
 Post subject: Re: HTML export
PostPosted: Sun Nov 11, 2012 11:50 am 
Offline
User avatar

Joined: Tue Sep 27, 2005 2:28 am
Posts: 7636
kakashi wrote:
Nope, i didn't. I'll be cool as soon as the export feature is complete though. :D

I don't understand. If Coollector works fine on Linux, it should be the end of all your problems. Why the export feature ?


Top
 Profile  
 
 Post subject: Re: HTML export
PostPosted: Sun Nov 11, 2012 12:13 pm 
Offline
User avatar

Joined: Thu Jan 06, 2011 2:29 am
Posts: 707
Location: Jamaica
(cool) Hector wrote:
Have you tried running Coollector with WINE ?

Honestly I never thought of that (I've had problems with it in the past). I saw a way to hit multiple birds with one code. I guess it's a case of tunnel vision. Here's a screenshot of what you see if you log on to my server:

Attachment:
Capture.PNG
Capture.PNG [ 56.9 KiB | Viewed 7474 times ]


I actually do have reasons for my actions. I'm just not very good at explaining myself. It's no problem though. I can get it to work when the time comes. 8)

(cool) Hector wrote:
My solution works with all browsers

The problem is that when using HTML5 there are variations in how CSS etc. works in different browsers. I tested using Chrome so i still need to add some lines where firefox and other browsers works differently. I don't think that's avoidable.


Top
 Profile  
 
 Post subject: Re: HTML export
PostPosted: Sun Nov 11, 2012 12:34 pm 
Offline
User avatar

Joined: Tue Sep 27, 2005 2:28 am
Posts: 7636
kakashi wrote:
Here's a screenshot of what you see if you log on to my server:

Is it the server where your video files are stored ? I'm really sorry, but I fail to understand how it's related with what we talked about. :sorry:


kakashi wrote:
The problem is that when using HTML5 there are variations in how CSS etc. works in different browsers.

I've heard that HTML5 programming can be very tricky.


Top
 Profile  
 
 Post subject: Re: HTML export
PostPosted: Sun Nov 11, 2012 12:57 pm 
Offline
User avatar

Joined: Thu Jan 06, 2011 2:29 am
Posts: 707
Location: Jamaica
(cool) Hector wrote:
Is it the server where your video files are stored ?

Yup the web page above allows browsing/playing of all my movies. It's not quite as good as the one I wrote with HTML 5 though.

Theoretically i should be able to access the Web application from any network device that supports html5.

(cool) Hector wrote:
I've heard that HTML5 programming can be very tricky.

I'ts definitely worth it though. The web has never been so interactive.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 27 posts ]  Go to page 1, 2  Next

All times are UTC + 1 hour [ DST ]


Who is online

Users browsing this forum: No registered users and 39 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  


Powered by phpBB © 2024 phpBB Group