This plugin allows you to connect your library website to Alma and pull down database resources and display them using HTML and Javascript.
TODO: Clean Up the Installation Instructions
Install with composer. Use the following command in your terminal window.
composer require seumunday/azdatabases
Create new autoloads
composer dump-auto
Add the following to your service providers in config/app.php
Seumunday\Azdatabases\AzdatabasesServiceProvider::class,
Use Artisan to publish the vendor files into your site. This allows you to fully customize the views.
php artisan vendor:publish --provider="Seumunday\Azdatabases\AzdatabasesServiceProvider"
List of Transfered files:
- config/azdatabases.php
- app/Console/commands/AzDatabaseImport.php
- resources/views/vendor/azdatabases
- aznav.blade.php
- index.blade.php
- resources/assets/js/vendor/azdatabases.js
Insert your OAI url from alma into the newly transfered config file.
'url' => 'https://YOURURLHERE'
NOTE Learn how to get this url by reading these helpful articles from exlibris. Alma OAI Integration API Exlibris OAI Article
You may also change the url slug for this plugin. Please keep in mind you will also have to change it in the azdatabases.js file that's imported as well. To change that file, set the variable on line 10 to the same value that's in the config file.
In app/Console/Kernel.php, add the following to protected $commands:
\App\Console\Commands\AzDatabaseImport::class,
And the following under function schedule
$schedule->command('importAZDB')
->daily();
To populate it instantly, change daily() to everyMinute(), then run the following artisan command.
To run the command:
php artisan schedule:run
NOTE: The data is populated by accessing the ALMA api, and downloading it ever day. To set this up, you will need to make sure you have set up scheduling. https://laravel.com/docs/5.4/scheduling
At this point, you should be able to see html loading at YOURDOMAIN/database
Add the following to Elixer in your gulp file.
mix.webpack('vendor/azdatabases.js', 'public/assets/js');
If you have Laravel 5.4, it will be in your webpack.js file, and will instead look like this:
.js('resources/assets/js/vendor/azdatabases.js', 'public/assets/js')
If you store your JS files else where, make sure to also change the script url in the view.
If this is a new project, don't forget to run 'npm install'
This allows us to have permalinks to searches and selections. Run the following in your terminal window:
npm install vue-router --save
Depending on what version of Laravel you use, here are the commands to compile the javascript.
Laravel 5.3
gulp
Laravel 5.4
npm run watch
TODO: Write usage instructions
TODO: Write more history
This project was based on Justin Kells AZ Database project.