Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Re-branding to copper-multibase #20

Merged
merged 5 commits into from
Nov 20, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# These are supported funding model platforms

github: [filip26]
patreon: # Replace with a single Patreon username
open_collective: # Replace with a single Open Collective username
ko_fi: # Replace with a single Ko-fi username
tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
liberapay: # Replace with a single Liberapay username
issuehunt: # Replace with a single IssueHunt username
otechie: # Replace with a single Otechie username
custom: ["https://wise.com/share/filipk558", 'https://paypal.me/FilipKolarik']
2 changes: 1 addition & 1 deletion .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ updates:
- package-ecosystem: "maven" # See documentation for possible values
directory: "/" # Location of package manifests
schedule:
interval: "daily"
interval: "weekly"
22 changes: 22 additions & 0 deletions .github/workflows/java8-build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# This workflow will build a Java project with Maven
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-maven

name: Java 8 CI

on:
pull_request:
branches: [ main ]

jobs:
build:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- name: Set up JDK 1.8
uses: actions/setup-java@v1
with:
java-version: 1.8
- name: Build with Maven
run: mvn -f pom.xml package
36 changes: 5 additions & 31 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,42 +1,16 @@
## Numeric Id Encoder/Decoder.
# Copper Multibase Encoder and Decoder.

Just another variation on Base32 encoding.
A Java implementation of [Multibase](https://github.com/multiformats/multibase).

![Java CI with Maven](https://github.com/filip26/id32/workflows/Java%20CI%20with%20Maven/badge.svg?branch=master)
[![Maintainability Rating](https://sonarcloud.io/api/project_badges/measure?project=filip26_id32&metric=sqale_rating)](https://sonarcloud.io/dashboard?id=filip26_id32)
[![Coverage](https://sonarcloud.io/api/project_badges/measure?project=filip26_id32&metric=coverage)](https://sonarcloud.io/dashboard?id=filip26_id32)
![Java CI with Maven](https://github.com/filip26/copper-multibase/workflows/Java%20CI%20with%20Maven/badge.svg?branch=master)
[![Maven Central](https://img.shields.io/maven-central/v/com.apicatalog/id32.svg?label=Maven%20Central)](https://search.maven.org/search?q=g:%22com.apicatalog%22%20AND%20a:%22id32%22)
[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)

### Goals
- ``URL`` / ``URI`` / ``IRI`` safe
- one case letters and digits only
- low transcription error rate
- low risk of accidental profanity
### Features
- Btc58 encoding [WiP]

### Examples
```java
// default alphabet
Id32.encodeLong(823543l) : "3R8Z"
Id32.encodeLong(8922003266371364727l) : "8ZWK1SC2XBJ5Z"

Id32.decodeLong("JKYZ3YY") : 10000000000l
Id32.decodeLong("BYYYYY") : 33554432l

Id32.decodeLong("iphone") == Id32.decodeLong("1PH0NE") : 618545224

// custom alphabet
Id32.encodeLong(123456l, Alphabet.of('X', 'Z', ...));
```

### Default Alphabet
```
'Y', 'B', 'N', 'D', 'R',
'F', 'G', '8', 'E', 'J',
'K', 'M', 'C', 'P', 'Q',
'X', '0', 'T', '1', 'V',
'W', 'L', 'S', 'Z', '2',
'3', '4', '5', 'H', '7',
'6', '9'
```
Letters A,I,O and U are excluded.
203 changes: 102 additions & 101 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,79 +3,80 @@
xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
>
>

<modelVersion>4.0.0</modelVersion>
<groupId>com.apicatalog</groupId>
<artifactId>id32</artifactId>
<version>3.0</version>
<artifactId>copper-multibase</artifactId>
<version>4.0-SNAPSHOT</version>
<packaging>jar</packaging>

<name>Id32</name>
<inceptionYear>2020</inceptionYear>
<description>
Just another numeric id encoder/decoder.
<name>Copper Multibase</name>

<inceptionYear>2020</inceptionYear>

<description>
An implementation of multibase encoder/decoder.
</description>
<url>https://github.com/filip26/id32</url>

<url>https://github.com/filip26/copper-multibase</url>

<licenses>
<license>
<name>Apache License, Version 2.0</name>
<url>http://apache.org/licenses/LICENSE-2.0</url>
</license>
</licenses>
</licenses>

<issueManagement>
<system>github</system>
<url>https://github.com/filip26/id32/issues</url>
<url>https://github.com/filip26/copper-multibase/issues</url>
</issueManagement>

<scm>
<connection>scm:git:git://github.com/filip26/id32.git</connection>
<developerConnection>scm:git:git://github.com/filip26/id32.git</developerConnection>
<url>https://github.com/filip26/id32</url>
<connection>scm:git:git://github.com/filip26/copper-multibase.git</connection>
<developerConnection>
scm:git:git://github.com/filip26/copper-multibase.git</developerConnection>
<url>https://github.com/filip26/copper-multibase</url>
</scm>

<developers>
<developer>
<id>filip26</id>
<name>Filip Kolarik</name>
<email>filip26@gmail.com</email>
<roles><role>author</role></roles>
<id>filip26</id>
<name>Filip Kolarik</name>
<email>filip26@gmail.com</email>
<roles>
<role>author</role>
</roles>
</developer>
</developers>

<properties>
<maven.compiler.target>11</maven.compiler.target>
<maven.compiler.source>11</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
<maven.compiler.source>1.8</maven.compiler.source>

<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>

<junit.version>4.13.2</junit.version>
<sonar.projectKey>filip26_id32</sonar.projectKey>

<sonar.projectKey>filip26_id32</sonar.projectKey>
<sonar.organization>apicatalog</sonar.organization>
<sonar.host.url>https://sonarcloud.io</sonar.host.url>
</properties>

<dependencies>

<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>${junit.version}</version>
<scope>test</scope>
</dependency>

</dependencies>

<build>
<build>
<plugins>
<plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
<version>3.2.1</version>
Expand Down Expand Up @@ -121,78 +122,78 @@
</execution>
</executions>
</plugin>
<plugin>
<plugin>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.22.2</version>
</plugin>
<plugin>
</plugin>
<plugin>
<artifactId>maven-failsafe-plugin</artifactId>
<version>2.22.2</version>
</plugin>
</plugins>
</plugin>
</plugins>
</build>

<profiles>
<profile>
<id>maven-central</id>

<activation>
<activeByDefault>false</activeByDefault>
</activation>

<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-gpg-plugin</artifactId>
<version>3.0.1</version>
<executions>
<execution>
<id>sign-artifacts</id>
<phase>verify</phase>
<goals>
<goal>sign</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.sonatype.plugins</groupId>
<artifactId>nexus-staging-maven-plugin</artifactId>
<version>1.6.8</version>
<extensions>true</extensions>
<configuration>
<serverId>ossrh</serverId>
<nexusUrl>https://oss.sonatype.org/</nexusUrl>
<autoReleaseAfterClose>true</autoReleaseAfterClose>
</configuration>
</plugin>
</plugins>
</build>

<distributionManagement>
<snapshotRepository>
<id>ossrh</id>
<url>https://oss.sonatype.org/content/repositories/snapshots</url>
</snapshotRepository>
</distributionManagement>
</profile>
<profile>
<id>github-packages</id>

<activation>
<activeByDefault>false</activeByDefault>
</activation>

<distributionManagement>
<repository>
<id>github</id>
<name>GitHub filip26 Apache Maven Packages</name>
<url>https://maven.pkg.github.com/filip26/id32</url>
</repository>
</distributionManagement>
</profile>
</profiles>
<profiles>
<profile>
<id>maven-central</id>

<activation>
<activeByDefault>false</activeByDefault>
</activation>

<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-gpg-plugin</artifactId>
<version>3.0.1</version>
<executions>
<execution>
<id>sign-artifacts</id>
<phase>verify</phase>
<goals>
<goal>sign</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.sonatype.plugins</groupId>
<artifactId>nexus-staging-maven-plugin</artifactId>
<version>1.6.8</version>
<extensions>true</extensions>
<configuration>
<serverId>ossrh</serverId>
<nexusUrl>https://oss.sonatype.org/</nexusUrl>
<autoReleaseAfterClose>true</autoReleaseAfterClose>
</configuration>
</plugin>
</plugins>
</build>

<distributionManagement>
<snapshotRepository>
<id>ossrh</id>
<url>https://oss.sonatype.org/content/repositories/snapshots</url>
</snapshotRepository>
</distributionManagement>
</profile>

<profile>
<id>github-packages</id>

<activation>
<activeByDefault>false</activeByDefault>
</activation>

<distributionManagement>
<repository>
<id>github</id>
<name>GitHub filip26 Apache Maven Packages</name>
<url>https://maven.pkg.github.com/filip26/copper-multibase</url>
</repository>
</distributionManagement>
</profile>
</profiles>

</project>
Loading