This file contains hidden or 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
| langcode: en | |
| status: true | |
| dependencies: { } | |
| id: workbench_user | |
| label: Workbench user | |
| weight: 10 | |
| is_admin: null | |
| permissions: | |
| access administration pages |
This file contains hidden or 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
| """ | |
| Script to generate tiles for an image viewed using the Mirador Viewer. Also takes a screenshot | |
| of the page for quick QA of results. Input is a file containing a list of node IDs for nodes with | |
| an Islandora Model of Page or Image. | |
| This script should be run on a batch of Page or Image nodes prior to running generate_paged_content_iiif_manifests.py | |
| since IIIF Presentation manifest generation is much more reliable if the constituent images have already been pre-cached. | |
| Note: IIIF Presentation manifests for nodes with a Paged Content model are pre-cached by a different script, | |
| generate_paged_content_iiif_manifests.py. |
This file contains hidden or 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
| uuid: 71067709-d9ee-4c56-9d83-632911e4e5b2 | |
| langcode: en | |
| status: true | |
| dependencies: | |
| config: | |
| - core.entity_view_mode.node.teaser | |
| - field.storage.node.field_coordinates | |
| - filter.format.plain_text | |
| - node.type.islandora_object | |
| module: |
This file contains hidden or 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 sys | |
| import re | |
| date = sys.argv[1].strip() | |
| # nnnX? | |
| if re.match('^[1-2[1-9]{1,2}X\?', date): | |
| print(f"OK - {date} matches /nnnX?/.") | |
| # nXXX? | |
| elif re.match('^[1-2]XXX\?', date): |
This file contains hidden or 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 time | |
| def validate_date(date): | |
| """ | |
| Validates a yyyy-mm-dd date string. | |
| - **date**: the date string to validate. | |
| """ | |
| try: | |
| is_valid = time.strptime(date, '%Y-%m-%d') | |
| except ValueError: |
This file contains hidden or 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
| # Script to merge a secondary CSV file into a main CSV file. Columns not in a file are | |
| # added to the merged file as empty CSV cells. Records are joined on a required 'Nid' column. | |
| # Column headers should be unique in both files (other than 'Nid'); if they are present | |
| # in both files, both instances will be added to the merged file. | |
| import csv | |
| main_filename = 'input/main.csv' | |
| secondary_filename = 'input/secondary.csv' | |
| output_filename = 'input/test_output.csv' |
This file contains hidden or 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
| | Title (Goal) | Render complex objects that are not paged or images | | |
| | --- | --- | | |
| | Primary Actor | Site Builder | | |
| | Scope | Islandora Site Architecture | | |
| | Level | Medium? | | |
| | Story | As a site builder, I want to ... | |
This file contains hidden or 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
| #!/bin/bash | |
| SOLR_HOST='http://192.168.50.111:8080' | |
| SOLR_URL="$SOLR_HOST/solr/select?q=*:*&wt=csv&rows=0&facet&fl=mods_*" | |
| curl -s -o mods_elements.txt "$SOLR_URL" | |
| sed 's/,/\n/g' mods_elements.txt > mods_elements_one_per_line.txt | |
| sed 's/_mlt$// ; s/_ms$// ; s/_mt$// ; s/_s$// ; s/_ss$// ; s/_t$// ; s/_all$// ; s/_dt$// ; s/_mdt$//' mods_elements_one_per_line.txt > mods_elements_one_per_line.txt.pruned | |
| sort mods_elements_one_per_line.txt.pruned > mods_elements_one_per_line.txt.pruned.sorted | |
| uniq mods_elements_one_per_line.txt.pruned.sorted > mods_elements.txt |
This file contains hidden or 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 | |
| // src/DataFixtures/AppFixtures.php | |
| namespace App\DataFixtures; | |
| use App\Entity\FixityCheckEvent; | |
| use Doctrine\Bundle\FixturesBundle\Fixture; | |
| use Doctrine\Common\Persistence\ObjectManager; | |
| use Ramsey\Uuid\Uuid; | |
| class AppFixtures extends Fixture |
This file contains hidden or 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
| // Construct Authorization header using jwt token. | |
| $container = \Drupal::getContainer(); | |
| $jwt = $container->get('jwt.authentication.jwt'); | |
| $auth = 'Bearer ' . $jwt->generateToken(); | |
| $client = \Drupal::httpClient(); | |
| $options = [ | |
| 'auth' => [], | |
| 'headers' => ['Authorization' => $auth], | |
| 'form_params' => [] | |
| ]; |
NewerOlder