{"id":22601851,"url":"https://github.com/nationalarchives/oci-tools-scala","last_synced_at":"2025-03-28T20:35:57.747Z","repository":{"id":57743729,"uuid":"261285691","full_name":"nationalarchives/oci-tools-scala","owner":"nationalarchives","description":"Omega Catalog Identifier tools (Scala)","archived":false,"fork":false,"pushed_at":"2023-12-18T09:42:56.000Z","size":65,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":8,"default_branch":"main","last_synced_at":"2025-02-03T04:48:37.501Z","etag":null,"topics":["catalogue","encoding","identifier","oci"],"latest_commit_sha":null,"homepage":null,"language":"Scala","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/nationalarchives.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2020-05-04T20:14:16.000Z","updated_at":"2022-04-12T13:40:46.000Z","dependencies_parsed_at":"2023-12-18T10:54:15.596Z","dependency_job_id":null,"html_url":"https://github.com/nationalarchives/oci-tools-scala","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/nationalarchives%2Foci-tools-scala","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nationalarchives%2Foci-tools-scala/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nationalarchives%2Foci-tools-scala/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nationalarchives%2Foci-tools-scala/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nationalarchives","download_url":"https://codeload.github.com/nationalarchives/oci-tools-scala/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246099639,"owners_count":20723457,"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":["catalogue","encoding","identifier","oci"],"created_at":"2024-12-08T12:17:12.143Z","updated_at":"2025-03-28T20:35:56.693Z","avatar_url":"https://github.com/nationalarchives.png","language":"Scala","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Omega Catalog Identifier tools (Scala)\n \n[![Build Status](https://travis-ci.com/nationalarchives/oci-tools-scala.png?branch=master)](https://travis-ci.com/nationalarchives/oci-tools-scala)\n[![Build status](https://ci.appveyor.com/api/projects/status/s8ps0eyulq9mqo6k/branch/master?svg=true)](https://ci.appveyor.com/project/AdamRetter/oci-tools-scala/branch/master)\n[![Scala 2.13](https://img.shields.io/badge/scala-2.13-red.svg)](http://scala-lang.org)\n[![License](https://img.shields.io/badge/license-MIT-blue.svg)](https://opensource.org/licenses/MIT)\n[![Maven Central](https://maven-badges.herokuapp.com/maven-central/uk.gov.nationalarchives.oci/oci-tools-scala_2.13/badge.svg)](https://search.maven.org/search?q=g:uk.gov.nationalarchives.oci)\n \n**Note**: There is also an alternative implementation in TypeScript available at:\nhttps://github.com/nationalarchives/oci-tools-ts\n\nThis project is split into two parts:\n1. a library ([`BaseCoder.scala`](https://github.com/nationalarchives/oci-tools-scala/blob/master/src/main/scala/uk/gov/nationalarchives/oci/BaseCoder.scala))\nwhich can be used in other projects.\n\n2. a command line tool ([`Main.scala`](https://github.com/nationalarchives/oci-tools-scala/blob/master/src/main/scala/uk/gov/nationalarchives/oci/Main.scala))\nwhich is useful in itself and also serves as an example of using the `BaseCoder.scala` library.\n\n\n## Examples of Command Line tool use\nEncoding to Base16 (e.g. hexadecimal):\n```bash\n❯ target/scala-2.13/oci-tools-scala-assembly-0.4.0.jar encode --round-trip 16 123456 HEX\nInput: 123456\nEncoded: '1E240'\nRound-trip decoded: '123456'\n```\n\nEncoding to GCR b25 (e.g. as used by DRI for digital records):\n```bash\n❯ target/scala-2.13/oci-tools-scala-assembly-0.4.0.jar encode --round-trip 25 123456 GCRb25\nInput: 123456\nEncoded: 'K5RJ'\nRound-trip decoded: '123456'\n```\n\nEncoding to OCI b25 (e.g. as used by Project Omega):\n```bash\n❯ target/scala-2.13/oci-tools-scala-assembly-0.4.0.jar encode --round-trip 25 123456 OCIb25\nInput: 123456\nEncoded: '8WJ7'\nRound-trip decoded: '123456'\n```\n\nEncoding to CTD b25 (e.g. as used by Project TDR):\n```bash\n❯ target/scala-2.13/oci-tools-scala-assembly-0.4.0.jar encode --round-trip 25 123456 CTDb25\nInput: 123456\nEncoded: '9TH8'\nRound-trip decoded: '123456'\n```\n\n**EXPERIMENTAL:** There is also support for experimental URI encoding using a Base78 and Base68 alphabet, built-in as: `OCIb78` and `OCIb68`.\n\n### Compiling the Command Line tool\nTo build from source you will need the following pre-requisites:\n\n1. Git Command Line tools.\n2. Java 8+\n3. SBT (Simple Build Tool) 1.1.2+\n\nIf you wish to create a standalone application (also known as an Uber Jar, Assembly, etc.)\nyou can run `sbt assembly`, which will generate `target/scala-2.13/oci-tools-scala-assembly-0.4.0.jar`.\n\n### Running the Command Line tool\nGiven the standalone application, you can execute it by running either:\n\n1. `java -jar oci-tools-scala-assembly-0.4.0.jar`\n\n2. or, even by just executing the `oci-tools-scala-assembly-0.4.0.jar` file directly, as we\ncompile an executable header into the Jar file. e.g. (on Linux/Mac): `./oci-tools-scala-assembly-0.4.0.jar`.\n\n\n## Publishing a Release to Maven Central\n1. Run `sbt clean release`\n2. Answer the questions\n3. Login to https://oss.sonatype.org/ then Close, and Release the Staging Repository\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnationalarchives%2Foci-tools-scala","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnationalarchives%2Foci-tools-scala","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnationalarchives%2Foci-tools-scala/lists"}