Skip to content

Instantly share code, notes, and snippets.

@kurone-kito
Created September 20, 2024 18:52
Show Gist options
  • Save kurone-kito/5597dc91a9653d045cfdde8a79e72478 to your computer and use it in GitHub Desktop.
Save kurone-kito/5597dc91a9653d045cfdde8a79e72478 to your computer and use it in GitHub Desktop.
VTuber黒音キトの、活動スケジュール
/// The activity type
typealias ActivityType = "release" | "streaming"
/// The date
typealias Date = String(matches(Regex(#"^[0-9]{4}-[0-9]{2}-[0-9]{2}$"#)))
/// The day
typealias Day = Duration(isBetween(0.d, 6.d))
/// The time span
typealias Span = Duration(isBetween(1.min, 24.h))
/// The time
typealias Time = String(matches(Regex(#"^[0-9]{2}:[0-9]{2}$"#)))
/// The activity
class Activity {
/// The activity type
type: ActivityType?
/// The activity name
name: String
}
/// The time range
class TimeRange {
/// The start time
start: Time
/// The time length in minutes
min: Int? = span?.toUnit("min")?.value.toInt()
/// The time length
hidden span: Span?
}
/// The schedule of the activity
class Schedule {
/// The date
date: Int = day.toUnit("d").value.toInt()
/// The date
hidden day: Day
/// The key of the activity
hidden key: String
/// The name of the activity
name: String = activities[key].name
/// The time
time: (Time | TimeRange)?
/// The type of the activity
type: ActivityType? = activities[key].type
}
/// The schedules
class Schedules {
/// The start date
start: Date
/// The schedules
schedules: Listing<Schedule>
}
/// The games activities
const gameActivities = new Mapping<String, Activity> {
["s:apex"] = new {
type = "streaming"
name = "🔫 APEX Legends 実況プレイ"
}
["s:cresteaju"] = new {
type = "streaming"
name = "🍅 Cresteaju 二週目 実況プレイ"
}
["s:dark-deception"] = new {
type = "streaming"
name = "🐒 Dark Deception 実況プレイ"
}
["s:mahjong"] = new {
type = "streaming"
name = "🀄️ 雀魂実況プレイ"
}
["s:minecraft"] = new {
type = "streaming"
name = "🧱 Minecraft 実況プレイ"
}
["s:vrchat"] = new {
type = "streaming"
name = "🌐 VRChat 実況プレイ"
}
["s:watermelon"] = new {
type = "streaming"
name = "🍉 スイカゲームの実況プレイ"
}
["s:birthday"] = new {
type = "release"
name = "🎂 黒音キト誕生日!雑談配信"
}
}
/// The development activities
const devActivities = new Mapping<String, Activity> {
["r:dantalion"] = new {
type = "release"
name = "😈 Dantalion アップデート"
}
["r:launchpad-icons"] = new {
type = "release"
name = "🚀 Launchpad Icons アップデート"
}
["r:lints-config"] = new {
type = "release"
name = "🧹 Lints-config アップデート"
}
["r:pnpm"] = new {
type = "release"
name = "📄 pnpm-project-template アップデート"
}
["r:toybox"] = new {
type = "release"
name = "🛠️ U# Toybox アップデート"
}
["r:vpm"] = new {
type = "release"
name = "📄 vpm-project-template アップデート"
}
["r:vrcui"] = new {
type = "release"
name = "✅ VRCUI アップデート"
}
["r:yarn"] = new {
type = "release"
name = "📄 yarn-project-boilerplate アップデート"
}
["s:dantalion"] = new {
type = "streaming"
name = "😈 Dantalion Web 制作作業"
}
["s:kit.black"] = new {
type = "streaming"
name = "🌐 黒音キト Web ページのリテイク作業"
}
["s:launchpad-icons"] = new {
type = "streaming"
name = "🚀 Launchpad Icons 制作作業"
}
["s:miau"] = new {
type = "streaming"
name = "🐈 VRChat ワールド: Miaŭ 制作作業"
}
["s:oneiron"] = new {
type = "streaming"
name = "🃏 ChatGPT とバトロワ風カードゲーム企画&制作作業"
}
["s:the-mind-mirror"] = new {
type = "streaming"
name = "🪞 VRChat ワールド: THE MIND MIRROR 制作作業"
}
["s:toybox"] = new {
type = "streaming"
name = "🛠️ U# Toybox 制作作業"
}
["s:vrcui"] = new {
type = "streaming"
name = "✅ VRCUI 制作作業"
}
}
/// The event activities
const eventActivities = new Mapping<String, Activity> {
["engineer"] = new {
name = "🍺 VRC エンジニア作業飲み集会に参加"
}
["frontend"] = new {
name = "🌐 VRC Web フロントエンド集会に参加"
}
["indie"] = new {
name = "💻 VRC 個人開発集会に参加"
}
["javascript"] = new {
name = "🍪 Cluster JavaScript 雑談会に参加"
}
["meow"] = new {
name = "🐱 VRC にゃんにゃん集会 開催"
}
["nighthawk"] = new {
name = "🥱 VRC よふかしさんのつながり集会に参加"
}
["sleep"] = new {
name = "💤 VRC みんなで VR 睡眠"
}
["ui-ux"] = new {
name = "🎨 VRC UI/UX デザイン集会 開催"
}
}
/// The activities
const activities = (
devActivities.toMap() +
eventActivities.toMap() +
gameActivities.toMap()
).toMapping()
/// The schedules
const schedules = new Schedules {
start = "2024-09-21"
schedules = new Listing<Schedule> {
new Schedule {
day = 0.d
key = "r:pnpm"
}
new Schedule {
day = 1.d
key = "s:apex"
time = new TimeRange {
start = "20:00"
span = 1.5.h
}
}
new Schedule {
day = 1.d
key = "meow"
time = new TimeRange {
start = "22:00"
span = 80.min
}
}
new Schedule {
day = 1.d
key = "sleep"
time = new TimeRange {
start = "23:20"
span = 8.h + 10.min
}
}
new Schedule {
day = 2.d
key = "s:kit.black"
time = new TimeRange {
start = "21:00"
span = 3.h
}
}
new Schedule {
day = 3.d
key = "s:kit.black"
time = new TimeRange {
start = "22:30"
span = 1.5.h
}
}
new Schedule {
day = 4.d
key = "r:launchpad-icons"
}
new Schedule {
day = 5.d
key = "indie"
time = new TimeRange {
start = "22:30"
span = 1.h
}
}
new Schedule {
day = 6.d
key = "javascript"
time = new TimeRange {
start = "22:30"
span = 1.h
}
}
}
}
output {
value = schedules
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment