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

Move ASCII art to a classpath resource #72

Merged
merged 1 commit into from
Aug 2, 2024
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
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@
*/
package io.polaris.service;

import static java.nio.charset.StandardCharsets.UTF_8;
import static java.util.Objects.requireNonNull;

import com.fasterxml.jackson.annotation.JsonAutoDetect;
import com.fasterxml.jackson.annotation.PropertyAccessor;
import com.fasterxml.jackson.databind.DeserializationFeature;
Expand Down Expand Up @@ -88,6 +91,8 @@
import jakarta.servlet.http.HttpServletRequest;
import java.io.Closeable;
import java.io.IOException;
import java.io.InputStream;
import java.net.URL;
import java.util.Collections;
import java.util.EnumSet;
import java.util.Map;
Expand All @@ -113,30 +118,14 @@ public static void main(final String[] args) throws Exception {
printAsciiArt();
}

private static void printAsciiArt() {
String bannerArt =
String.join(
"\n",
" @@@@ @@@ @ @ @@@@ @ @@@@ @@@@ @ @@@@@ @ @ @@@ @@@@ ",
" @ @ @ @ @ @ @ @ @ @ @@ @ @ @ @ @ @ @ @ @ @ ",
" @@@@ @ @ @ @@@@@ @@@@ @ @@ @ @@@@@ @ @@@@@ @ @ @ @ @@@",
" @ @@@ @@@@ @ @ @ @@ @ @@@@ @@@@ @ @ @ @@ @@ @@@@ @@@ @@@@ ",
" ",
" ",
" ",
" ",
" /////| ",
" //||///T||| ",
" ///|||////|||||| ",
" //||||T////||||||||| ",
" /T| //|||||T///T||//T|||||| ",
" //|||/////T||////||/////||||||| //|| ",
" //||||||T///////////////////T|||||||T||||| ",
" //||||/////T|//////////|///////T|||||T|||||||| ",
" //|||||/////|||T////////////////||||||/||||||||| ",
",,..,,,..,,,..,//||||////////||||||||||/////////|||||///||||||||||,,,..,,..,,,..,,,.",
",,..,,,..,,,..,,,..,,,..,,,..,,,..,,,..,,,..,,,..,,,..,,,..,,,..,,,..,,,.,,,..,,,..,");
System.out.println(bannerArt.replaceAll("\\|", "\\\\"));
private static void printAsciiArt() throws IOException {
URL url = PolarisApplication.class.getResource("banner.txt");
try (InputStream in =
requireNonNull(url, "banner.txt not found on classpath")
.openConnection()
.getInputStream()) {
System.out.println(new String(in.readAllBytes(), UTF_8));
}
}

@Override
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@

@@@@ @@@ @ @ @@@@ @ @@@@ @@@@ @ @@@@@ @ @ @@@ @@@@
@ @ @ @ @ @ @ @ @ @ @@ @ @ @ @ @ @ @ @ @ @
@@@@ @ @ @ @@@@@ @@@@ @ @@ @ @@@@@ @ @@@@@ @ @ @ @ @@@
@ @@@ @@@@ @ @ @ @@ @ @@@@ @@@@ @ @ @ @@ @@ @@@@ @@@ @@@@




/////\
//\\///T\\\
///\\\////\\\\\\
//\\\\T////\\\\\\\\\
/T\ //\\\\\T///T\\//T\\\\\\
//\\\/////T\\////\\/////\\\\\\\ //\\
//\\\\\\T///////////////////T\\\\\\\T\\\\\
//\\\\/////T\//////////\///////T\\\\\T\\\\\\\\
//\\\\\/////\\\T////////////////\\\\\\/\\\\\\\\\
,,..,,,..,,,..,//\\\\////////\\\\\\\\\\/////////\\\\\///\\\\\\\\\\,,,..,,..,,,..,,,.
,,..,,,..,,,..,,,..,,,..,,,..,,,..,,,..,,,..,,,..,,,..,,,..,,,..,,,..,,,.,,,..,,,..,
Loading