Forgot password? | Forgot username? | Register

Downloading multimedia in batches.

Downloading multimedia in batches.

Hi,

has anyone worked out how to download multiple files from the multimedia module in a batch? Perhaps as a report or an export?

For example select 10 image emultimedia records and download the medium resolution jpegs all at once.

Thanks


Sharon

Edited by: Sharon Grant - 16-Jul-14 01:52:30

Sharon Grant
Technology Liaison to Science
useravatar
Offline
23 Posts
Website 
Administrator has disabled public posting. Please login or register in order to proceed.

Re: Downloading multimedia in batches.

Hello Sharon, thanks for posting this. Users request this all the time - they don't want fancy reports, they just want the image files.

I'm looking forward to responses from others who might have solved this or even better, perhaps KE can build in this functionality so that users can self-serve?

Nancy

Administrator has disabled public posting. Please login or register in order to proceed.

Re: Downloading multimedia in batches.

Hello Sharon

We have a MM export scrip a few of our customers here in the UK use to export images of the MM module.

The MM export report generates a zip fie containing the images selected from EMu and a CSV file with information about each image.

The script might require some customization to suit your requirements, but I'm sure your local EMu support office would be glad to assist with this matter.


Cheers,
Mo Jumah

Administrator has disabled public posting. Please login or register in order to proceed.

Re: Downloading multimedia in batches.

Thanks. I'll see if the guys can get hold of it.

Sharon

Sharon Grant
Technology Liaison to Science
useravatar
Offline
23 Posts
Website 
Administrator has disabled public posting. Please login or register in order to proceed.

Re: Downloading multimedia in batches.

Is it a crystal report? Perhaps we could get the .rpt from you?


Sharon

Sharon Grant
Technology Liaison to Science
useravatar
Offline
23 Posts
Website 
Administrator has disabled public posting. Please login or register in order to proceed.

Re: Downloading multimedia in batches.

It is not a Crystal Report Sharon. The end result can be generated from the MM module's Tools > Reports.

We are in contact now with the Toronto office with more details about this.

Mo

Administrator has disabled public posting. Please login or register in order to proceed.

Re: Downloading multimedia in batches.

Hi Sharon,

You probably already know this but just in case, my kludgy solution to batch extracting images from the Multimedia module is to create a report of type "Export CSV Format" (or "Export ODBC Data Source") and to include the "Multimedia" field on that report. For example the report I usually run includes the following fields:

emultimedia_key
irn
MulDescription
MulIdentifier
MulMimeFormat
MulMimeType
Multimedia
MulTitle

This results in a CSV file wherein the column "Multimedia" includes the full path to each downloaded image, for example:

C:\Users\Tom\AppData\Local\KESoftware\Cache\5072\151\BCW158.JPG
C:\Users\Tom\AppData\Local\KESoftware\Cache\5072\152\BCW162.JPG
C:\Users\Tom\AppData\Local\KESoftware\Cache\5072\153\BCW162_2.JPG
C:\Users\Tom\AppData\Local\KESoftware\Cache\5072\154\BCW166.JPG
C:\Users\Tom\AppData\Local\KESoftware\Cache\5072\155\BCW166_2.JPG
C:\Users\Tom\AppData\Local\KESoftware\Cache\5072\156\BCW168.JPG
C:\Users\Tom\AppData\Local\KESoftware\Cache\5072\157\BCW168_2.JPG

You'll notice all the images files are stored in subfolders under a cache folder named (in this case) "5072". I can then extract all the images at once from the parent folder by either searching the parent folder for all *.jpg files, or by using the column above to create a quick batch file that moves the images elsewhere.

