PDA

View Full Version : Export Covers with real names



vovo
11-24-2005, 10:49 AM
I need to export my covers (to my new mp3 player),
but covers are named 1f6f016e.jpg etc... and
i need ta have Artist+album.jpg!
Is it Possible
Thanks

vovo
11-25-2005, 05:48 AM
Thats ok, i did it with a dax template.


::start/web

<!---->
<!---->
<!---->RENAME "<!--[cover/]-->.jpg" "<!--[artist/]--> - <!--[title/]-->.jpg"<!---->
<!---->
<!---->



Just have to replace "<img class=cover width=170 height=170 src="covers/" by "" and ".jpeg">" by "".
Rename the file to .bat, put it in the copy covers directory
and run it.

I haven't find a tag who give only the jpeg file name !

And after copying jpg on albums paths

::start/web

<!---->
<!---->
<!---->COPY "<!--[artist/]--> - <!--[title/]-->.jpg" "<!--[path/]-->\<!--[artist/]--> - <!--[title/]-->.jpg"<!---->
<!---->
<!---->

Guest
11-28-2005, 12:49 AM
VoVo,

I also want to do the same thing rename the cover file. Could you explain step by step what you did.

Thanks for your time.

teemac

vovo
11-28-2005, 09:12 AM
0- In imaging options,
set : store covers in external files if covers exceeds 1ko.
1- make a copy of your MP3_covers directory.
2- with notepad, create a new document, with :


::start/web
<!---->
<!---->
<!---->RENAME "<!--[cover/]-->.jpg" "<!--[artist/]--> - <!--[title/]-->.jpg"<!---->
<!---->
<!---->

3- save it in the orangeCD templates directory
with a name like realnames.dax
4- execute the template TOOLS / EXPORT TO HTML
select the template and run it where is located your saving
MP3_covers directory.
5- you've got now a new file, edit it :
Just have to replace "<img class=cover width=170 height=170 src="covers/" by "" and ".jpeg">" by "".
Rename the file to .bat, and run it (double click on it on windows explorer).
That's all
If you need more help... ;)

Guest
12-08-2005, 06:48 PM
Thanks for the help - I'll give it a try.

If I still can't get it to work I will get back to you here.

Thanks again.

teemac (Australia)

Guest
12-08-2005, 07:56 PM
vovo,

Still cannot get it to work. I cannot complete your step number 4.

I copied the text you show in the grey box and pasted into notepad and saved in the templates directory as : realnames.dax

(Do I include the first blank line and the space before the second line??)

I opened OrangeCD and went to TOOLS - EXPORT TO HTML. The new template does not show up in the templates to choose from. (I only have - Advanced Web Site, Basic Web Site, List With Details, List With Details On A Separate Page, Simple List, Simple Table, Thumbnail Table).

Where do I go from here??

Thank you for your help and your patience for this old dummy.

teemac (Australia)

pheisholt
12-14-2005, 05:02 PM
For starters I wouldn't use Notepad. Use the OCD template editing tool DaxEdit. It's located in your Orange CD program folder.

