no underscore on exported html

If you need help on how to use the program
Post Reply
wicker_man
Posts: 15
Joined: 2008-02-29 09:10:59

no underscore on exported html

Post by wicker_man »

Hi again, friends!

I've got a problem that's nagging be, let's see if there's an (easy) way to solve this:

When I export my list of films, either individual film pages or a full list, i like to have a picture for each film, and because i need it to have a class and whatnot (for unrelated needs) i use
src="$$ITEM_PICTUREFILENAME"

which is fine, *but* when the html files are generated they link to

name_number.jpg
instead of
namenumber.jpg

You see, all my film posters are like this:

wickerman1889.jpg

but when exporting, the html files assume it is
wickerman_1889.jpg

As you can imagine, changing all of those references, on practically 2000 files, even with the automation that notepad++ gives me, takes ages!

Am I doing something wrong? Can this be solved?

Thank you in advance!

wickerman
:)
antp
Site Admin
Posts: 9714
Joined: 2002-05-30 10:13:07
Location: Brussels
Contact:

Post by antp »

Hi,

When you say that your film posters are like that, you mean the original files of your catalog or the ones generated by the HTML export?

Actually the HTML export assumes that you use the pics that it generates.

But in case of catalogs where pics are already stored as external files it could be clever to use the existing file names indeed... That could be added in the next release, but until then you would have to re-export pics at the same time as HTML unfortunately.
wicker_man
Posts: 15
Joined: 2008-02-29 09:10:59

Post by wicker_man »

My posters are like this

wickerman1452.jpg

because i used your excellent command line tool to link all the images to the catalog. I wanted them to be only like this

1452.jpg

but it is not possible, and i didn't mind, I added a word before, no problem.

When exporting to html i have to choose a file name, and for compatibility sake i chose wickerman.html so that each individual page could become

wickerman1.html
wickerman45.html
wickerman756.html

but AMC adds an underscore, like this


wickerman_1.html
wickerman_45.html
wickerman_756.html

which again, i don't mind because on the "full list" html the links are to these urls, with underscore. It changes everything consistently, so no problem.

The problem only resides in the fact that it thinks that images also have an underscore, like this


wickerman_1.jpg
wickerman_45.jpg
wickerman_756.jpg

when in fact they do not.

Uhm, now that i had a good night sleep, I'm wondering that if i rename all my picture files to wickerman_xxx.jpg the export will be perfect... oh, but no, then i won't be able to see the posters inside AMC itself, because AMC expects them to be without underscore, right?

Uhm....
Unless i have 2 versions of each poster, one with an underscore and another without... maybe that's the key, here.

Still, the problem persists if i try to do something even fancier. You see, i would like to have an html list of all films that i have, sorted by directors. I cannot name it wickerman.html, cause there's already a file like that (with a list of all filmes sorted by number). I need to give it another name, say, wickerman_directors.html.

You can see the problem here > the export tool thinks all images files are named like this:

wickerman_directors_1.jpg
wickerman_directors_145.jpg

etc.

The problem thickens! :D

Do you think there could be a way for the exporting tool, in AMC, to ask the user where are the images, or what is the name of the images, or something like that?

Thank you again, and sorry if i repeated myself, i just wanted to make this all clear. :grinking:
antp
Site Admin
Posts: 9714
Joined: 2002-05-30 10:13:07
Location: Brussels
Contact:

Post by antp »

As I said I should add for that a possibility to use current image name.
But in your case, if the catalog is named "wickerman" you could say that you want to use catalog name instead of exported html file name as basis for images.
And you may want to rename once for all the images with a "_" in your catalog. Once the files are renamed you can re-link them to movies in the same way you did originally, no?
wicker_man
Posts: 15
Joined: 2008-02-29 09:10:59

Post by wicker_man »

But in your case, if the catalog is named "wickerman" you could say that you want to use catalog name instead of exported html file name as basis for images.
Uhm... how can I do that?
And you may want to rename once for all the images with a "_" in your catalog. Once the files are renamed you can re-link them to movies in the same way you did originally, no?
Perhaps, but perhaps the html export will then expect something like:

wickerman__1152.jpg

(two underscores)

Here's what i did:

I've got all my posters in 2 files; one is wickermanxxxx.jpg and another is wickerman_xxxx.jpg - so as to make amc and the html export happy!

When exporting to other lists (directors, genres, etc.) I only have to change links on one html, not 2000! :)

Still, if the next release could contemplate the aforementioned change, it would be lovely!

Thanks for the swift answers, you're a star! :grinking: [/quote]
antp
Site Admin
Posts: 9714
Joined: 2002-05-30 10:13:07
Location: Brussels
Contact:

Post by antp »

wicker_man wrote: Uhm... how can I do that?
In tools -> preferences -> export
wicker_man wrote: Perhaps, but perhaps the html export will then expect something like:

wickerman__1152.jpg
No, as actually it just builds pics names for export in this way:
base + '_' + number + ext

base can be either exported html file (but it is not always the same, as you said) or the catalog name (wickerman.amc or wickerman.xml I guess)

Currently there is absolutely no link between the name of the picture used in the catalog and the name used for pictures in the html export.
Hence the only way to solve the problem: have your catalog pictures named with a "_" like what the html export does.
wicker_man
Posts: 15
Joined: 2008-02-29 09:10:59

Post by wicker_man »

Great, thanks! ;)
bad4u
Posts: 1148
Joined: 2006-12-11 22:54:46

Post by bad4u »

I guess he still just missed the option "Images - Copy with exported file" on the left side of the html export window... ?
wicker_man
Posts: 15
Joined: 2008-02-29 09:10:59

Post by wicker_man »

I didn't want to do that because it would duplicate my jpgs.
bad4u
Posts: 1148
Joined: 2006-12-11 22:54:46

Post by bad4u »

Aaah.. sorry. I missed that point probably :)
wicker_man
Posts: 15
Joined: 2008-02-29 09:10:59

Post by wicker_man »

No problem.

With all that I have learned on this thread i was able to finish up my template!

Check it out here, if you want > viewtopic.php?t=4126&highlight=
Post Reply