mirror of
https://github.com/corda/corda.git
synced 2025-06-18 23:28:21 +00:00
Wish our users a merry Christmas and a happy new year.
This commit is contained in:
@ -7,6 +7,7 @@ object Emoji {
|
|||||||
// Unfortunately only Apple has a terminal that can do colour emoji AND an emoji font installed by default.
|
// Unfortunately only Apple has a terminal that can do colour emoji AND an emoji font installed by default.
|
||||||
val hasEmojiTerminal by lazy { System.getenv("TERM_PROGRAM") == "Apple_Terminal" }
|
val hasEmojiTerminal by lazy { System.getenv("TERM_PROGRAM") == "Apple_Terminal" }
|
||||||
|
|
||||||
|
const val CODE_SANTA_CLAUS = "\ud83c\udf85"
|
||||||
const val CODE_DIAMOND = "\ud83d\udd37"
|
const val CODE_DIAMOND = "\ud83d\udd37"
|
||||||
const val CODE_BAG_OF_CASH = "\ud83d\udcb0"
|
const val CODE_BAG_OF_CASH = "\ud83d\udcb0"
|
||||||
const val CODE_NEWSPAPER = "\ud83d\udcf0"
|
const val CODE_NEWSPAPER = "\ud83d\udcf0"
|
||||||
@ -22,6 +23,7 @@ object Emoji {
|
|||||||
*/
|
*/
|
||||||
val emojiMode = ThreadLocal<Any>()
|
val emojiMode = ThreadLocal<Any>()
|
||||||
|
|
||||||
|
val santaClaus: String get() = if (emojiMode.get() != null) "$CODE_SANTA_CLAUS " else ""
|
||||||
val diamond: String get() = if (emojiMode.get() != null) "$CODE_DIAMOND " else ""
|
val diamond: String get() = if (emojiMode.get() != null) "$CODE_DIAMOND " else ""
|
||||||
val bagOfCash: String get() = if (emojiMode.get() != null) "$CODE_BAG_OF_CASH " else ""
|
val bagOfCash: String get() = if (emojiMode.get() != null) "$CODE_BAG_OF_CASH " else ""
|
||||||
val newspaper: String get() = if (emojiMode.get() != null) "$CODE_NEWSPAPER " else ""
|
val newspaper: String get() = if (emojiMode.get() != null) "$CODE_NEWSPAPER " else ""
|
||||||
|
@ -17,6 +17,7 @@ import org.slf4j.LoggerFactory
|
|||||||
import java.lang.management.ManagementFactory
|
import java.lang.management.ManagementFactory
|
||||||
import java.net.InetAddress
|
import java.net.InetAddress
|
||||||
import java.nio.file.Paths
|
import java.nio.file.Paths
|
||||||
|
import java.time.LocalDate
|
||||||
import kotlin.system.exitProcess
|
import kotlin.system.exitProcess
|
||||||
|
|
||||||
private var renderBasicInfoToConsole = true
|
private var renderBasicInfoToConsole = true
|
||||||
@ -122,6 +123,13 @@ private fun printPluginsAndServices(node: Node) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private fun messageOfTheDay(): Pair<String, String> {
|
private fun messageOfTheDay(): Pair<String, String> {
|
||||||
|
// TODO: Remove this next year.
|
||||||
|
val today = LocalDate.now()
|
||||||
|
if (today.isAfter(LocalDate.of(2016, 12, 20)) && today.isBefore(LocalDate.of(2017, 1, 3))) {
|
||||||
|
val claus = if (Emoji.hasEmojiTerminal) Emoji.santaClaus else ""
|
||||||
|
return Pair("The Corda team wishes you a very merry", "christmas and a happy new year! $claus")
|
||||||
|
}
|
||||||
|
|
||||||
val messages = arrayListOf(
|
val messages = arrayListOf(
|
||||||
"The only distributed ledger that pays\nhomage to Pac Man in its logo.",
|
"The only distributed ledger that pays\nhomage to Pac Man in its logo.",
|
||||||
"You know, I was a banker once ...\nbut I lost interest. ${Emoji.bagOfCash}",
|
"You know, I was a banker once ...\nbut I lost interest. ${Emoji.bagOfCash}",
|
||||||
@ -151,7 +159,7 @@ private fun drawBanner() {
|
|||||||
/ ____/ _________/ /___ _
|
/ ____/ _________/ /___ _
|
||||||
/ / __ / ___/ __ / __ `/ """).fgBrightBlue().a(msg1).newline().fgBrightRed().a(
|
/ / __ / ___/ __ / __ `/ """).fgBrightBlue().a(msg1).newline().fgBrightRed().a(
|
||||||
"/ /___ /_/ / / / /_/ / /_/ / ").fgBrightBlue().a(msg2).newline().fgBrightRed().a(
|
"/ /___ /_/ / / / /_/ / /_/ / ").fgBrightBlue().a(msg2).newline().fgBrightRed().a(
|
||||||
"""\____/ /_/ \__,_/\__,_/""").reset().newline().newline().fgBrightDefault().
|
"""\____/ /_/ \__,_/\__,_/""").reset().newline().newline().fgBrightDefault().bold().
|
||||||
a("--- DEVELOPER SNAPSHOT ------------------------------------------------------------").newline().reset())
|
a("--- DEVELOPER SNAPSHOT ------------------------------------------------------------").newline().reset())
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user