Then follow these instructions (slightly modified compared to vovo's)

1. Open DaxEdit (daxedit.exe), and click the Start Page tab.

2. Paste vovo's code snippet into the Start Page window

[Quote]
::start/web
<!---->
<!---->
<!---->RENAME "<!--[cover/]-->" "<!--[artist/]--> - <!--[title/]-->.jpg"<!---->
<!---->
<!---->

Guest
12-15-2005, 03:25 AM
Thanks to both vovo &amp; phiesholt.

I managed to struggle through both sets of instructions and now have all my files renamed in the web page cover directory. It took several hours of find and replace, as nearly every file was a different size in the lines of code.

What I ended up with was a directory full of renamed files all at 170x170 res.

Is there a way to rename the original files (with wierd names) in the main OrangeCD\databases\covers folder. These were my master gfx and are the ones I really need to rename as they are all various large sizes.

I have around 3500 cd's listed (about 45,000 tracks), so there are a lot of files to go through individually to rename.

I hate to be a nuisance - but many thanks in advance for any of your time and help.

(I had a major hard drive crash and lost all my original gfx before burning to DVD - that's why I need the help.)

teemac (registered happy OrangeCD user since Feb 2004)
(Australia)

pheisholt
12-15-2005, 05:49 AM
Sorry, I should have mentioned this earlier. If you open the index.html file in Word, you can use regular expressions for the search and replace operation.

The search term would then be:
'<img class=cover width=^#^#^# height=^#^#^# src="covers/'

^# represents any digit

Note: Make sure to save the result as a text file (*.txt) or copy the result from Word into Notepad, and then save it.

When it comes to the image file size, I'm not sure. But I had a closer look at the images that are exported from OCD during this operation, and it seems that some of them are resized. If you look closely you'll notice that some of the file names end with '_1'. Well, they seem to be the ones that are resized.

Before you run the index.cmd file, you should therefore probably fetch a copy of the original image covers folder (i.e. OrangeCD\databases\covers folder). Place it in the same folder as your script file (index.cmd), rename it to 'covers', and then run the script.

Oops, before you run the script, you will also have to do another search and replace:

Search for:
'_1'

Replace with:
''

Guest
12-16-2005, 10:53 PM
A great big thanks to both pheisholt &amp; vovo for all your help.

I have finally got all my original full sized grafix back - wonderful - and now burnt onto DVD!

I thought I would condense all the posts &amp; changes about this problem to me from both of these helpful people.

Someone else might use it. The following worked for me and could probably have some steps condensed!!!


A. Copy all original gfx (OrangeCD\databases\covers\*.jpg) to f:\dummy\rename covers\covers original\*.*

B. Renamed all extensions to .jpeg with "Bulk Rename Utility"
(Freeware by Jim Willsher - very powerful, quick and useful - I have been using it for years - great stuff)
(I had to rename all extensions because RenameImages.dax web page output changed extension to .jpeg).

1. Open DaxEdit (daxedit.exe in OrangeCD main program directory), and click the Start Page tab.

2. Paste vovo's code snippet (Shown below) into the Start Page window - I removed first blank line and 1 space before "::start/web"

Quote:

::start/web
<!---->
<!---->
<!---->RENAME "<!--[cover/]-->" "<!--[artist/]--> -
<!--[title/]-->.jpg"<!---->
<!---->
<!---->


(Note: This is a slightly modified version of vovo's code. I've omitted the .jpeg extension after [covers/]-->)


3. Save the template in your OCD template folder (default is C:\Program

files\OrangeCD\Templates). You could call it RenameImages.dax, for instance.

Note! The file must have a .dax extension

4. Select Tools &#124; Export To HTML.....
Your new template (RenameImages.dax) should appear in the list of available web page templates

5. Fill in an Output folder location, I used f:\dummy\rename covers, click Next and then Finish

6. Locate the output folder. There you should find a file called index.html, and and 2 subfolders named 'Covers', which contains all your web page cover images (with those weird file names), and 'covers original' the copy of your original database FULL SIZED covers.

7. Open the index.html file in Word, you can use regular expressions for the search and replace operation.

Note: Make sure to save the final result as a text file (*.txt) or copy the result from Word into Notepad, and then save it.

- The ^# is a special function for "any digit" found at the bottom of the replace menu

Run the following search and replace operations

Search for:
'">'
Replace All with:
'' (= nothing)

1st Search for:
'<img class=cover width=^#^#^# height=^#^#^# src="covers/'

Replace with:
'' (= nothing)

2nd Search for:
'<img class=cover width=^#^# height=^#^#^# src="covers/'

Replace with:
'' (= nothing)

3rd Search for:
'<img class=cover width=^#^#^# height=^#^# src="covers/'

Replace with:
'' (= nothing)

(Several small files had only two digits in width or height so 3 search and replaces were required)

4th Search for:
'&amp;amp:' - Some files had the ampersand symbol coverted to this.

Replace with:
'&amp;' (Ampersand symbol = shift 7)

5th Search for:
'/' - Some files had the illegal slash symbol in artist names eg:AC/DC

Replace with:
'-' (This would make AC/DC into AC-DC in the gfx file name)


8. Remove the first line which should read '::start/web'

9. Add '@echo off' on a separate line at the very top of the file

10. Add 'pause>null' on a separate line at the very bottom of the file

11. Name &amp; Save as a text file to f:\dummy\rename covers\covers\, and change the extension to .bat

12. Copy all original (renamed extensions) cover files from f:\dummy\rename covers\covers original\ and pasted over the web page output generated f:\dummy\rename covers\covers\

13. Then doubleclick the .bat file created by Word in the covers directory.

The script should now rename all the cover images in this covers sub-folder.

You may see the following message:

"The system cannot find the file specified"

Not to worry. It is most likely due to the fact that the same image cover occurs several times in you collection (a box set with 2 or more CDs, for instance). This only happened to 46 files out of nearly 3000 gfx - pretty good!

Thanks again for all your help and perseverance.

teemac (Australia)

pheisholt
12-17-2005, 02:16 PM
Hi teemac

That is really commendable. Others should do the same. It's great to have for future reference and for newcomers, of course.

I'm glad it finally worked.

pheisholt
12-17-2005, 02:28 PM
There is one thing I forgot to mention. You may already be aware of this. But just in case:

OCD only stores images in the <database name>_covers folder if you have told OCD do to do. Take a look at View &#124; Preferences and then select the Imaging tab.

If you tick 'Store covers in external files if size exceeds', your <database name>_covers