[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[EP-tech] ChatGPT



Updating the Perl Doc in the codebase so the wiki can be subsequently 
updated has been one of my background tasks for some time.? 
Unfortunately, it is slow progress, mainly as there is always something 
more important and/or urgent that needs doing.

Beyond that, I have been trying to tidy up the wiki and clear out some 
of the clutter.? I feel I have barely scraped the surface of this. Using 
the wiki special pages to find some useful entry points to tackle things 
has hopefully meant that I have got the best "bang for my buck".

Any suggestions on quick-ish tasks/fixes to improve the wiki to make it 
easier to use are welcome. Over the last year I put extensive effort 
adding and/or improving the following pages (some that I have mentioned 
on this list before), which I hope to be useful:

https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwiki.eprints.org%2Fw%2FEPrints_Glossary&data=05%7C01%7Ceprints-tech%40ecs.soton.ac.uk%7Ce240bdd96ce748fc0c1308daf1b166f7%7C4a5378f929f44d3ebe89669d03ada9d8%7C0%7C0%7C638088041474112910%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=oGx4uXRWpp4L5b4cHen%2BQWqwUkzcgki17iiTUMoCNEU%3D&reserved=0
https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwiki.eprints.org%2Fw%2FCategory%3AEPrints_Directory_Structure&data=05%7C01%7Ceprints-tech%40ecs.soton.ac.uk%7Ce240bdd96ce748fc0c1308daf1b166f7%7C4a5378f929f44d3ebe89669d03ada9d8%7C0%7C0%7C638088041474112910%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=R5zHa8%2F10zM74Yox8a8jg1ztpOooWmuVSEgTRhgLQ9U%3D&reserved=0 - 
Category for pages describing directories within the EPrints codebase 
and the purpose of their files and sub-directories.
https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwiki.eprints.org%2Fw%2FAdmin&data=05%7C01%7Ceprints-tech%40ecs.soton.ac.uk%7Ce240bdd96ce748fc0c1308daf1b166f7%7C4a5378f929f44d3ebe89669d03ada9d8%7C0%7C0%7C638088041474112910%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=dySVhdphGj7h5fLnbKyBvC6bO1jT9L%2F9VnxYTcq0Cc0%3D&reserved=0 - Describes a repository's admin page 
with sub-pages for its tabs and buttons.
https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwiki.eprints.org%2Fw%2FListings_of_User_Roles_and_Privileges&data=05%7C01%7Ceprints-tech%40ecs.soton.ac.uk%7Ce240bdd96ce748fc0c1308daf1b166f7%7C4a5378f929f44d3ebe89669d03ada9d8%7C0%7C0%7C638088041474112910%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=DDqmp5gqHERT9b046fNJ5XYCsQaoBSFbvkZ6fzrtXQw%3D&reserved=0
https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwiki.eprints.org%2Fw%2FApache_Hardening&data=05%7C01%7Ceprints-tech%40ecs.soton.ac.uk%7Ce240bdd96ce748fc0c1308daf1b166f7%7C4a5378f929f44d3ebe89669d03ada9d8%7C0%7C0%7C638088041474112910%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=SCpuQnJykCWDhBgEdnhVFIcoZfbVYne8IrbcjyLcHZ0%3D&reserved=0
https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwiki.eprints.org%2Fw%2FEPrints_and_SELinux&data=05%7C01%7Ceprints-tech%40ecs.soton.ac.uk%7Ce240bdd96ce748fc0c1308daf1b166f7%7C4a5378f929f44d3ebe89669d03ada9d8%7C0%7C0%7C638088041474112910%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=gr9xmA8YqIruMKyO2O3JHeyAFN9iN8wbXG2f79IBNlQ%3D&reserved=0

On 08/01/2023 6:25 pm, Christopher Gutteridge via Eprints-tech wrote:
>
> So, it seems that EPrints is well documented enough online that 
> ChatGPT can write simple EPrints scripts and functions. I'm frankly 
> astounded at what this tool can do. It can't do complex stuff but it's 
> still impressive.
>
>
>
> Christopher Gutteridge
> PROMPT:
> please suggest a perl script to operate on an EPrints repository. It 
> should find all the records with no title and set the title to "NO TITLE".
>
>
> #!/usr/bin/perl
>
> use EPrints;
>
>
>   Initialize the repository
>
> my $repo = EPrints->new->repository('your_repository_id');
>
>
>   Find all records with no title
>
> my $records = $repo->search({ match => 'AND', filters => [ { 
> meta_fields => [ 'title' ], value => '', match => 'EQ' }, ], });
>
>
>   Set the title of each record to "NO TITLE"
>
> foreach my $record ($records->get_records) {
>
> $record->set_value('title', 'NO TITLE');
>
> $record->commit;
>
> }
>
> print "Finished setting titles of records with no title to 'NO TITLE'\n";
>
> -- 
> Christopher Gutteridge, Research Application Support, University of Southampton
>
> *** Options:http://mailman.ecs.soton.ac.uk/mailman/listinfo/eprints-tech
> *** Archive:https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.eprints.org%2Ftech.php%2F&data=05%7C01%7Ceprints-tech%40ecs.soton.ac.uk%7Ce240bdd96ce748fc0c1308daf1b166f7%7C4a5378f929f44d3ebe89669d03ada9d8%7C0%7C0%7C638088041474112910%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=5Q9iOKjjdnynOY%2BX6%2FkzAX7aOIvCSOEEwGmmAJmbkxk%3D&reserved=0
> *** EPrints community wiki:https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwiki.eprints.org%2F&data=05%7C01%7Ceprints-tech%40ecs.soton.ac.uk%7Ce240bdd96ce748fc0c1308daf1b166f7%7C4a5378f929f44d3ebe89669d03ada9d8%7C0%7C0%7C638088041474112910%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=ogsW5UCC5P28m6mK9dIzAVzm92%2BzzoOUNrZPD7yY7jI%3D&reserved=0
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ecs.soton.ac.uk/pipermail/eprints-tech/attachments/20230108/7080426c/attachment-0001.html