EPrints Technical Mailing List Archive
Message: #00784
< Previous (by date) | Next (by date) > | < Previous (in thread) | Next (in thread) > | Messages - Most Recent First | Threads - Most Recent First
[EP-tech] Re: Importing files from another system
- To: "'eprints-tech@ecs.soton.ac.uk'" <eprints-tech@ecs.soton.ac.uk>
- Subject: [EP-tech] Re: Importing files from another system
- From: John Salter <J.Salter@leeds.ac.uk>
- Date: Thu, 21 Jun 2012 18:07:13 +0100
Hi Seb, Thanks for this - but how much of the data structure should I include when trying to make a new eprint? E.g. I don't have an eprintid, docid, fileid, so can't include them. I /could/ supply a mime_type, but should eprints be able to work this out from the file? Should the filename be calculated from the <url>, or do I have to specify this? (I see some fun with XSLT coming my way :o) >From a bit more testing, I think this is the minimal set of data to get a file into the system, from the local file system (although you'd want to map more data in there if you had it!): <?xml version='1.0' encoding='utf-8'?> <eprints xmlns='http://eprints.org/ep2/data/2.0'> <eprint> <documents> <document> <files> <file> <datasetid>document</datasetid> <filename>thumb.jpg</filename> <url>file:///tmp/files/thumb.jpg</url> </file> </files> <format>image</format> <security>public</security> <main>thumb.jpg</main> </document> </documents> <eprint_status>archive</eprint_status> <userid>1</userid> <type>image</type> <creators> <item> <name> <family>test</family> <given>test</given> </name> <id>test@test.com</id> </item> </creators> <title>test</title> </eprint> </eprints> Hope that helps someone in the future - and thanks for your help today! John -----Original Message----- From: eprints-tech-bounces@ecs.soton.ac.uk [mailto:eprints-tech-bounces@ecs.soton.ac.uk] On Behalf Of Sebastien Francois Sent: 21 June 2012 15:08 To: eprints-tech@ecs.soton.ac.uk Subject: [EP-tech] Re: Importing files from another system Hi John, See an example attached - tested on 3.3.9, imported this way: bin/import <REPO_ID> --enable-file-imports --enable-web-imports --user 1 --verbose eprint XML ./export2.xml Seb. PS: in the attached XML, I replaced the URL of my dev machine with __REPO_URL__, change this to your repository URL. On 21/06/12 14:55, John Salter wrote: > Yep - that didn't work either :o\ > > According to this: > http://wiki.eprints.org/w/Import_From_URL > I was also missing a<files> around the<file>. > I've added that and re-tried all the options, so far none work :o\ > > Any other suggestions? > > Cheers, > John > > -----Original Message----- > From: eprints-tech-bounces@ecs.soton.ac.uk [mailto:eprints-tech-bounces@ecs.soton.ac.uk] On Behalf Of Jose Martin > Sent: 21 June 2012 14:40 > To: eprints-tech@ecs.soton.ac.uk > Subject: [EP-tech] Re: Importing files from another system > > Have you tried for local files > > <url>file:///path_to_file</url> > > ? > > -----Original Message----- > From: eprints-tech-bounces@ecs.soton.ac.uk [mailto:eprints-tech-bounces@ecs.soton.ac.uk] On Behalf Of John Salter > Sent: 21 June 2012 14:24 > To: 'eprints-tech@ecs.soton.ac.uk' > Subject: [EP-tech] Re: Importing files from another system > > Nothing silly in the verbose output. > > I can wget the file over http (when trying the http method), but even using the file from the local filesystem doesn't work :o\ > > > -----Original Message----- > From: eprints-tech-bounces@ecs.soton.ac.uk [mailto:eprints-tech-bounces@ecs.soton.ac.uk] On Behalf Of Yuri > Sent: 21 June 2012 13:48 > To: eprints-tech@ecs.soton.ac.uk > Subject: [EP-tech] Re: Importing files from another system > > run the command with --verbose --verbose and try to see what happen. Can you go to port 80 from the server to another server? Check your firewall settings. > > Il 21/06/2012 14:22, John Salter ha scritto: >> Hi, >> I'm trying to import files from another system, into EPrints. >> I can either copy the files onto the server, or make them available over http. >> >> In the XML, I've tried specifying (in an<eprints><eprint> node) >> <document> >> <file href="/path/to/my.pdf" /> >> </document> >> - or - >> <document> >> <file> >> <url>http://url.of/my.pdf</url> >> </file> >> </document> >> >> And importing with: >>> bin/import ARCHIVENAME --enable-file-imports --enable-web-imports >>> --user 1 archive XML test.xml >> Both import the metadata from the XML OK, but neither option attaches the file to the eprint. >> >> What am I doing wrong - or will this even work? >> >> Cheers, >> John >> *** Options: >> http://mailman.ecs.soton.ac.uk/mailman/listinfo/eprints-tech >> *** Archive: http://www.eprints.org/tech.php/ >> *** EPrints community wiki: http://wiki.eprints.org/ > *** Options: http://mailman.ecs.soton.ac.uk/mailman/listinfo/eprints-tech > *** Archive: http://www.eprints.org/tech.php/ > *** EPrints community wiki: http://wiki.eprints.org/ > > *** Options: http://mailman.ecs.soton.ac.uk/mailman/listinfo/eprints-tech > *** Archive: http://www.eprints.org/tech.php/ > *** EPrints community wiki: http://wiki.eprints.org/ > > *** Options: http://mailman.ecs.soton.ac.uk/mailman/listinfo/eprints-tech > *** Archive: http://www.eprints.org/tech.php/ > *** EPrints community wiki: http://wiki.eprints.org/ > > *** Options: http://mailman.ecs.soton.ac.uk/mailman/listinfo/eprints-tech > *** Archive: http://www.eprints.org/tech.php/ > *** EPrints community wiki: http://wiki.eprints.org/
- Follow-Ups:
- [EP-tech] Re: Importing files from another system
- From: sf2 <sf2@ecs.soton.ac.uk>
- [EP-tech] Re: Importing files from another system
- References:
- [EP-tech] Importing files from another system
- From: John Salter <J.Salter@leeds.ac.uk>
- [EP-tech] Re: Importing files from another system
- From: Yuri <yurj@alfa.it>
- [EP-tech] Re: Importing files from another system
- From: John Salter <J.Salter@leeds.ac.uk>
- [EP-tech] Re: Importing files from another system
- From: Jose Martin <J.Martin@ulcc.ac.uk>
- [EP-tech] Re: Importing files from another system
- From: John Salter <J.Salter@leeds.ac.uk>
- [EP-tech] Re: Importing files from another system
- From: Sebastien Francois <sf2@ecs.soton.ac.uk>
- [EP-tech] Importing files from another system
- Prev by Date: [EP-tech] Re: Importing files from another system
- Next by Date: [EP-tech] Messages do not work in UploadMethod - action_add_format (Error)
- Previous by thread: [EP-tech] Re: Importing files from another system
- Next by thread: [EP-tech] Re: Importing files from another system
- Index(es):