Bug 26169

Summary: Run plugins from the CLI / as a script
Product: Koha Reporter: David Cook <dcook>
Component: Plugin architectureAssignee: Bugs List <koha-bugs>
Status: RESOLVED DUPLICATE QA Contact: Testopia <testopia>
Severity: enhancement    
Priority: P5 - low    
Version: unspecified   
Hardware: All   
OS: All   
GIT URL: Change sponsored?: ---
Patch complexity: --- Documentation contact:
Documentation submission: Text to go in the release notes:
Version(s) released in:
Circulation function:

Description David Cook 2020-08-07 03:10:29 UTC
I have some ideas where it could be useful to be able to run a Koha plugin as a script.

For example:
"echo <oaipmh>records</oaipmh> | koha-plugin --run Koha::Plugin::Dcook::Oaipmh::Harvester --method import kohadev"
Comment 1 David Cook 2020-08-07 03:10:54 UTC
This particular case wouldn't be very efficient, but I imagine other use cases could be thought up
Comment 2 David Cook 2020-08-07 03:12:50 UTC
(In reply to David Cook from comment #0)
> I have some ideas where it could be useful to be able to run a Koha plugin
> as a script.
> 
> For example:
> "echo <oaipmh>records</oaipmh> | koha-plugin --run
> Koha::Plugin::Dcook::Oaipmh::Harvester --method import kohadev"

Oh actually... that should've been more like this:

For example:
 "echo {"repository":"http://repo.org","verb":"GetRecord","metadataPrefix":"marcxml"} | koha-plugin --run Koha::Plugin::Dcook::Oaipmh::Harvester --method import kohadev"
Comment 3 David Cook 2023-07-21 01:07:24 UTC

*** This bug has been marked as a duplicate of bug 34335 ***