EPrints Technical Mailing List Archive

See the EPrints wiki for instructions on how to join this mailing list and related information.

Message: #10057


< Previous (by date) | Next (by date) > | < Previous (in thread) | Next (in thread) > | Messages - Most Recent First | Threads - Most Recent First

Re: [EP-tech] Creators, authors, editors names


CAUTION: This e-mail originated outside the University of Southampton.
Andrew

Thank you for this informative, enlightening and encouraging information. It's really useful to see the examples and the links to the guidance. I feel more comfortable leaving this until Monday, now! 

Now that I know that the thing I was looking for was not there, I don't feel so daft!

Best wishes 

Will
____

From: Andrew M <eprints-tech@unitedgames.co.uk>
Sent: Friday, March 21, 2025 6:04:48 PM
To: Will Hughes <w.p.hughes@reading.ac.uk>
Cc: eprints-tech@ecs.soton.ac.uk <eprints-tech@ecs.soton.ac.uk>
Subject: Re: [EP-tech] Creators, authors, editors names
 

Am seeing the same on my AWS demo EPrint 3.4.4 install (excuse the 
lack of ssl atm):
http://18.232.191.141/id/eprint/42/

It also is the same on the exciting cutting edge next-generation 
public preview of EPrints 3.5:
https://pub.demo35.eprints-hosting.org/id/eprint/1421/

Good news:
----------
That means you haven't broken anything, =).

Guess work:
-----------
Commas appear to be name part delimiters, while "and" appears to be 
people (entire name) delimiters - so my guess is that's why it's not 
also a comma out of the box. Maybe there's an argument for a semi 
colon to be made?

Your question - answered off the top of my head:
------------------------------------------------
Would need to look into it / do due diligence, but I believe off the 
top of my head,
that creators_names is a short cut to the names sub field within the 
creators compound field.

Compound fields are described here:
https://wiki.eprints.org/w/Compound_field

Or you can back up to the parent page to get more of an overview:
https://wiki.eprints.org/w/Metadata

The creators_name will be defined (as far as the publications flavour 
of EPrints is concerned) here:
/opt/eprints3/flavours/pub_lib/cfg.d/eprint_fields.pl

You'll see it's a compound, called "creators" consisting of a "name" 
and "id" sub field.
Shortcuts to these therefore are creators_name and creators_id.

So the data is in the database;
the field is defined in the configuration - in order of user config 
(eprints3/archives/arcom/cfg/cfg.d) overriding flavour config 
(eprints3/flavours/pub_lib/cfg.d), overiding base config 
(eprints3/lib/cfg.d);
and workflow templates and citation templates are just templates for 
how the field and its data are handled.

If you are changing code, you can always use source code management 
tools like git, to track all the changes you make, and revert them 
back if you think you've screwed up. I often use the git flow 
workflow, and might do a git diff comparison between how the code was 
before my alterations, and how it is presently, in order to determine 
if I did mess anything up. Of course, the original of each release is 
also on github so can be seen in a web browser too, if you want a less 
command driven approach to spotting the difference and wish to 
manually browse the originals in a web browser.

I also recall you can pass the desired template to be used during 
rendering - so if you are messing about with code, but don't want to 
mess about with the default template, you can create a template with a 
custom name, and then call it specifically in your code, passing in 
the custom template name.
I.e. if you look at the render_citation method example in the CORE API:
https://wiki.eprints.org/w/Core_API
...you'll see the first param it takes after $self - the eprint or 
other dataobj the method is being called from - is a '$style' - this 
is basically the file name of your template without the .xml extension 
- i.e. 'default' for the default.xml template, or 
'custom_will_huges_template' for any custom_will_huges_template.xml 
you attempt.

Of course, the easiest way to mess with code without worrying about it,
is to make all your changes to copies of the system files in your own 
/opt/eprints3/archives/arcom/cfg/ directory. That way if you screw up, 
you can delete your screw up, and things will revert back to the 
publications flavour files, and fallback to the system files, etc.

So it is pretty idiot proof.

So this is just a matter of confidence building. You're doing well. 
Don't be thrown by odd default citation formatting.

Yours,
Andrew.






Quoting Will Hughes <w.p.hughes@reading.ac.uk>:

