{"id":24093192,"url":"https://github.com/umd-lib/pcdm-manifests","last_synced_at":"2025-10-08T05:20:39.746Z","repository":{"id":12763878,"uuid":"69691592","full_name":"umd-lib/pcdm-manifests","owner":"umd-lib","description":"Utility to generate IIIF Manifests from PCDM objects","archived":false,"fork":false,"pushed_at":"2024-12-18T21:28:49.000Z","size":265,"stargazers_count":2,"open_issues_count":0,"forks_count":5,"subscribers_count":11,"default_branch":"main","last_synced_at":"2025-05-07T05:06:07.417Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/umd-lib.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-09-30T18:28:53.000Z","updated_at":"2024-12-04T16:01:12.000Z","dependencies_parsed_at":"2024-05-03T15:43:43.570Z","dependency_job_id":"d7ba6e85-92fb-4144-8494-662aac6d8b56","html_url":"https://github.com/umd-lib/pcdm-manifests","commit_stats":null,"previous_names":[],"tags_count":33,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/umd-lib%2Fpcdm-manifests","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/umd-lib%2Fpcdm-manifests/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/umd-lib%2Fpcdm-manifests/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/umd-lib%2Fpcdm-manifests/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/umd-lib","download_url":"https://codeload.github.com/umd-lib/pcdm-manifests/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252817010,"owners_count":21808705,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-01-10T09:25:41.385Z","updated_at":"2025-10-08T05:20:39.649Z","avatar_url":"https://github.com/umd-lib.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# pcdm-manifests\n\nImplementation of the [IIIF Presentation\nAPI](http://iiif.io/api/presentation/2.1/) that generates IIIF Manifests from\n[PCDM](https://pcdm.org/) objects in a Fedora repository.\n\n## Quick Start\n\nRequires Ruby v3.0.6\n\n```zsh\ngit clone git@github.com:umd-lib/pcdm-manifests.git\ncd pcdm-manifests\n\ngem install bundler\nbundle install\nrails server\n```\n\nJSON manifests of an issue can be obtained by making an HTTP GET request in the\nfollowing format.\n\n```zsh\ncurl http://localhost:3000/manifests/IIIF_ID/manifest\n```\n\nThe general structure of the `IIIF_ID` is `prefix:id`. The exact format of the\n`id` varies by handler.\n\n## Handlers\n\n### fcrepo\n\n* **Prefix:** `fcrepo`\n* **ID:** The URL_encoded repository path to the resource (part of the PCDM\n  resource URI after the Fedora base URI). There is also a shorthand that uses\n  `::` to indicate the presence of a 4-element pairtree before a UUID.\n\n#### Example\n\n|                   |Value|\n|-------------------|-----|\n|**Fedora URI**     |\u003chttps://fcrepolocal/fcrepo/rest/pcdm/ab/b4/b3/04/abb4b304-5e96-478f-8abb-8c5aafd42223\u003e|\n|**Fedora Base URI**|\u003chttps://fcrepolocal/fcrepo/rest/\u003e|\n|**IIIF ID**        |fcrepo:pcdm%2Fab%2Fb4%2Fb3%2F04%2Fabb4b304-5e96-478f-8abb-8c5aafd42223\u003cbr\u003e*OR*\u003cbr\u003efcrepo:pcdm::abb4b304-5e96-478f-8abb-8c5aafd42223|\n|**Manifest URI**   |\u003chttp://localhost:3000/manifests/fcrepo:ab%2Fb4%2Fb3%2F04%2Fabb4b304-5e96-478f-8abb-8c5aafd42223/manifest\u003e\u003cbr\u003e*OR*\u003cbr\u003e\u003chttp://localhost:3000/manifests/fcrepo:pcdm::abb4b304-5e96-478f-8abb-8c5aafd42223/manifest\u003e|\n\n### fedora2\n\n* **Prefix:** `fedora2`\n* **ID:** The `umd:` PID of the resource.\n\n## Configuration\n\nThe following environment variables are used to configure the services used by\nPCDM Manifests in production:\n\n|Variable           |Purpose|\n|-------------------|-------|\n|`SOLR_URL`         |URL of the Solr core to query; this core must have a `pcdm` request handler|\n|`FCREPO_URL`       |Base URL of the Fedora repository|\n|`FEDORA2_URL`      |Base URL of the Fedora 2 repository|\n|`FEDORA2_SOLR_URL` |URL of the Solr core to query for the Fedora 2 metadata|\n|`FCREPO_SOLR_URL`  |Should be set to the same as `SOLR_URL`|\n|`IIIF_IMAGE_URL`   |Base URL for the IIIF Image API service|\n|`IIIF_MANIFEST_URL`|Base URL for this service|\n\nSee [config/iiif.yml](config/iiif.yml) for examples.\n\n## Docker\n\nThis repository contains a [Dockerfile](Dockerfile) for building a deployable\nimage of this application:\n\n```zsh\n# build an image tagged with the current application version\nVERSION=\"$(rails app:version)\" .\ndocker build -t \"pcdm-manifests:$VERSION\" .\n\n# build an image tagged with the current application version, plus the current\n# git commit hash (useful for development builds)\nVERSION=\"$(rails app:version)-$(git rev-parse --short=8 HEAD)\" .\ndocker build -t \"pcdm-manifests:$VERSION\" .\n```\n\nTo run the image, bind port 3000 to 3000 on localhost:\n\n```zsh\ndocker run -it --rm -p 3000:3000 -e RAILS_ENV='development' \"pcdm-manifests:$VERSION\"\n```\n\nThere should be a simple splash page at \u003chttp://localhost:3000/\u003e\n\n## Building the Docker Image for K8s Deployment\n\nThe following procedure uses the Docker \"buildx\" functionality and the\nKubernetes \"build\" namespace to build the Docker image. This procedure should\nwork on both \"arm64\" and \"amd64\" MacBooks.\n\nThe image will be automatically pushed to the Nexus.\n\n### Local Machine Setup\n\nSee \u003chttps://github.com/umd-lib/k8s/blob/main/docs/DockerBuilds.md\u003e in\nGitHub for information about setting up a MacBook to use the Kubernetes\n\"build\" namespace.\n\n### Creating the Docker image\n\n1. In an empty directory, checkout the Git repository and switch into the\n   directory:\n\n    ```zsh\n    $ git clone git@github.com:umd-lib/pcdm-manifests.git\n    $ cd pcdm-manifests\n    ```\n\n2. Checkout the appropriate Git tag, branch, or commit for the Docker image.\n\n3. Set up an \"APP_TAG\" environment variable:\n\n    ```zsh\n    $ export APP_TAG=\u003cDOCKER_IMAGE_TAG\u003e\n    ```\n\n   where \\\u003cDOCKER_IMAGE_TAG\u003e is the Docker image tag to associate with the\n   Docker image. This will typically be the Git tag for the application version,\n   or some other identifier, such as a Git commit hash. For example, using the\n   Git tag of \"1.2.0\":\n\n    ```zsh\n    $ export APP_TAG=1.2.0\n    ```\n\n    Alternatively, to use the Git branch and commit:\n\n    ```zsh\n    $ export GIT_BRANCH=`git rev-parse --abbrev-ref HEAD`\n    $ export GIT_COMMIT_HASH=`git rev-parse HEAD`\n    $ export APP_TAG=${GIT_BRANCH}-${GIT_COMMIT_HASH}\n    ```\n\n4. Switch to the Kubernetes \"build\" namespace:\n\n    ```bash\n    $ kubectl config use-context build\n    ```\n\n5. Create the \"docker.lib.umd.edu/pcdm-manifests\" Docker image:\n\n    ```bash\n    $ docker buildx build --no-cache --platform linux/amd64 --push --no-cache \\\n        --builder=kube  -f Dockerfile -t docker.lib.umd.edu/pcdm-manifests:$APP_TAG .\n    ```\n\n   The Docker image will be automatically pushed to the Nexus.\n\n## License\n\nSee the [LICENSE](LICENSE.md) file for license rights and limitations (Apache\n2.0).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fumd-lib%2Fpcdm-manifests","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fumd-lib%2Fpcdm-manifests","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fumd-lib%2Fpcdm-manifests/lists"}