Personal Video Database

English => Development => Scripts and Templates => Topic started by: svenne on June 15, 2010, 03:24:29 pm

Title: Export Template: Simple List (Rich-Text) (Microsoft Word Document)
Post by: svenne on June 15, 2010, 03:24:29 pm
This export template generates a compact list of the movie titles in your database. Current sort order is kept. The list is exported as formated Rich-Text (.RTF) and can be opened, edited or printed with Microsoft Word, for example.

Line format:
ID.  Movie Title (year)  (genre) (filesize, codec, languages)

You will always find the newest version attached to the last post of this thread...
Title: Re: Export Template: Simple List (Rich-Text)
Post by: rick.ca on June 15, 2010, 09:24:23 pm
Thanks! I suppose I don't need to understand it, but I was surprised at the amount of "stuff" in the template.

I note that it would not be difficult to modify this to delimit the fields with tabs. Then Word could convert the result to a table. I might prefer to export to CSV and import to Excel to create a tabular report, but some will prefer this method.
Title: Re: Export Template: Simple List (Rich-Text)
Post by: svenne on June 15, 2010, 10:10:50 pm
Yes, Rich-Text is complicated, but in the end it's a markup language like HTML.
If someone's interested and wants to know more, here you can find the specifications:
http://msdn.microsoft.com/en-us/library/aa140277%28office.10%29.aspx

I didn't program that from scratch of course. I would have gone mad!  ;) I exported a draft in Word as Rich-Text file, did some modifications and copied and pasted the appropriate parts to the template.

Quote
I note that it would not be difficult to modify this to delimit the fields with tabs.
That's quite simple, even without changing the template, just use the search and replace function in Word:
Search for ") " and replace with ")^t"
If you want to exclude the bold font type for that (to ensure movie titles with parenthesis stay without tabstops), you can do so: In the search and replace dialog click on the format button and choose "Font", where you can advise word to search and replace only text that's not bold.

It also should not be that complicated to export to Rich-Text as table directly. The only thing I cannot export to a Rich-Text file are the posters, because they would have to be embedded directly into the file. External image files don't help here:
http://msdn.microsoft.com/en-us/library/aa140283%28v=office.10%29.aspx#rtfspec_24
Title: Re: Export Template: Simple List (Rich-Text)
Post by: rick.ca on June 15, 2010, 10:50:58 pm
Quote
The only thing I cannot export to a Rich-Text file are the posters, because they would have to be embedded directly into the file.

We'll try to contain our disappointment by remembering we can use one of your splendid HTML templates (http://www.videodb.info/forum_en/index.php?topic=1844.msg8889#msg8889) to do that. ;D
Title: Re: Export Template: Simple List (Rich-Text) (Microsoft Word Document)
Post by: svenne on August 18, 2010, 01:12:32 pm
Well, thanks for your plaudit!  :)
I added support for episodes to this template now. They will be listed beneath the corresponding main entry in smaller font size.

[attachment deleted by admin]