> Andrew
>
> Thank you for helping me to reflect on this. I have been looking 
> very closely at the folders you mention and the resources you 
> suggest. I'm sure I could adapt the code to not have 'and' between 
> every author. What bothered me was that I had not previously noticed 
> this behaviour. I assumed that the software would not have been set 
> up to create malformed citations, and that my tweaks must somehow 
> have knocked a hole in the code somewhere. I wanted to ascertain 
> whether this was a simple repair to the installation or where the 
> citation of multiple authors was normally incorrect!
>
> Does anyone know whether the 'creators_names' comes from the input 
> workflow or the citation modules? I'm worried about undoing 
> perfectly good coding and the cumulative effects of changing basic 
> routines!
>
> Best wishes
>
> Will
> ____
> ________________________________
> From: eprints-tech-request@ecs.soton.ac.uk 
> <eprints-tech-request@ecs.soton.ac.uk> on behalf of Andrew M 
> <eprints-tech@unitedgames.co.uk>
> Sent: Thursday, March 20, 2025 4:12:13 PM
> To: eprints-tech@ecs.soton.ac.uk <eprints-tech@ecs.soton.ac.uk>
> Subject: Re: [EP-tech] Creators, authors, editors names
>
> CAUTION: This e-mail originated outside the University of Southampton.
>
> CAUTION: This e-mail originated outside the University of Southampton.
>
> I recall from when I worked at EPrints, there were templates
> specifically for citations,
> that governed how authors were presented.
>
> I've completely forgotten what files these were and where, so will
> look it up for you again now.
>
> Okay - looking at my own installation, there appear to be system
> citation templates in the ...
> /opt/eprints3/lib/citations/eprint
> ...folder,
> and flavour level citation templates in the...
> /opt/eprints3/flavours/pub_lib/citations/eprint/
> ...folder.
>
> When I look at the past work I did on a possible improvement to
> citations with orcid IDs in them,
> I see I put some custom citation templates in...
> cfg/citations/eprint/
> ...so presumably that implies you could copy...
> /opt/eprints3/flavours/pub_lib/citations/default.xml
> ...to your own...
> /opt/eprints3/archives/arcom/cfg/citations/eprint/default.xml
> ...and then edit it away from there, and hopefully it'll work (may
> have to restart apache)?
>
> Do I really know what I'm talking about?
> Erm, might be worth watching the youtube channel again for a recap:
> https://www.youtube.com/watch?v=-D4hEsRB0g4&t=1697s
> ...hmm...that video features a brief mention of the two system
> directories, and advice to make your own copy to edit rather than edit
> the system ones.
>
> But yeah, generally, this is a quick reply off the top of my head, and
> I haven't checked the paths I've mentioned for typos - so double check
> all this with another source like the EPrints Wiki - but the key thing
> you're likely looking to change are citation templates for EPrint
> records, and armed with that knowledge, you may be able to find your
> answers more easily by searching for citation-related stuff.
>
> If you've already got your xml template, and are just trying to figure
> out how to edit the templates,
> these are some great resources here:
>
> https://wiki.eprints.org/w/EPScript/Introduction
>
> https://wiki.eprints.org/w/EPScript/Functions
>
> https://wiki.eprints.org/w/Category:EPrints_Metadata_Fields#Other_Properties
>
> Yours,
> Andrew.
>
> Quoting Will Hughes <w.p.hughes@reading.ac.uk>:
>
>> CAUTION: This e-mail originated outside the University of Southampton.
>> CAUTION: This e-mail originated outside the University of Southampton.
>> Hi
>>
>> Sorry to jump in again. First, thank you to those who have helped me
>> with my configuration of my metadata catalogue. It has been quite a
>> task but it now works (mostly!)
>>
>> The puzzle I have been wrestling with today, I am getting no closer
>> to solving. It occurs in all citations, in editing, in view, in
>> browsing and in search results. Every multiple-authored item (3+) in
>> my repo is showing all names separated by 'and' instead of by
>> commas. One and Two-author papers show correctly.
>>
>> I have looked through dozens of .pl, .pm and .xml files, but I
>> cannot find where the routine is that would deal with this, and I'm
>> worried that something may have got deleted or removed by mistake...
>>
>> Can anyone help, please?
>>
>> Best wishes
>>
>> Will
>> ____