EPrints Technical Mailing List Archive

Message: #09067


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

Re: [EP-tech] How to add title in Google Search link?


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

Hi Izwan,

 

this is what I have from the QUT citation plugin:

 

$c->{gscholar}->{search_title} = sub {

        my ( $eprint ) = @_;

 

        my $quri = $eprint->repository->config( "gscholar", "uri" )->clone;

        my $q = "";

 

        # get the title and encode it for Google

        my $title = $eprint->get_value( "title" );

        utf8::encode( $title );

        $q = "allintitle:\"$title\"";

 

        # get the creators' name and encode it for Google

        if ( $eprint->is_set( "creators_name" ) )

        {

                my $creator = (@{$eprint->get_value( "creators_name" )})[0];

                $creator = substr( $creator->{given}, 0, 1 ) . "-" . $creator->{family};

                utf8::encode( $creator );

                $q .= " author:$creator";

        }

        $quri->query_form(

                q =>  $q

        );

 

        return $quri;

};

 

Kind regards,

 

Martin

 

--

Dr. Martin Brändle
Zentrale Informatik
Universität Zürich
Stampfenbachstr. 73
CH-8006 Zürich

 

 

From: eprints-tech-bounces@ecs.soton.ac.uk <eprints-tech-bounces@ecs.soton.ac.uk> on behalf of MOHD.IZWAN SALIM via Eprints-tech <eprints-tech@ecs.soton.ac.uk>
Date: Wednesday, 14 September 2022 at 15:55
To: EDER Norbert via Eprints-tech <eprints-tech@ecs.soton.ac.uk>
Subject: [EP-tech] How to add title in Google Search link?

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

Dear all

 

Previously I use this code to create a link to search items in GS

Its sort of checks whether the item was indexed in GS or not.

 

But now it does not work anymore, maybe GS already changed it.

 

How to insert other metadata at the back of the query q=

Let say title

 

Regards


Izwan
UiTM Institutional Repositories

 

PENAFIAN: E-mel ini dan apa-apa fail yang dihantar bersama-samanya ("Mesej") adalah dihasratkan hanya untuk kegunaan penerima yang dinyatakan di atas dan mungkin mengandungi maklumat yang tidak umum, bermilik, istimewa, sulit dan dikecualikan dari penzahiran di bawah undang-undang yang terpakai termasuklah Akta Rahsia Rasmi 1972. BACA SELANJUTNYA...


DISCLAIMER : This e-mail and any files transmitted with it ("Message") is intended only for the use of the recipient(s) named above and may contain information that is non-public,  proprietary,  privileged,  confidential  and  exempt  from  disclosure under applicable law including the Official Secrets Act 1972. READ MORE...

GIF image