EPrints Technical Mailing List Archive
See the EPrints wiki for instructions on how to join this mailing list and related information.
Message: #05118
< Previous (by date) | Next (by date) > | < Previous (in thread) | Next (in thread) > | Messages - Most Recent First | Threads - Most Recent First
[EP-tech] Re: EPrints and RSS feeds
- To: "'eprints-tech@ecs.soton.ac.uk'" <eprints-tech@ecs.soton.ac.uk>
- Subject: [EP-tech] Re: EPrints and RSS feeds
- From: Andrew Hercules <Andrew.Hercules@ulcc.ac.uk>
- Date: Mon, 16 Nov 2015 12:09:27 +0000
Thanks John. I think we'll look at building a Plugin with a new citation style that matches the third party's feed requirements.
Cheers,
Andrew
--
Andrew Hercules
Developer
Digital Archives & Research Technologies
University of London Computer Centre
Senate House, Malet Street, London WC1E 7HU
T: +44 (0)20 7863 1342
E: andrew.hercules@ulcc.ac.uk
W: http://www.ulcc.ac.uk/
The University of London is an exempt charity in England and Wales. We are committed to achieving a 20% cut in emissions from University buildings by 2015. Please think before
you print.
From: eprints-tech-bounces@ecs.soton.ac.uk <eprints-tech-bounces@ecs.soton.ac.uk> on behalf of John Salter <J.Salter@leeds.ac.uk>
Sent: 16 November 2015 11:08 To: 'eprints-tech@ecs.soton.ac.uk' Subject: [EP-tech] Re: EPrints and RSS feeds Hi Andrew,
As far as I know, there isn’t a way to explicitly declare a citation style to be used for the exportview. From Export/RSS.pm
$item->appendChild( $session->render_data_element( 2, "description", EPrints::Utils::tree_to_utf8( $eprint->render_citation ) ) );
- this will use the ‘default’ citation style.
You could force this to use a new citation style that didn’t include the links (e.g. copy default.xml to rss_no_link.xml then edit it): EPrints::Utils::tree_to_utf8( $eprint->render_citation( "rss_no_links" ) ) ) );
Or, looking at EPrints::Utils::tree_to_utf8: EPrints::Utils::tree_to_utf8( $tree, $width, [$pre], [$whitespace_before], [$ignore_a] ) <a href="" will be converted into "bar <foo>" unless ignore_a is set. - inspecting the code, I’d expect that: EPrints::Utils::tree_to_utf8( $eprint->render_citation, undef, undef, undef, 1 ) might work!?
You probably don’t want to make these changes in the ~/perl_lib/… files – this might be of use: http://wiki.eprints.org/w/Instructions_for_local_plugins
Cheers, John
From: eprints-tech-bounces@ecs.soton.ac.uk [mailto:eprints-tech-bounces@ecs.soton.ac.uk]
On Behalf Of Andrew Hercules
Hi John,
I checked the plugins, which lead me to perl_lib/EPrints/XHTML.pm as they call on subroutines in that file.
Here's an example that I pulled from an RSS feed on Goldsmiths (within the description tag for each item):
<description> Banissy, Michael J. <http://research.gold.ac.uk/view/goldsmiths/Banissy=3AMichael_J=2E=3A=3A.html>; Jonas, Clare and Cohen Kadosh, Roi. 2014. Synesthesia: an introduction. Frontiers in Psychology, 5(1414), pp. 1-3. ISSN 1664-1078 [Article] </description>
I'm trying to remove the following link, which is generated because the author has other items in the same repository:
<http://research.gold.ac.uk/view/goldsmiths/Banissy=3AMichael_J=2E=3A=3A.html>
I'm stumped - I've tried turning off show_links and have also changed the _to_text_dump subroutine, which transforms <a> into " <href>" within the description tag.
Cheers,
Andrew
-- Andrew Hercules Developer Digital Archives & Research Technologies University of London Computer Centre Senate House, Malet Street, London WC1E 7HU T: +44 (0)20 7863 1342
The University of London is an exempt charity in England and Wales. We are committed to achieving a 20% cut in emissions from University buildings by 2015. Please think before you print.
From:
eprints-tech-bounces@ecs.soton.ac.uk <eprints-tech-bounces@ecs.soton.ac.uk> on behalf of John Salter <J.Salter@leeds.ac.uk>
Hi, Have you got an example for us to take a look at? In the RSS feed, there are probably links you want/need (e.g in the individual <item>s).
The RSS feeds are generated as an export from ~/perl_lib/EPrints/Plugin/Export/RSS.pm or ~/perl_lib/EPrints/Plugin/Export/RSS2.pm
- the key to what you’re trying to do may well be in one of these…
Cheers, John
From:
eprints-tech-bounces@ecs.soton.ac.uk [mailto:eprints-tech-bounces@ecs.soton.ac.uk]
On Behalf Of Andrew Hercules
Hi everyone,
Just wondering if anybody has experience changing the way that RSS feeds display citation information. I'm trying to eliminate links as they are adding an additional space that's causing confusion with third-party sites that consume the RSS feed.
By default, in perl_lib/EPrints/XHTML.pm, show_links is enabled with show_links => 0. I tried changing the 0 to a 1 and to undef, but the link still persists. Likewise, I also tried modifying the _to_text_dump subroutine in perl_lib/EPrints/XHTML.pm by specifying that $contents .= "", but the link still shows.
Any thoughts or suggestions on where else I should look would be much appreciated as I'm still learning the ins and outs of EPrints.
Have a great weekend!
Cheers,
Andrew
-- Andrew Hercules Developer Digital Archives & Research Technologies University of London Computer Centre Senate House, Malet Street, London WC1E 7HU T: +44 (0)20 7863 1342
The University of London is an exempt charity in England and Wales. We are committed to achieving a 20% cut in emissions from University buildings by 2015. Please think before you print. |
- References:
- [EP-tech] EPrints and RSS feeds
- From: Andrew Hercules <Andrew.Hercules@ulcc.ac.uk>
- [EP-tech] Re: EPrints and RSS feeds
- From: John Salter <J.Salter@leeds.ac.uk>
- [EP-tech] Re: EPrints and RSS feeds
- From: Andrew Hercules <Andrew.Hercules@ulcc.ac.uk>
- [EP-tech] Re: EPrints and RSS feeds
- From: John Salter <J.Salter@leeds.ac.uk>
- [EP-tech] EPrints and RSS feeds
- Prev by Date: [EP-tech] Re: EPrints and RSS feeds
- Next by Date: [EP-tech] Re: issue with on-behalf-of when depositing using SWORD 2
- Previous by thread: [EP-tech] Re: EPrints and RSS feeds
- Next by thread: [EP-tech] How to create a private archive ?
- Index(es):