EPrints Technical Mailing List Archive
Message: #07485
< Previous (by date) | Next (by date) > | < Previous (in thread) | Next (in thread) > | Messages - Most Recent First | Threads - Most Recent First
Re: [EP-tech] Custom lookup script using a REST-API
- To: "eprints-tech@ecs.soton.ac.uk" <eprints-tech@ecs.soton.ac.uk>, "Stefan Wellsandt" <wel@biba.uni-bremen.de>
- Subject: Re: [EP-tech] Custom lookup script using a REST-API
- From: "Alan.Stiles" <alan.stiles@open.ac.uk>
- Date: Tue, 11 Sep 2018 07:50:32 +0000
I think the issue might be as simple as the name of your script – try renaming it so it doesn’t have the ‘.pl’ on the end as the workflow reference doesn’t have it. Alan From: eprints-tech-bounces@ecs.soton.ac.uk [mailto:eprints-tech-bounces@ecs.soton.ac.uk]
On Behalf Of Stefan Wellsandt via Eprints-tech Hello, I am a novice in PERL but I have to create a simple lookup script for our institute that provides an autocomplete list from a REST-API response. The latter is a JSON-formatted list of our research project names. We use
ePrints 3.3. From the documentation and tutorial videos, I understood that I could create a custom lookup script for this purpose. My thoughts about the implementation were these: 1.
The script is in the new “projects_api.pl” file I place in the “archives/cgi/users/lookup” folder. 2.
It should provide an output in the format (value, tab, <li>) as described here:
https://wiki.eprints.org/w/Autocompletion
3.
The “simple_file.pl” lookup file serves as the template for the custom lookup script:
https://github.com/eprints/eprints/blob/3.3/cgi/users/lookup/simple_file 4.
I have to remove the part where it opens the file with my custom code. The latter turns the JSON response into an array of project names. 5.
I call the custom lookup script in the workflows/eprint/default.xml via:
<field ref="projects" input_lookup_url="{/archives/biba/cgi/users/lookup/projects_api"/> My problem is that the call does not work in my test case. I can find a “404 File not Found - BIBA Repository” in the HTML source code, but I am stuck here, because I do not know where I have to search for the problem. Can anyone help me out and indicate where the problem might be? Best Regards Stefan |
- Follow-Ups:
- Re: [EP-tech] Custom lookup script using a REST-API
- From: "Alan.Stiles" <alan.stiles@open.ac.uk>
- Re: [EP-tech] Custom lookup script using a REST-API
- References:
- [EP-tech] Custom lookup script using a REST-API
- From: Stefan Wellsandt <wel@biba.uni-bremen.de>
- Re: [EP-tech] Custom lookup script using a REST-API
- From: "Alan.Stiles" <alan.stiles@open.ac.uk>
- [EP-tech] Custom lookup script using a REST-API
- Prev by Date: [EP-tech] Custom lookup script using a REST-API
- Next by Date: [EP-tech] Moving Things Around (ep_summary_content_left etc.)
- Previous by thread: [EP-tech] Sort view with creators_name and corp_creators
- Index(es):