Skip to content

Instantly share code, notes, and snippets.

View sprklinginfo's full-sized avatar

Lingling Jiang sprklinginfo

  • Sheridan College Library
  • Mississauga, ON, Canada
View GitHub Profile
[nruest@digital:modules]$ drush -v --user=admin --uri=http://digital.library.yorku.ca islandora_batch_scan_preprocess --content_models=islandora:sp_large_image_cmodel --parent=yul:F0433 --parent_relationship_pred=isMemberOfCollection --type=directory --target=/mnt/big_data/tmp/image_test
Initialized Drupal 7.22 root directory at /extra/sites/digital.library.yorku.ca [notice]
Initialized Drupal site digital.library.yorku.ca at sites/default [notice]
Argument 1 passed to IslandoraScanBatch::preprocess_children() must be an instance of IslandoraBatchObject, null given, called in [notice]
/extra/sites/digital.library.yorku.ca/sites/all/modules/islandora_batch/includes/islandora_scan_batch.inc on line 160 and defined islandora_scan_batch.inc:169
PHP Fatal error: Call to a membe
$view = new view();
$view->name = 'allan_robb_fleming';
$view->description = '';
$view->tag = 'default';
$view->base_table = 'islandora_solr';
$view->human_name = 'Allan Robb Fleming';
$view->core = 7;
$view->api_version = '3.0';
$view->disabled = FALSE; /* Edit this to true to make a default view disabled initially */
# Add multimedia source
echo "deb http://www.deb-multimedia.org wheezy main non-free" >> /etc/apt/sources.list
echo "deb-src http://www.deb-multimedia.org wheezy main non-free" >> /etc/apt/sources.list
apt-get update
apt-get install deb-multimedia-keyring # if this aborts, try again
apt-get update
# Go to local source directory
cd /usr/local/src
import subprocess
import tempfile
import MySQLdb
import ConfigParser
import sys
import os
import logging
from fcrepo.utils import NS
from fcrepo.connection import Connection, FedoraConnectionException
from fcrepo.client import FedoraClient
@sprklinginfo
sprklinginfo / .gitignore
Last active September 7, 2015 20:10 — forked from octocat/.gitignore
# Compiled source #
###################
*.com
*.class
*.dll
*.exe
*.o
*.so
# Packages #
<?php
/*
They're stored in the COLLECTION_POLICY datastream, on the collection object. You can use the
CollectionPolicy class (https://github.com/Islandora/islandora_solution_pack_collection/blob/7.x/includes/collection_policy.inc)
to help parse this datastream, in particular, the getContentModels() method
(https://github.com/Islandora/islandora_solution_pack_collection/blob/7.x/includes/collection_policy.inc#L75-L105)should be of use to you.
Could probably use some error handling, but something like this: https://gist.github.com/adam-vessey/731c415cf822dd9f9f65
*/
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet xmlns:default="http://www.loc.gov/mods/v3"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
xmlns:saxon="http://icl.com/saxon" extension-element-prefixes="saxon">
<!--
This stylesheet was originally designed to split an XML file containing multiple MODS records into separate MODS files.
It names each file by targeting the identifier element in the record being exported to use as the file name.
Requires the SAXON Extensions be loaded:
http://users.breathe.com/mhkay/saxon/saxon5-5-1/extensions.html
@sprklinginfo
sprklinginfo / html5.html
Created May 25, 2015 15:32
HTML5 start template
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title></title>
</head>
<body>
<h1>HTML5 start template</h1>
</body>
</html>
#!/bin/bash
# requires ghostscript (http://www.ghostscript.com/)
# requires ImageMagick
# requires tesseract (https://code.google.com/p/tesseract-ocr/)
# requires GNU parallel (https://www.gnu.org/software/parallel/)
# all of these are typically available through yum/apt/brew/etc.
# number of cores over which the process will be parallelized
num_cores=$1