{"id":22621452,"url":"https://github.com/cca/libraries_bookreader","last_synced_at":"2025-03-29T02:24:34.759Z","repository":{"id":35749425,"uuid":"40028581","full_name":"cca/libraries_bookreader","owner":"cca","description":"CCA Libraries implementation of Open Library Bookreader","archived":false,"fork":false,"pushed_at":"2024-03-16T01:05:25.000Z","size":1199,"stargazers_count":0,"open_issues_count":2,"forks_count":1,"subscribers_count":18,"default_branch":"main","last_synced_at":"2025-02-03T12:35:21.922Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://libraries.cca.edu/static/bookreader/","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/cca.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2015-07-31T23:20:30.000Z","updated_at":"2024-03-16T02:53:52.000Z","dependencies_parsed_at":"2025-02-03T12:41:37.030Z","dependency_job_id":null,"html_url":"https://github.com/cca/libraries_bookreader","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cca%2Flibraries_bookreader","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cca%2Flibraries_bookreader/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cca%2Flibraries_bookreader/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cca%2Flibraries_bookreader/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cca","download_url":"https://codeload.github.com/cca/libraries_bookreader/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246127783,"owners_count":20727789,"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":"2024-12-08T23:09:14.928Z","updated_at":"2025-03-29T02:24:34.733Z","avatar_url":"https://github.com/cca.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# CCA Libraries Bookreader\n\nInteractive bookreader used in [VAULT](https://vault.cca.edu) for displaying artist's books. A customized version of [Internet Archive's Bookreader](https://github.com/internetarchive/bookreader). The version in package.json of this project is meant to track the version of IA's bookreader we're using.\n\n## Development Notes\n\nIf you have `npm` you can run `npm run demo` to open a sample artist book on a local web server.\n\nTwo `grunt` tasks are available:\n\n- `grunt build` minifies JS, CSS, \u0026 copies production files in a \"dist\" directory\n- `grunt watch` watches the JS, CSS, \u0026 index.html files for changes \u0026 then builds\n\nOur Customizations live primarily in the js/app.js file, which is based off of bookreader/BookReaderDemo/BookReaderJSAdvanced.js, and in the SCSS files in the \"css\" directory.\n\n## Publishing changes\n\nWe host the app [on VAULT](https://vault.cca.edu/items/79e553bc-a84c-4610-b6d7-190a90dbb268/1/) to avoid problems with CORS (cross-origin resource restrictions, VAULT content being unable to be loaded on other domains). To publish code changes:\n\n- run the included `./publi.sh` script to build the app, zip it up, \u0026 open the VAULT item\n- login to VAULT if need be\n- **edit this version** under the Actions menu\n- **delete** the previous attachment zip\n- upload the new attachment zip\n- **edit** the attachment\n- click the **Unzip files** button\n- **save** in attachments dialog\n- **save** the item\n\nTo test, you do the same with a different item and then edit that item's URL into the artists' books item template (under the Libraries eResources collection in the equella_templates project).\n\n## VAULT \u0026 File URLs\n\nVAULT interacts with the Bookreader by constructing special links filled with item metadata that tell the Bookreader how to render a particular item's attachments as a book. Here's an example:\n\n{{book.reader.domain}}/?_title_=**Awesome%20Book**\u0026_id_=**d79ea3fb-6d87-4003-9b40-9b322dcd87fc**\u0026_version_=**1**\u0026_filenames_=**page**\u0026_pages_=**9**\n\nI've made the _keys_ italics in the query string and their **values** bold to highlight what information is passed. Here are the meanings of these fields and how the bookreader uses them:\n\n- **title** is used to render a link in the upper left \u0026 set the `\u003ctitle\u003e` of the page\n- **id** is the VAULT item's UUID\n- **version** is the VAULT item's version\n- **filenames** are the filename prefixes in front of each page number, e.g. for files like \"page1.jpg\" they would be \"page\"\n- **pages** is the number of pages (indexed from 1, not 0)\n\nMost of these pieces of information are used to determine what VAULT file URL corresponds to which book page number. The information is parsed out of the URL's query string and serialized in a global `vaultItem` object which app.js then uses to set certain configurations for the Open Library Bookreader.\n\n## Links\n\n- [Internet Archive Bookreader documentation](https://openlibrary.org/dev/docs/bookreader)\n- [CCA Color Values](https://sites.google.com/cca.edu/librarieswiki/home/design/color-values) (libraries only)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcca%2Flibraries_bookreader","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcca%2Flibraries_bookreader","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcca%2Flibraries_bookreader/lists"}