Initial commit.

This commit is contained in:
Erik C. Thauvin 2020-03-21 19:35:34 -07:00
commit 60c449feed
37 changed files with 1658 additions and 0 deletions

View file

@ -0,0 +1,20 @@
package com.example;
import net.thauvin.erik.isgd.Isgd;
public final class IsgdSample {
public static void main(final String[] args) {
if (args.length > 0) {
for (final String arg : args) {
if (arg.contains("is.gd")) {
System.out.println(arg + " <-- " + Isgd.lookup(arg));
} else {
System.out.println(arg + " --> " + Isgd.shorten(arg));
}
}
} else {
System.err.println("Try specifying one or more URLs as arguments.");
}
System.exit(0);
}
}

View file

@ -0,0 +1,18 @@
package com.example
import net.thauvin.erik.isgd.Isgd
import kotlin.system.exitProcess
fun main(args: Array<String>) {
if (args.isNotEmpty()) {
args.forEach {
if (it.contains("is.gd"))
println(it + " <-- " + Isgd.lookup(it))
else
println(it + " --> " + Isgd.shorten(it))
}
} else {
println("Try specifying one or more URLs as arguments.")
}
exitProcess(0)
}