EPrints Technical Mailing List Archive

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

Message: #10056


< 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.

Am seeing the same on my AWS demo EPrint 3.4.4 install (excuse the
lack of ssl atm):
https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2F18.232.191.141%2Fid%2Feprint%2F42%2F&data=05%7C02%7Ceprints-tech%40ecs.soton.ac.uk%7C1a5881f6a8ae4d03434108dd68a2df33%7C4a5378f929f44d3ebe89669d03ada9d8%7C0%7C0%7C638781770936957871%7CUnknown%7CTWFpbGZsb3d8eyJFbXB0eU1hcGkiOnRydWUsIlYiOiIwLjAuMDAwMCIsIlAiOiJXaW4zMiIsIkFOIjoiTWFpbCIsIldUIjoyfQ%3D%3D%7C0%7C%7C%7C&sdata=iHerhLB8%2F2XUp8oOCP7yOfTC22E5yQ%2BNj%2BZDuI3pmZk%3D&reserved=0

It also is the same on the exciting cutting edge next-generation
public preview of EPrints 3.5:
https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fpub.demo35.eprints-hosting.org%2Fid%2Feprint%2F1421%2F&data=05%7C02%7Ceprints-tech%40ecs.soton.ac.uk%7C1a5881f6a8ae4d03434108dd68a2df33%7C4a5378f929f44d3ebe89669d03ada9d8%7C0%7C0%7C638781770936976752%7CUnknown%7CTWFpbGZsb3d8eyJFbXB0eU1hcGkiOnRydWUsIlYiOiIwLjAuMDAwMCIsIlAiOiJXaW4zMiIsIkFOIjoiTWFpbCIsIldUIjoyfQ%3D%3D%7C0%7C%7C%7C&sdata=%2B8nBz5T1%2FcAIO1rsDgzSsQfGP4Rzna3Nvbu2qAkS%2BL4%3D&reserved=0

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://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwiki.eprints.org%2Fw%2FCompound_field&data=05%7C02%7Ceprints-tech%40ecs.soton.ac.uk%7C1a5881f6a8ae4d03434108dd68a2df33%7C4a5378f929f44d3ebe89669d03ada9d8%7C0%7C0%7C638781770936990172%7CUnknown%7CTWFpbGZsb3d8eyJFbXB0eU1hcGkiOnRydWUsIlYiOiIwLjAuMDAwMCIsIlAiOiJXaW4zMiIsIkFOIjoiTWFpbCIsIldUIjoyfQ%3D%3D%7C0%7C%7C%7C&sdata=69ii82KbLpQoqVzqc3IkDyQBrSithzGinbMryClKtX4%3D&reserved=0

Or you can back up to the parent page to get more of an overview:
https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwiki.eprints.org%2Fw%2FMetadata&data=05%7C02%7Ceprints-tech%40ecs.soton.ac.uk%7C1a5881f6a8ae4d03434108dd68a2df33%7C4a5378f929f44d3ebe89669d03ada9d8%7C0%7C0%7C638781770937003707%7CUnknown%7CTWFpbGZsb3d8eyJFbXB0eU1hcGkiOnRydWUsIlYiOiIwLjAuMDAwMCIsIlAiOiJXaW4zMiIsIkFOIjoiTWFpbCIsIldUIjoyfQ%3D%3D%7C0%7C%7C%7C&sdata=UzvkRlt1%2FPJ1Jozus38vSzajShg7pl9X4DSB47Ow7h0%3D&reserved=0

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://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwiki.eprints.org%2Fw%2FCore_API&data=05%7C02%7Ceprints-tech%40ecs.soton.ac.uk%7C1a5881f6a8ae4d03434108dd68a2df33%7C4a5378f929f44d3ebe89669d03ada9d8%7C0%7C0%7C638781770937017268%7CUnknown%7CTWFpbGZsb3d8eyJFbXB0eU1hcGkiOnRydWUsIlYiOiIwLjAuMDAwMCIsIlAiOiJXaW4zMiIsIkFOIjoiTWFpbCIsIldUIjoyfQ%3D%3D%7C0%7C%7C%7C&sdata=zeJMUjqjHsdfEZKQS2ykLe%2FAbZHPZOWbsIcKQY1laaw%3D&reserved=0
...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://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3D-D4hEsRB0g4%26t%3D1697s&data=05%7C02%7Ceprints-tech%40ecs.soton.ac.uk%7C1a5881f6a8ae4d03434108dd68a2df33%7C4a5378f929f44d3ebe89669d03ada9d8%7C0%7C0%7C638781770937030361%7CUnknown%7CTWFpbGZsb3d8eyJFbXB0eU1hcGkiOnRydWUsIlYiOiIwLjAuMDAwMCIsIlAiOiJXaW4zMiIsIkFOIjoiTWFpbCIsIldUIjoyfQ%3D%3D%7C0%7C%7C%7C&sdata=9ibKSpkKVMQR2Yx01PCV0wE6a9RS%2F5T3gt38BdY8kE0%3D&reserved=0
...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://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwiki.eprints.org%2Fw%2FEPScript%2FIntroduction&data=05%7C02%7Ceprints-tech%40ecs.soton.ac.uk%7C1a5881f6a8ae4d03434108dd68a2df33%7C4a5378f929f44d3ebe89669d03ada9d8%7C0%7C0%7C638781770937044226%7CUnknown%7CTWFpbGZsb3d8eyJFbXB0eU1hcGkiOnRydWUsIlYiOiIwLjAuMDAwMCIsIlAiOiJXaW4zMiIsIkFOIjoiTWFpbCIsIldUIjoyfQ%3D%3D%7C0%7C%7C%7C&sdata=gUbYvY7ZBdLFIfhN%2Bi1vK6mz581CZbQh4NuuOnC7fmE%3D&reserved=0

https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwiki.eprints.org%2Fw%2FEPScript%2FFunctions&data=05%7C02%7Ceprints-tech%40ecs.soton.ac.uk%7C1a5881f6a8ae4d03434108dd68a2df33%7C4a5378f929f44d3ebe89669d03ada9d8%7C0%7C0%7C638781770937056849%7CUnknown%7CTWFpbGZsb3d8eyJFbXB0eU1hcGkiOnRydWUsIlYiOiIwLjAuMDAwMCIsIlAiOiJXaW4zMiIsIkFOIjoiTWFpbCIsIldUIjoyfQ%3D%3D%7C0%7C%7C%7C&sdata=OyOxY2a3lt5txFA%2B2BDLpkCRhWwXDJT1aiSpn0Bv7CM%3D&reserved=0

https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwiki.eprints.org%2Fw%2FCategory%3AEPrints_Metadata_Fields%23Other_Properties&data=05%7C02%7Ceprints-tech%40ecs.soton.ac.uk%7C1a5881f6a8ae4d03434108dd68a2df33%7C4a5378f929f44d3ebe89669d03ada9d8%7C0%7C0%7C638781770937068784%7CUnknown%7CTWFpbGZsb3d8eyJFbXB0eU1hcGkiOnRydWUsIlYiOiIwLjAuMDAwMCIsIlAiOiJXaW4zMiIsIkFOIjoiTWFpbCIsIldUIjoyfQ%3D%3D%7C0%7C%7C%7C&sdata=LhOO1B5SpKsop33fvZxLQZ7w4PHrihGhGMPrEMkT9YY%3D&reserved=0

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
____