Improved Web Export

Tell us about your wildest feature dreams. Or just harmless suggestions for improvement.
Post Reply
kevindosi
Bruji Friend
Bruji Friend
Posts: 18
Joined: Wed Oct 03, 2007 10:17 pm

Improved Web Export

Post by kevindosi »

Firstly, let me say that I appreciate the ftp improvements in the newest version of DVDPedia. However, I have another request to make.
I don't know too much about web design, so I can't go into too much detail on how this might be done, but I have an idea on how to greatly shorten the length of time it takes to export to ftp.
The Problem:
The way it is right now, if I add a single movie to my library and try to update my webpage (http://www.kevindosi.com/library), DVDPedia has to reupload my entire collection. With around 500 movies, this takes a while.
If you use a template that creates a webpage for each movie, like I do, then this takes even longer. The reason is that DVDPedia numbers each collection and puts them in the order you decide, I assume. So, since I list my movies alphabetically it will assign my first alphabetical movie as something like 01.html with the artwork of 01.jpg. When I add a movie to the library, the # of any given movie in an alphabetical list changes so all the page numbers have to be updated.
My Idea:
Instead of exporting as 01.html and 01.jpg, which doesn't make a lot of sense to me in the first place, the pages\artwork should be labeled by their name (ie. AmericanHistoryX.html, AmericanHistoryX.jpg). Then, when you update your site, DVDPedia could automatically upload the entire site and in the background could just choose to not overwrite the files that are already in place. This way, only new entries would be added. The index page would have to be overwritten to reflect the changes, but there's no reason to reupload the artwork and individual movie information pages each time I want to make a simple change.

I also think that implementing this technique would make it much less of a hassle for the user to set up automatic ftp updates in the background (via an system preference or a widget, perhaps, if that were to become a feature in a future version).

Anyway, I appreciate your effort. The FTP feature is fully functional, I just think it could be better. Cheers!
User avatar
Conor
Top Dog
Posts: 5345
Joined: Sat Jul 03, 2004 12:58 pm
Contact:

Re: Improved Web Export

Post by Conor »

Thank you for the idea. The biggest upload time is for the artwork and the FTP function already takes care of that during an update. It checks if the cover art exist online and does not upload it if present. For the HTML files it does upload them all since depending on the template and export settings a small change or addition might change all the files. Improvements are always possible and will add your suggestion to the list to tackle in the future.

In the meantime since this export is the worst possible case, it has one file for each movie. You can change DVDpedia's export to always name the movie files consistently add the following line to meta area of the HTML details template (ThreeViewsENDetails): (The file is in your home folder ~/Library/Application Support/DVDpedia/Templates, use a text editor that does not render HTML. If using TextEdit use the open command and tell it to ignore rich text commands).

Code: Select all

<meta name="uidNaming" content="yes" />
This will name all the files by their unique id used by DVDpedia that is always the same. You will also have to update the index template to now link to the movies by uid, in the file ThreeViewsEN do a find and replace for:

Code: Select all

details/page[key:incrementalNumber].html  
change to:
details/[key:incrementalNumber].html  (Notice there is no "page" part in the url.)
Now you will have a consistent naming export (I do like the idea of titles for links and will look into it. Although with all the possible title characters it would need encoding). Do a regular HTML export to disk and use a program like Transmit to synchronize the site with one button click. The uid numbers always increase, so it's easy to see what is new. DVDpedia makes sure that although the cover has just been resized and created for the web the modification and creation date reflect that of the original. Download the beta where I have made DVDpedia go further and added that the creation date and modification date of the files by uid name will also reflect the creation and modification date of the movie in the database. Meaning you won't have to worry about editing a movie and making sure it gets uploaded as Transmit will see that HTML file as new and upload it. The index file will always be uploaded as it contains a number of movies and is not named by uid.
Post Reply