mirror of
https://github.com/corda/corda.git
synced 2025-02-02 01:08:09 +00:00
Added CordaCon to node startup banner
This commit is contained in:
parent
64ba8d3a88
commit
ef8deba07c
@ -27,6 +27,9 @@ object Emoji {
|
|||||||
@JvmStatic val CODE_BOOKS: String = codePointsString(0x1F4DA)
|
@JvmStatic val CODE_BOOKS: String = codePointsString(0x1F4DA)
|
||||||
@JvmStatic val CODE_SLEEPING_FACE: String = codePointsString(0x1F634)
|
@JvmStatic val CODE_SLEEPING_FACE: String = codePointsString(0x1F634)
|
||||||
@JvmStatic val CODE_LIGHTBULB: String = codePointsString(0x1F4A1)
|
@JvmStatic val CODE_LIGHTBULB: String = codePointsString(0x1F4A1)
|
||||||
|
@JvmStatic val CODE_FREE: String = codePointsString(0x1F193)
|
||||||
|
@JvmStatic val CODE_SOON: String = codePointsString(0x1F51C)
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* When non-null, toString() methods are allowed to use emoji in the output as we're going to render them to a
|
* When non-null, toString() methods are allowed to use emoji in the output as we're going to render them to a
|
||||||
@ -44,6 +47,8 @@ object Emoji {
|
|||||||
val books: String get() = if (emojiMode.get() != null) "$CODE_BOOKS " else ""
|
val books: String get() = if (emojiMode.get() != null) "$CODE_BOOKS " else ""
|
||||||
val sleepingFace: String get() = if (emojiMode.get() != null) "$CODE_SLEEPING_FACE " else ""
|
val sleepingFace: String get() = if (emojiMode.get() != null) "$CODE_SLEEPING_FACE " else ""
|
||||||
val lightBulb: String get() = if (emojiMode.get() != null) "$CODE_LIGHTBULB " else ""
|
val lightBulb: String get() = if (emojiMode.get() != null) "$CODE_LIGHTBULB " else ""
|
||||||
|
val free: String get() = if (emojiMode.get() != null) "$CODE_FREE " else ""
|
||||||
|
val soon: String get() = if (emojiMode.get() != null) "$CODE_SOON " else ""
|
||||||
|
|
||||||
// These have old/non-emoji symbols with better platform support.
|
// These have old/non-emoji symbols with better platform support.
|
||||||
val greenTick: String get() = if (emojiMode.get() != null) "$CODE_GREEN_TICK " else "✓"
|
val greenTick: String get() = if (emojiMode.get() != null) "$CODE_GREEN_TICK " else "✓"
|
||||||
|
@ -3,12 +3,12 @@ package net.corda.node.internal
|
|||||||
import com.jcabi.manifests.Manifests
|
import com.jcabi.manifests.Manifests
|
||||||
import com.typesafe.config.ConfigException
|
import com.typesafe.config.ConfigException
|
||||||
import joptsimple.OptionException
|
import joptsimple.OptionException
|
||||||
import net.corda.core.*
|
|
||||||
import net.corda.core.crypto.commonName
|
import net.corda.core.crypto.commonName
|
||||||
import net.corda.core.crypto.orgName
|
import net.corda.core.crypto.orgName
|
||||||
import net.corda.core.internal.*
|
import net.corda.core.internal.*
|
||||||
import net.corda.node.VersionInfo
|
|
||||||
import net.corda.core.node.services.ServiceInfo
|
import net.corda.core.node.services.ServiceInfo
|
||||||
|
import net.corda.core.then
|
||||||
|
import net.corda.core.thenMatch
|
||||||
import net.corda.core.utilities.loggerFor
|
import net.corda.core.utilities.loggerFor
|
||||||
import net.corda.node.*
|
import net.corda.node.*
|
||||||
import net.corda.node.serialization.NodeClock
|
import net.corda.node.serialization.NodeClock
|
||||||
@ -28,6 +28,7 @@ import java.lang.management.ManagementFactory
|
|||||||
import java.net.InetAddress
|
import java.net.InetAddress
|
||||||
import java.nio.file.Path
|
import java.nio.file.Path
|
||||||
import java.nio.file.Paths
|
import java.nio.file.Paths
|
||||||
|
import java.time.LocalDate
|
||||||
import java.util.*
|
import java.util.*
|
||||||
import kotlin.system.exitProcess
|
import kotlin.system.exitProcess
|
||||||
|
|
||||||
@ -303,6 +304,12 @@ open class NodeStartup(val args: Array<String>) {
|
|||||||
"Top tip: never say \"oops\", instead\nalways say \"Ah, Interesting!\"",
|
"Top tip: never say \"oops\", instead\nalways say \"Ah, Interesting!\"",
|
||||||
"Computers are useless. They can only\ngive you answers. -- Picasso"
|
"Computers are useless. They can only\ngive you answers. -- Picasso"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
// TODO: Delete this after CordaCon.
|
||||||
|
val cordaCon2017date = LocalDate.of(2017, 9, 12)
|
||||||
|
val cordaConBanner = if (LocalDate.now() < cordaCon2017date)
|
||||||
|
"${Emoji.soon} Register for our Free CordaCon event : see https://goo.gl/Z15S8W" else ""
|
||||||
|
|
||||||
if (Emoji.hasEmojiTerminal)
|
if (Emoji.hasEmojiTerminal)
|
||||||
messages += "Kind of like a regular database but\nwith emojis, colours and ascii art. ${Emoji.coolGuy}"
|
messages += "Kind of like a regular database but\nwith emojis, colours and ascii art. ${Emoji.coolGuy}"
|
||||||
val (msg1, msg2) = messages.randomOrNull()!!.split('\n')
|
val (msg1, msg2) = messages.randomOrNull()!!.split('\n')
|
||||||
@ -316,6 +323,8 @@ open class NodeStartup(val args: Array<String>) {
|
|||||||
a("--- ${versionInfo.vendor} ${versionInfo.releaseVersion} (${versionInfo.revision.take(7)}) -----------------------------------------------").
|
a("--- ${versionInfo.vendor} ${versionInfo.releaseVersion} (${versionInfo.revision.take(7)}) -----------------------------------------------").
|
||||||
newline().
|
newline().
|
||||||
newline().
|
newline().
|
||||||
|
a(cordaConBanner).
|
||||||
|
newline().
|
||||||
reset())
|
reset())
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user