Download the PHP package biblibre/omeka-cli without Composer
On this page you can find all versions of the php package biblibre/omeka-cli. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download biblibre/omeka-cli
More information about biblibre/omeka-cli
Files in biblibre/omeka-cli
Package omeka-cli
Short Description Omeka CLI
License GPL-3.0-or-later
Homepage https://github.com/biblibre/omeka-cli
Informations about the package omeka-cli
Omeka CLI
Command line tool for Omeka
This tool allows to interact with Omeka by using a command line interface. It also provides everything needed for Omeka plugins to create custom commands.
Usage
omeka-cli [-h | --help]
omeka-cli [-V | --version]
omeka-cli <command> [options] [arguments]
Available commands
check-updates check for updates
help print help for a specific command
status print status of current Omeka installation
install install Omeka
list list available commands
options list, get and set Omeka options
plugin-disable disable a plugin
plugin-download downloads a plugin
plugin-enable enable a plugin (install & activate)
plugin-list list all plugins
plugin-search search a plugin
plugin-uninstall uninstall a plugin
plugin-update update a plugin
snapshot create a snapshot
snapshot-restore restore a snapshot
upgrade upgrade Omeka
Requirements
- PHP (>= 7.2) with the following extensions:
- Zip
- PDO and the PDO_MYSQL driver
- git
Installation
Using composer
Then add ~/.config/composer/vendor/bin
to your PATH
Using the phar
Download the latest ̀omeka-cli.phar
from Releases page.
Using the sources
Creating custom commands
To create a custom command named foo:bar
with the Foo plugin, put the
following code in the initialize
hook of your plugin's main class:
and define a class Foo_Bar
which extends
OmekaCli\Command\AbstractCommand
You will have to implements at least configure
and execute
methods.
For instance:
Then you will be able to run the command either this way:
or using the alias:
To see how to create a custom command from a plugin in practice, see plugin Foo.
Running tests
If you want to test omeka-cli
, copy phpunit.xml.dist
into phpunit.xml
and
change environment variables OMEKA_DB_*
as needed.
If you want to avoid downloading Omeka before every run, you can download the
ZIP file manually, and put its local path in OMEKA_ZIP_PATH
.
After you've done that, run
License
GPL 3.0+
All versions of omeka-cli with dependencies
ext-pdo Version *
ext-pdo_mysql Version *
knplabs/github-api Version ^2.0
php-http/guzzle6-adapter Version ^1.1
cache/filesystem-adapter Version ^1.0
guzzlehttp/guzzle Version ^6.3
symfony/console Version ^3.3
opis/closure Version ^3.5