EPrints Technical Mailing List Archive
Message: #09003
< Previous (by date) | Next (by date) > | < Previous (in thread) | Next (in thread) > | Messages - Most Recent First | Threads - Most Recent First
Re: [EP-tech] Generate abstract by item type
- To: <eprints-tech@ecs.soton.ac.uk>, "MOHD.IZWAN SALIM" <mohdizwan8733@uitm.edu.my>, Yuri <yurj@alfa.it>
- Subject: Re: [EP-tech] Generate abstract by item type
- From: David R Newman <drn@ecs.soton.ac.uk>
- Date: Thu, 7 Jul 2022 07:44:38 +0100
Hi Izwan,
Yes that looks about right to me if you have
downloaded the latest version of the generate_abstracts script
for which I previously provided a link. However, I took a quick
look at your repository and I cannot find cartographic as a type
of eprint, based on the Item Type options under your advanced
search ( https://ir.uitm.edu.my/cgi/search/advanced ). Maybe
cartographic is a value for some other field, so you may need
to alter the MySQL query. If you run the command as is and the
SQL query finds no eprint IDs, the way generate_abstracts works
is that it will generate abstracts for all items.
Regards
David Newman
CAUTION: This e-mail originated outside the University of Southampton.Dear Yuri and David, is this the exact command that I have to run in the terminal?
./generate_abstracts digimap `mysql -u username -p repopassword eprints -e "SELECT eprintid FROM eprint WHERE type = 'cartographic' AND eprint_status = 'archive';" | tail -n +2`
digimap is my repoid
On Wed, Jul 6, 2022 at 7:50 PM Yuri via Eprints-tech <eprints-tech@ecs.soton.ac.uk> wrote:
CAUTION: This e-mail originated outside the University of Southampton.
An idea could be to have a generic utils with a query parameter in json
format, so a search is run with that query and the resulting eprintids
used. For example:
bin/find_eprintids <ARCHIVEID> -query '{"type": "conference_item",
"eprint_status": "archive"}' | xargs bin/generate_abstracts <ARCHIVEID>
(dates could be expressed in iso format). The util 'find_eprintids'
would do:
foreach $key (keys %fields)
{
$searchexp->add_field( $ds->get_field( $key ), $fields($key) );
}
my $list = $searchexp->perform_search;
and then return the eprintids from the list.
This could help to combine together multiple search results in a single
file, and cat the file | xargs bin/generate_abstracts <ARCHIVEID>.
I usually use the db as below to get all the eprintids I need to process
but an "eprints" search could be useful/simpler to use.
Il 06/07/22 10:48, David R Newman via Eprints-tech ha scritto:
>
> Hi Izwan,
>
> Unfortunately, there is not currently an easy way to do this bar
> writing your own script. For the next release of EPrints I have
> expanded the epadmin scripts capabilities so all functions where you
> could only provide a single eprint ID, you can now provide multiple
> eprint IDs or even a sequence of eprint IDs (e.g. 1-10 for the first
> 10 eprint IDs). What your email has meant I have realised is that as
> generate_abstracts is a separate script, I have not introduced the
> same functionality to that. I have just been working on fixing that
> oversight and as it is a stand-alone script you should be able to
> download and use the latest version from here:
>
> https://eur03.safelinks.protection.outlook.com/?url="">
>
> Although the script does not allow you to specify a type option you
> can do a little trick from the command line:
>
> bin/generate_abstracts <ARCHIVEID> `mysql -u <DBUSER> -p<DBPASSWORD>
> <DBNAME> -e "SELECT eprintid FROM eprint WHERE type =
> 'conference_item' AND eprint_status = 'archive';" | tail -n +2`
>
> What this does is queries the database for all live archive items of a
> particular eprint type (in this case conference_item) and prints out
> this list of eprint IDs. the "| tail -n +2" keeps everything from the
> 2nd line onwards (i.e. removes the first line), as this contains the
> name of the column (i.e. eprintid), which is not an eprint ID in itself.
>
> Regards
>
> David Newman
>
> On 06/07/2022 6:15 am, MOHD.IZWAN SALIM via Eprints-tech wrote:
>> *CAUTION:* This e-mail originated outside the University of Southampton.
>> Dear all, can we generate abstract pages by an option item type or
>> other metadata?
>>
>> Regards
>>
>> *Izwan*
>> UiTM Institutional Repository
>> https://eur03.safelinks.protection.outlook.com/?url="">
>> <https://eur03.safelinks.protection.outlook.com/?url="">>
>>
>> *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..._
>> <https://eur03.safelinks.protection.outlook.com/?url="">>
>>
>> ------------------------------------------------------------------------
>> *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..._
>> <https://eur03.safelinks.protection.outlook.com/?url="">>
>>
>> *** Options:http://mailman.ecs.soton.ac.uk/mailman/listinfo/eprints-tech
>> *** Archive:https://eur03.safelinks.protection.outlook.com/?url="">
>> *** EPrints community wiki:https://eur03.safelinks.protection.outlook.com/?url="">
>
> *** Options: http://mailman.ecs.soton.ac.uk/mailman/listinfo/eprints-tech
> *** Archive: https://eur03.safelinks.protection.outlook.com/?url="">
> *** EPrints community wiki: https://eur03.safelinks.protection.outlook.com/?url="">
*** Options: http://mailman.ecs.soton.ac.uk/mailman/listinfo/eprints-tech
*** Archive: http://www.eprints.org/tech.php/
*** EPrints community wiki: http://wiki.eprints.org/
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...
*** Options: http://mailman.ecs.soton.ac.uk/mailman/listinfo/eprints-tech *** Archive: http://www.eprints.org/tech.php/ *** EPrints community wiki: http://wiki.eprints.org/
- References:
- [EP-tech] Generate abstract by item type
- From: "MOHD.IZWAN SALIM" <mohdizwan8733@uitm.edu.my>
- Re: [EP-tech] Generate abstract by item type
- From: Yuri <yurj@alfa.it>
- Re: [EP-tech] Generate abstract by item type
- From: David R Newman <drn@ecs.soton.ac.uk>
- Re: [EP-tech] Generate abstract by item type
- From: "MOHD.IZWAN SALIM" <mohdizwan8733@uitm.edu.my>
- [EP-tech] Generate abstract by item type
- Prev by Date: Re: [EP-tech] Generate abstract by item type
- Next by Date: Re: [EP-tech] Generate abstract by item type
- Previous by thread: [EP-tech] Sort view with creators_name and corp_creators
- Index(es):