My use for this is making a tool for generating/extracting metadata reports 
(e.g. a bibliography based on a advanced search query) into a useable data 
format (.csv) for the staff at my library.  DSpace lacks functions that allow 
saving lists and exporting citations so this is kind of a work around.  Also, 
you can extract metadata by collection for batch editing and mapping, but not 
by query.  What if you want to map an author's publications to a new collection 
for that author but the author's publications are spread across many different 
collections?  I should be able to generate the metadata spreadsheet for batch 
editing not just based on collection, but based on any query that I can think 
of doing based on the metadata and full text.  I already have a good start to 
doing this with screen scraping, but I'm just lacking the item IDs -- hence the 
login with RCurl.  This tool is for library staff (and anyone else who is 
willing), not for the administrator of the website who can do SQL queries if 
they wanted.  People who need to access the data, not just the documents.  This 
is what I have so far (also contains some scripts for making SIPs from a 
spreadsheet):  
https://wiki.nps.edu/display/CIR/CalhounTools+--+An+R+Package+for+Common+Repository+Tasks



-----Original Message-----
From: Pottinger, Hardy J. [mailto:pottinge...@umsystem.edu] 
Sent: Thursday, August 02, 2012 7:27 AM
To: Bram Luyten; Brown, Simon Contractor, Digital Consulting Services
Cc: dspace-tech@lists.sourceforge.net
Subject: Re: [Dspace-tech] Log into DSpace with curl

Hi, Simon, I know that I would be interested in hearing more about what it is 
you're up to. :-) What's your use case for the item ID once you scrape it? Is 
this something that the REST-API module might be able to do for you?
--
HARDY POTTINGER <pottinge...@umsystem.edu> University of Missouri Library 
Systems http://lso.umsystem.edu/~pottingerhj/
https://MOspace.umsystem.edu/
"And remember, also" added the Princesss of Sweet Rhyme, "that many places you 
would like to see are just off the Map and many things you want to know are 
just out of sight or a little beyond your reach. But someday you'll reach them 
after all, for what you learn today, for no reason at all, will help you 
discover all the wonderful secrets of tomorrow."

--Norton Juster, The Phantom Tollbooth






On 8/2/12 3:37 AM, "Bram Luyten" <b...@mire.be> wrote:

>
>
>
>Hi Simon,
>
>this is new to me as well, I got it to work using:
>
>curl --data "login_email=myname%40gmail.com 
><http://40gmail.com>&login_password=password&submit=Sign+in"
>http://www.mydspace.com/password-login
>
>I had some issues first using the --data-urlencode parameter instead of 
>--data. This also encoded the ampersands which shouldn't have happened 
>to make it work.
>
>If you debug your query, following bit in the return html is interesting:
>
><input id="aspect_eperson_PasswordLogin_field_login_email"
>class="ds-text-field error" name="login_email" type="text"
>value="contents of your query" title="The email address and/or password 
>supplied were not valid." /> <span class="error">* The email address 
>and/or password supplied were not valid.</span>
>
>because I saw that all my parameters ended up in that field, I realized 
>there was something wrong with the ampersand encoding.
>
>On a sidenote, if you play around with forms, encoding and parameters, 
>Tamper Data is a nice little firefox add-on that allows you to see and 
>tamper with the requests you make & responses you get.
>
>https://addons.mozilla.org/en-us/firefox/addon/tamper-data/
>
>cheers,
>
>Bram
>
>--
> 
>Bram Luyten@mire
>2888 Loker Avenue East, Suite 305, Carlsbad, CA. 92010 Esperantolaan 4, 
>Heverlee 3001, Belgium
>  <http://www.atmire.com/>www.atmire.com
><http://atmire.com/website/?q=services&utm_source=emailfooter&utm_mediu
>m=e
>mail&utm_campaign=braml>
>
>
>On Wed, Aug 1, 2012 at 6:04 PM, Brown, Simon Contractor, Digital 
>Consulting Services <scbr...@nps.edu> wrote:
>
>We are using DSpace 1.8.2 with the JSPUI admin interface.   I would like
>to log into DSpace using curl (or more precisely RCurl) because I want 
>to be able to scrape item IDs (not the handles, but the actual IDs).  
>My code looks something  like this:
> 
>postForm(³dspace/Š./password-login², login_email=²user²,
>login_password=²password²)
> 
>It basically always returns ³The e-mail address and password you 
>supplied were not valid²
> 
>Is it not possible to log in using curl?  If it is possible I¹ll figure 
>it out eventually, but if it¹s not I would rather not spend the time on 
>it.
> 
>Simon Brown
>Digital Consulting Services
>Supporting the Dudley Knox Library, Naval postgraduate School 
>scbr...@nps.edu
>831.656.3574 Phone
>831.656.3238 Fax
> 
>
>
>
>-----------------------------------------------------------------------
>---
>----
>Live Security Virtual Conference
>Exclusive live event will cover all the ways today's security and 
>threat landscape has changed and how IT managers can respond. 
>Discussions will include endpoint security, mobile security and the 
>latest in malware threats.
>http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
><http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/>
>_______________________________________________
>DSpace-tech mailing list
>DSpace-tech@lists.sourceforge.net
>https://lists.sourceforge.net/lists/listinfo/dspace-tech
>
>
>
>
>


------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
DSpace-tech mailing list
DSpace-tech@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dspace-tech

Reply via email to