Re: [EP-underground] - Multiple files in eprints
ePrints Support <[email protected]> Sun, 20 Oct 2002 17:15:47 +0100
| Newsgroups | gmane.comp.web.eprints.general |
|---|---|
| Message-ID | <[email protected]> |
Example situation.
I have a set of images which comprise my "EPrint" I want to store
multiple ways of viewing them. The source images are very large.
3 Documents
A. PDF
A single PDF file which has the images and captions, one per page.
/images.pdf
B. HTML
An HTML document which contains all the images, in a scaled down form,
for easy viewing.
/index.html
/image01.jpg
/image02.jpg
/image03.jpg
/image04.jpg
C. Origional Raw Files
The origional files (for preservation or generating new versions later)
plus a .txt file with commenary of what each image is
/contents.txt
/image01.tiff
/image02.tiff
/image03.tiff
/image04.tiff
/image05.tiff
The normal eprints renderer will handle documents A & B as they only need
a simple link to a single file (the "start" file in the upload system)
eg.
Formats available:
PDF (may require adobe acrobat)
HTML
Now "C" is much more complex. You can specify a "main" file, but that's
meaningless as this format is not intended for online browsing. What you
would need to do is either not display it online at all
foreach( @documents )
{
if( $_->get_value( "format" ) eq "raw" ) { next; }
but that's not great. How about we do something more clever!
foreach( @documents )
{
if( $_->get_value( "format" ) eq "raw" )
{
my $b = $session->make_element( "b" );
$b->appendChild( $session->make_text( "Raw Files" ) );
$p->appendChild( $b );
$p->appendChild( $session->make_element( "br" ) );
my %files = $_->files;
foreach my $filename ( sort keys %files )
{
my $url = $archive->get_conf( "documents_url" ) . "/" .
sprintf( "%08d", $_->get_value( "eprintid" )) . "/" .
EPrints::Document::docid_to_path( $session->get_archive, $_->get_value( "docid" ) ) . "/" .
$file;
my $link = $session->render_link( $url );
$link->appendChild( $session->make_text( $filename ) );
$p->appendChild( $link );
$p->appendChild( $session->make_text( " (".$files{$filename}.")" ) );
$p->appendChild( $session->make_element( "br" ) );
}
}
note that this example is not properly internationalised and
assumes raw documents are always publically available (it ignores
their "security" tag.)
I know this is hardly "intuative" but the problem is I can only
anticipate what people will use GNU EPrints for. The more questions
and problems I hear, then the more I understand the requirements!
On Sat, Oct 19, 2002 at 04:37:21 -0400, Baoping Zhang wrote:
> I happened to work on this today. I checked the file
> ArchiveRenderConfig.pm, and to my understanding, the following part
> is supposed to show the links to multile files associated with this
> eprint
> ====================================================
> # Available documents
> my @documents = $eprint->get_all_documents();
>
> $p = $session->make_element( "p" );
> $p->appendChild( $session->html_phrase( "page:fulltext" ) );
> foreach( @documents )
> {
> if( $_->get_value( "format" ) eq "coverimage" )
> {
> $imagetd->appendChild( $session->make_element(
> "img",
> align=>"left",
> src=>$_->get_url(),
> alt=>$_->get_value( "formatdesc" ) ) );
> next;
> }
> $p->appendChild( $session->make_element( "br" ) );
> $p->appendChild( $_->render_citation_link() );
> }
> $docstd->appendChild( $p );
> ========================================================
> But it only shows one link. The array @documents only contains one element
> though. I logged into the database, and selected docid from the document
> table with the eprintid which has multiple files, but only got one docid.
> Should there be multiple docids? Did I do something wrong?
>
> Thanks!
>
> Baoping
>
> On Tue, 15 Oct 2002, ePrints Support wrote:
>
> > Oh. There are several solutions.
> >
> > The easiest is to make 4 documents, all type PDF with descriptions
> > "part 1", "part 2" etc.
> >
> > A better solution would be to edit the renderer in ArchiveRenderConfig
> > to do something clever. The generation of the "abstract" page is
> > totally configurable but has a bit of a learning curve.
> >
> > On Tue, Oct 15, 2002 at 10:15:15 +0000, Belinda Weaver wrote:
> > > Dear all
> > > I sent this before but got no answer so am sending again in case
> > > anyone has words of wisdom. Maybe it is not possible to do what I
> > > want to do in which case I'll try a work-around the problem.
> > >
> > > I have been given a very large work for the archive here and had
> > > to break it up into four PDF files so as not to crash computers that
> > > tried to open it. However, despite uploading all four files, only one
> > > file appears as a clickable link from the record, so it looks as if
> > > there is only one file of 100 pages instead of four files totalling 600
> > > plus altogether. Am I doing something wrong? Do I have to upload it
> > > as four separate records, or is there a way to force the option of
> > > displaying the four spearate PDFs? I marked the first PDF as
> > > Shown First and assumed the others would follow in a list, but this
> > > did not happen.
> > > Any advice appreciated.
> > > regards
> > > Belinda
> > > Belinda Weaver,
> > > Co-ordinator, UQ E-Print Archive
> > > University of Queensland Library
> > > University of Queensland, Brisbane, Australia 4072.
> > > Tel : +617 336 58281 Fax : +617 336 57930
> > > Email : [email protected]
> >
> > --
> >
> > Christopher Gutteridge [email protected]
> > ePrints2 Coder, Support and Stuff +44 23 8059 4833
> >
> >
--
Christopher Gutteridge [email protected]
ePrints2 Coder, Support and Stuff +44 23 8059 4833