nabu is a digital media item management system that provides a catalog of audio and video items, metadata for these items, and information about the workflow status of the items.
Ruby HTML CSS CoffeeScript JavaScript
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
app increase delayed job sleep. add logging around bulk update. use find_… Feb 13, 2017
config increase delayed job sleep. add logging around bulk update. use find_… Feb 13, 2017
data Added a task for retired language codes. Sep 8, 2013
db increase delayed job sleep. add logging around bulk update. use find_… Feb 13, 2017
doc Move from ffprobe to avprobe. Dec 19, 2014
lib Merge branch 'develop' Feb 13, 2017
log Add a rails 3.1rc5 template Aug 1, 2011
public Fix up some Nabu spreadsheet import issues. Sep 28, 2013
script Upgrade to rails 3.2.6 Jul 23, 2012
solr/conf Issue #601: fix identifier matching while searching for items. Nov 21, 2016
spec change line endings on schema files Feb 7, 2017
vendor/assets Issue #582: Fix missing map icons May 25, 2016
.gitignore Update DOI metadata generation to include parent relations. Update sp… Nov 25, 2015
.haml-lint.yml NOTICKET: Configure haml-lint Jul 19, 2016
.rspec Start using spring Dec 28, 2013
.rubocop.yml Issue #528 WIP: Create config files for trivial cops, and for lint of… May 6, 2016
.rubocop_lint_cops.yml NOJIRA: Update RuboCop May 25, 2016
.rubocop_resolved.yml Unrelated: Configure RuboCop Aug 12, 2016
.rubocop_todo.yml NOJIRA: Update RuboCop and rerun Aug 12, 2016
.traceroute.yml NOJIRA: Create traceroute configuration Jun 21, 2016
Capfile Compile asstes Apr 6, 2012
Gemfile add delayed_job. push catalog file generation to background task Feb 13, 2017
Gemfile.lock add delayed_job. push catalog file generation to background task Feb 13, 2017
Guardfile Start using spring Dec 28, 2013
LICENSE Create LICENSE Jan 22, 2015
README.md Add info to readme about running fix_solr on the server. Nov 22, 2016
Rakefile Add a rails 3.1rc5 template Aug 1, 2011
TODO.md Removed some items that are done. Sep 29, 2012
config.ru Add a rails 3.1rc5 template Aug 1, 2011
help.txt Add help file for common commands. Dec 21, 2014

README.md

Nabu Catalog

Setting up your dev environment

This application has been configured with guard, it will ensure

  • Tests are run
  • Solr is running for dev and test
  • Development web server is started
  • All of the above is restarted when you edit files
bundle install
bundle exec spring rake db:create
bundle exec spring rake db:schema:load
RAILS_ENV=test bundle exec spring rake db:schema:load
bundle exec guard

Deployment

We are using Capistrano for deployment.

cap deploy
cap production deploy

Note about deployment: if you see a 'Permission denied(publickey)' error, try running ssh-add -k in terminal

if necessary:

cap deploy:migrate
cap sunspot:reindex

Note: if you update the Solr configuration (in staging), you will need to run a script on the server to copy over the new config, and restart and reindex Solr. Run the below from the home directory on the server.

./scripts/fix_solr.sh

Importing a production database into your development environment

ssh deploy@catalog.paradisec.org.au "mysqldump -u root nabu | gzip > nabu.sql.gz"
scp deploy@catalog.paradisec.org.au:nabu.sql.gz .
gzip -dc nabu.sql.gz | mysql -u root nabu_devel
spring rake sunspot:reindex

Production Tasks

import archive files

RAILS_ENV=production bundle exec rake archive:update_files

check if all files that have been uploaded are ok:

cd /srv/www/nabu/current
RAILS_ENV=production bundle exec rake --trace archive:update_files > log/update_files.log

check if all *-CAT-PDSC_ADMIN.xml files exist and create if necessary:

cd /srv/www/nabu/current
RAILS_ENV=production bundle exec rake --trace archive:admin_files > log/admin_files.log

delete a collection with all its items:

cd /srv/www/nabu/current
RAILS_ENV=production bundle exec rake archive:delete_collection[PA1]


# NEW Ethnologue data

Download the latest version of the following tables from

    http://www.ethnologue.com/codes/default.asp#downloading

* CountryCodes.tab
* LanguageIndex.tab

Copy them into the data directory, overwriting the existing files there.

Run the following rake tasks to import them (in this order):

``` bash
bundle exec rake import:countries
bundle exec rake import:languages

All new countries will be added to the Nabu countries table. The new language codes of type "L" will be added to the Nabu language table. All mappings of language to countries will also be added to the countries_languages table.

Retire Ethnologue data

Download the latest version of the retired codes from

http://www-01.sil.org/iso639-3/download.asp#retiredDownloads
  • iso-639-3_Retirements.tab

Copy it into the data directory, overwriting the existing file there.

Run the following rake task to import them:

bundle exec rake import:retired

All existing codes that are retired are marked as such, incl name change. Where name changes occurred items in CollectionLanguage, ItemContentLanguage, ItemSubjectLanguage are updated with the replacement language code. Where splits happened, a message is printed.

OAI-PMH

OLAC available at:

The feeds that OLAC harvests:

Individual item:

RIF-CS available at:

testing:

gem install localtunnel
rbenv rehash
localtunnel 3000

use resulting server on an OAI repository explorer:

The feed that ANDS harvests:

Test at ANDS:

Feed for a single collection:

Setup Rollbar

You need to configure the rollbar API key to capture exceptions.

The first method is creating a file in the shared directory, which will be symlinked by cap.

echo ROLLBAR_API_KEY > /srv/www/nabu/shared/config/rollbar.txt

Alternatively you can pass it in as an environment variable at server start up, for example.

rails server ROLLBAR_ACCESS_TOKEN=ROLLBAR_API_KEY