The only problem with this approach (besides it's being kludgy) is that it exports only the full resolution image and ignores the smaller resolution versions. In the "Report Properties" dialog box there are a couple of fields for "Resolution", namely "Height" and "Width". According to the Help file these two fields:

"Specify the desired resolution of images to display in the report. Each image in EMu can have multiple resolutions. When a resolution is specified here, the version of an image closest in size (equal to or greater than the resolution specified) will be displayed. If no resolution is specified, the master image is displayed (the first image listed in the Resolutions table on the Resolutions tab of the Multimedia module)."

I have not played around with these fields; generally if I need smaller versions I just-batch resize the full-size images using some other tool.

Of course a dedicated script would be handier so I'll be interested to see what you find. I should add that we're running an older version of EMu (4.0.03) so there may now be easier ways to do it built into EMu that I am unaware of.

Best,
Tom Trombone
AMNH Ornithology

Thomas Trombone
Data Manager, Ornithology
useravatar
Offline
54 Posts
Male  Website 
Administrator has disabled public posting. Please login or register in order to proceed.

Re: Downloading multimedia in batches.

Hi, Sharon.  KE wrote an Admin Task for us that copies a group of multimedia files to a location on our network. It's under the Multimedia category. Here's how to use it.

1. Search for the multimedia records in question.
2. Create a Static group containing the records.
3. Go to the Admin module and run the Bulk Multimedia Move task.
4. Enter your group name at the prompt. If it's more than one word, you'll need to put quotes around it.
5. It will move any multimedia files that it sees into the network directory/folder specified in the script.

The Admin Task is not able to filter out the thumbnail and smaller resolutions of the images, so those will show up as well.   

The Registry entry for the Admin Task is:

Group | Admin | Table | emultimedia | Admin Task | Bulk Multimedia Move | Value = MoveMultimedia.pl [text:Enter group name]

And the MoveMultimedia.pl script is:

#!/usr/bin/perl -w

use strict;
use ke::texapi;

my $groupname = shift;
my $query = ke::texapi->new();
my $querystring = "Select Module,GroupType, Keys_tab, Query from egroups where GroupName contains '$groupname' and Module = 'emultimedia'";
my $row;
my ($dir, $subdir);
my @irnarray;

print "$querystring\n";
$row = $query->Cursor($querystring);
eval
{
    $row->RowNext();
    @irnarray = @{$row->ColFetch("Keys_tab")};
};

if ($@ && $@ !~ /^Server error: End of file\./)
{
        print "******Error  **** $@\n";
}
`rm -f /[filepath multimedia files will be copied to]/*`;
foreach (@irnarray)
{
    if (length($_) > 3)
    {
        $dir = substr($_,0,-3);
        $subdir = substr($_,-3,3);
    }
    else
    {
        $dir = 0;
        $subdir = $_;
    }
    $subdir = sprintf("%03d", $subdir);
    if (-d "/home/emu/mhs/multimedia/$dir/$subdir/")
    {
        print "/home/emu/mhs/multimedia/$dir/$subdir/$_\n";
        `cp /home/emu/mhs/multimedia/$dir/$subdir/* /[filepath multimedia files will be copied to]`;
    }
    else
    {
        print "/[filepath multimedia files will be copied from]/$dir/$subdir/$_\n";
        `cp /[filepath multimedia files will be copied from]/$dir/$subdir/* /[filepath multimedia files will be copied to]`;
    }
}


I've added "[filepath multimedia files will be copied from/to]" in place of our actual filepaths, but I think you'll get the idea.  Hope this helps someone looking to do the same thing.

-- Karen

Administrator has disabled public posting. Please login or register in order to proceed.

Re: Downloading multimedia in batches.

Hi Tom

Thanks for this - it gives me some insight as to how to generate csv exports. The only thing is that I don't have the 'Multimedia' field which I assume would be important to know what the file location is unless storage of MM files is in a configured location on the server.

I guess this kind of export can be scheduled using the 'Schedules' module? The intention is to use this export to periodically update an external DAMS system.

Cheers
Oliver

Administrator has disabled public posting. Please login or register in order to proceed.

Re: Downloading multimedia in batches.

Hi Oliver,

I use the iMu PHP interface to do what you are describing, I find it much friendlier and powerful compared to mucking around with texql (yuk) in perl scripts.

see http://emu.kesoftware.com/support/downl … 900-1-0-03

Simon

Administrator has disabled public posting. Please login or register in order to proceed.

Re: Downloading multimedia in batches.

Thanks Simon

It looks great but our server dosen't seem to have the IMu server configured/running. We are on Linux. I noticed that there is a sample config file for IMu server - I wonder if I should enable the config and then restart?

There dosen't seem to be any doco on how to set it up (or at least I can't see or find it). do you have any ideas?

Administrator has disabled public posting. Please login or register in order to proceed.

Re: Downloading multimedia in batches.

Thanks Simon

It looks great but our server dosen't seem to have the IMu server configured/running. We are on Linux. I noticed that there is a sample config file for IMu server - I wonder if I should enable the config and then restart?

There dosen't seem to be any doco on how to set it up (or at least I can't see or find it). do you have any ideas?

Administrator has disabled public posting. Please login or register in order to proceed.

Re: Downloading multimedia in batches.

Oliver , I believe iMu comes with all Emu installs. You could enable the conf file and restart the load processes ('emuload restart')  and see if you have an imu load running ('emuload status' command) otherwise contact KE and they'll sort you out with getting it running.

Simon

Administrator has disabled public posting. Please login or register in order to proceed.

Re: Downloading multimedia in batches.

Hi All,

I have some reports from the catalogue to export images to the local cache. To make it simple I've have 3 separate reports: one exports all the full res images on the catalogue record/s; another exports just the first image at full res; and the other one exports thumbnails. They're in export csv format and its just the multimedia and image reference fields in the report. Before you run the report clear the multimedia cache in the options menu, then run the report, save the csv somewhere and go to your cache (something like this - C:\Users\EGwynn\AppData\Local\KESoftware\Cache) and there are all your image files. They will all be in separate folders so you need to search the whole cache for '.jpg' or whatevs to get them all in a list and then you can copy them to another folder. 

A very late response, but it might still be useful to someone :)

Administrator has disabled public posting. Please login or register in order to proceed.
There are 0 guests and 0 other users also viewing this topic

Board Info

Board Stats
 
Total Topics:
599
Total Polls:
0
Total Posts:
1362
Posts this week:
1
User Info
 
Total Users:
812
Newest User:
Vilasack
Members Online:
4
Guests Online:
330