This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$view = new view(); | |
$view->name = 'test_solr'; | |
$view->description = ''; | |
$view->tag = 'default'; | |
$view->base_table = 'islandora_solr'; | |
$view->human_name = 'test solr'; | |
$view->core = 7; | |
$view->api_version = '3.0'; | |
$view->disabled = FALSE; /* Edit this to true to make a default view disabled initially */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Number of objects,average time to download datastream | |
9879,0.22425223655914 | |
45096,0.079587544444444 | |
77467,0.13624490322581 | |
108640,0.088355711340206 | |
133895,0.10383455102041 | |
159749,0.091124947368421 | |
185478,0.15220051546392 | |
211806,0.14662007368421 | |
235972,0.15356125773196 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
# Supports md5, sha1, sha256, and sha512 | |
import hashlib | |
start_dir = '/home/mark/Pictures' | |
def generate_checksum_for_file(source_file_path, algorithm='md5'): | |
"""Generate and return a checksum for the file at source_file_path | |
using the specified algorithm. | |
""" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html> | |
<body> | |
<head><title>The document’s title</title> | |
</head> | |
<h1>A heading</h1> | |
<table> | |
<tr><td>120</td><td>389</td></tr> | |
</table> | |
<p>Some text</p> | |
</body> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$content_model_to_extension_map = array( | |
"islandora:sp-audioCModel" => array("mp3", "mp4a", "m4a", "oga", "ogg", "flac", "wav"), | |
"islandora:sp_basic_image" => array("jpeg", "jpe", "jpeg", "gif", "png"), | |
"islandora:sp_large_image_cmodel" => array("tiff", "tif", "jp2"), | |
"islandora:sp_pdf" => array("pdf"), | |
"islandora:sp_videoCModel" => array("mp4", "m4v", "mkv", "mpeg", "mpe","mpg", "qt", "mov", "ogv"), | |
"islandora:sp_web_archive" => array("warc"), | |
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<foxml:digitalObject VERSION="1.1" PID="islandora:sp_basic_image_collection" | |
xmlns:foxml="info:fedora/fedora-system:def/foxml#" | |
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | |
xsi:schemaLocation="info:fedora/fedora-system:def/foxml# http://www.fedora.info/definitions/1/0/foxml1-1.xsd"> | |
<foxml:objectProperties> | |
<foxml:property NAME="info:fedora/fedora-system:def/model#state" VALUE="Active"/> | |
<foxml:property NAME="info:fedora/fedora-system:def/model#label" VALUE="Basic Image Collection"/> | |
<foxml:property NAME="info:fedora/fedora-system:def/model#ownerId" VALUE="fedoraAdmin"/> | |
<foxml:property NAME="info:fedora/fedora-system:def/model#createdDate" VALUE="2015-06-30T22:02:43.975Z"/> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<foxml:digitalObject VERSION="1.1" PID="islandora:sp_basic_image_collection" | |
xmlns:foxml="info:fedora/fedora-system:def/foxml#" | |
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | |
xsi:schemaLocation="info:fedora/fedora-system:def/foxml# http://www.fedora.info/definitions/1/0/foxml1-1.xsd"> | |
<foxml:objectProperties> | |
<foxml:property NAME="info:fedora/fedora-system:def/model#state" VALUE="Active"/> | |
<foxml:property NAME="info:fedora/fedora-system:def/model#label" VALUE="Basic Image Collection"/> | |
<foxml:property NAME="info:fedora/fedora-system:def/model#ownerId" VALUE="fedoraAdmin"/> | |
<foxml:property NAME="info:fedora/fedora-system:def/model#createdDate" VALUE="2015-06-30T22:02:43.975Z"/> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Implements hook_islandora_datastream_access(). | |
*/ | |
function islandora_dev101_islandora_datastream_access($op, $object, $user) { | |
if ($op == 'view fedora repository objects') { | |
foreach ($object as $ds) { | |
if ($ds->id == 'DC') { | |
// file_put_contents('/tmp/myfile.txt', $ds->content); | |
dd($ds->content); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Implements hook_islandora_object_modified(). | |
*/ | |
function islandora_dev101_islandora_object_modified(AbstractObject $islandora_object) { | |
drupal_set_message("Owner: " . $islandora_object->owner); | |
// Bonus answer. | |
// $message = variable_get('islandora_dev101_message', 'This just happened: '); | |
// drupal_set_message($message . ': ' . $islandora_object->owner); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* d6to7_cck_textfield_length_checker.php, a script to find Drupal 6 | |
* CCK text fields that are longer than 255 characters. | |
* | |
* Written by Mark Jordan, mjordan@sfu.ca and released into the | |
* public domain. | |
* | |
* Upgrading to Drupal 7 from Drupal 6 instances that use CCK can |
OlderNewer