Page 1 of 1

Excluding items from HTML export

Posted: 2008-10-31 09:11:16
by dalanik
Hello, I am using HTML template to export my catalog but since I have a lot of TV shows which contains episodes, I'd like to exclude them from Export - the ANT anyways reports "out of memory" error when I try to export whole catalog.

All episodes are separated by delimiter "|" character. Is there a way to EXCLUDE all items which have "|" in the name?

Regards,
Dalibor

Posted: 2008-10-31 09:37:23
by antp
Hi,
It is not possible to automatically exclude some things, except by selecting only what you want to export and then specify that you want to export selected movies.
But the fact that it gives you an "out of memory" error is rather a bug... can you easily reproduce that with a small catalog that you could send me, with some particular movies in it?

Posted: 2008-10-31 13:50:11
by dalanik
When I select by hand only the items I want (and that is a job for almost 4000 entries!!!) :-) then it works with approx. 1100 entries. My catalog is like 260Mb.... (I use 600x600 jpgs for cover art).... So I think it is not the issue of some entries being corrupted or such, but rather of too many entries... I can try selecting some and see if that fails, but it works with approx 1100 entries...

Posted: 2008-10-31 13:57:06
by dalanik
Yes, just as I thought. I exported 2000 entries and it work (1st half of 4000). Then I selected 2nd half (another almost 2000 entries) and it worked too. SO there's nothing in the catalog that is bad. It is the number of entries.

Posted: 2008-10-31 14:04:11
by antp
If you disable picture export, does it work?
Anyway I guess I could easily test with 4000 entries.

Posted: 2008-10-31 14:07:43
by dalanik
It breaks somewhere between 3420 and 3430 items.... I'll test it w/o pictures. Thanx for looking into this.

Regards,
Dalibor

Posted: 2008-10-31 14:09:38
by dalanik
No, it doesn't work even without pictures. When it breaks, it has all the jpg covers created, and the HTML file is 0 bytes.

Posted: 2008-10-31 19:52:44
by antp
ok I will check that... strange that nobody reported problems yet.
or maybe your template is rather complex?
It is a template with all the movies listed in a single file?

Posted: 2008-11-03 13:38:58
by dalanik
Well, it depends on what you call complex :-) It's a 12K HTML file, it uses 11 database fields plus picture, so I wouldn't call it complex on that account. It adds some graphical elements to the format, but AMC shouldn't care about those, right? I mean, it just repeats whet's in between $$ITEM_BEGIN and $$ITEM_END?

It is usinf all the records from the database, that is correct, in a singe file. As a matter of fact, I'd like to somehow split it into several files, but I don't know whether there is a (semi) automatic way to do that?

Posted: 2008-11-03 21:08:22
by antp
I was asking that to know if the problem also occurs with a basic template or if it had to be rather big already as template.
Well I could try myself :D
There is only a way to have 1 file per movie, but not to split on another basis.

Posted: 2008-11-03 22:10:32
by bad4u
Just a note on the original question of this topic: If "Checked" field isn't used for anything else, it would be possible using a little script to check/uncheck movies depending on content of another field, e.g. if a | is found on a specific field or not. Then it would be possible to export only checked movies to HTML..

Posted: 2008-11-04 07:15:27
by dalanik
bad4u wrote:Just a note on the original question of this topic: If "Checked" field isn't used for anything else, it would be possible using a little script to check/uncheck movies depending on content of another field, e.g. if a | is found on a specific field or not. Then it would be possible to export only checked movies to HTML..
Cool, that would be a solution! Back to scripting! :-)

Another thing that is bothering me.... (I hope I'm not too much) My artwork is 600x600 pixels in size, which is OK for my export for HTPC purposes, but is kinda big for web page, especially with >1500 items :-) The tag which inserts picture doesn't have an option to specify size - that is, I just put $$ITEM_PICTURE in template and it does the rest. Isn't there a way to resize images for export? If not it's no big deal, I just use IrfanView batch mode to do it...

Posted: 2008-11-04 10:07:35
by antp
The program itself does not do resizing, so as you said you have to use Irfanview for that ;)
I should some day add the possibility to call an external program (e.g. Irfanview) to make that automatically.

Posted: 2008-11-05 10:28:27
by dalanik
Ha ha, I don't even know what language AMC uses :-) (looks like pascal or delphi to me) but I managed to make a script which works for selecting items (films) that don't contain "|" character.... can anyone see any obvious errors I may have made (even though it seems to work)?

Code: Select all

program SelectNoEpisodes;

const
	Field = fieldOriginalTitle;

var
	s: string;
	a: Integer;
	
begin
	s := GetField(Field);
  a := pos ('|', s);

	if a > 0 then
    SetField(fieldChecked, '')
	else
		SetField(fieldChecked, 'x');
end.

Posted: 2008-11-05 11:42:35
by antp
It seems good.
Just for info, in case someone wonders or needs it:
For the field "Checked", values '' or '0' or 'False' mean unchecked , any other value means checked.
But when using GetField it returns 'True' or 'False'.