module PaintSamplesRealS910
PaintSamples — real formatter output for S9–S10 plugins.
Constants
- ARCHEY_SAMPLE
- CODESTATS_FILES
Public Instance Methods
Source
# File lib/paint_samples/register_real_s9_s10.rb, line 52 def register_all PaintSamples.register("autoop") do AutoopReport.format_reply_card( title: "Auto-op status", body: "3 nicks pending voice", lag_ms: 42, ping_ms: 18 ).split("\n") end PaintSamples.register("autovoice") do AutovoiceReport.format_announcement( nick: "MeatAnt", count: 3, lag_ms: 42, ping_ms: 18 ).split("\n") end PaintSamples.register("rabbot_user") do user = Struct.new(:nick, :level) RabbotUser.format_user_list([ user.new("alice", "admin"), user.new("bob", "user") ]).split("\n") end PaintSamples.register("chan") do ChanReport.success(action: "joined", channel: "#redbackhooters", detail: "Rabbot is now in channel").split("\n") end PaintSamples.register("reminder") do entries = [{ "message" => "check the oven", "at" => Time.utc(2026, 6, 21, 10, 0, 0).iso8601, "seconds" => 3600, "nick" => "alice" }] Reminder.format_list_report(nick: "alice", entries: entries, now: Time.utc(2026, 6, 21, 9, 0, 0)).split("\n") end PaintSamples.register("bank") do Bank.format_open_success( nick: "alice", account: { "account_number" => "100042", "balance_cents" => 5000 } ).split("\n") end PaintSamples.register("stats") do body = ChannelStats.format_stats_report( top_nicks: [{ nick: "alice", count: 120 }, { nick: "bob", count: 88 }], busiest_hour: { hour: 21, count: 42 } ) [ IrcFormat.report_header(tag: "STATS", title: "#redbackhooters", style: Stats::STYLE_TITLE), body, IrcFormat.report_footer("channel activity") ].join("\n").split("\n") end PaintSamples.register("codestats") do Codestats.format_report(files: CODESTATS_FILES, project: "rabbot").split("\n") end PaintSamples.register("archey") do Archey.format_report(ARCHEY_SAMPLE).split("\n") end PaintSamples.register("asterisk") do Asterisk.format_status_report( version: "20.5.0", uptime: "10 days", channels: 4, calls: 0 ).split("\n") end PaintSamples.register("ai") do Ai.format_answer( "Brisbane weather is mild today.", model: "gpt-5", total_tokens: 120, duration_s: 2.1 ).split("\n") end PaintSamples.register("rabbot_meta") do themes_catalog = Object.new themes_catalog.define_singleton_method(:all) do [ { id: "neon", name: "Neon Wide", palette: { title: [52, 88], tag: [59, 92], accent: [56, 89], count: [1, 8], footer: [14] } }, { id: "fserve", name: "Fserve Classic", palette: { title: [0, 4], tag: [9], accent: [1, 8], count: [1, 8], footer: [14] } } ] end [ *RabbotMetaBuild.format_plan_question_reply( prompt: "Which API should the plugin use?", options: [{ label: "REST" }, { label: "GraphQL" }] ).split("\n"), *RabbotMetaBuild.format_build_conflict_reply( plugin_name: "pizza", reason: "An enhancement for pizza is already queued." ).split("\n"), *RabbotMetaColorsReport.format_code(52).split("\n"), *RabbotMetaColorsReport.format_named_pair(:title, 52, 88).split("\n"), *RabbotMetaColorsThemes.format_spectrum.split("\n"), *RabbotMetaColorsThemes.format_themes_list(catalog: themes_catalog).split("\n") ] end PaintSamples.register("bot") do Bot.format_status( id: "rabbot", name: "Rabbot", state: :running, pid: 4242, enabled: true, level: RabbotDb::LEVEL_OWNER ).split("\n") end PaintSamples.register("directchat") do DirectchatSession.format_start_reply( session: { channel: "#redbackhooters", bot_count: 2, assignments: [ { bot: "Rabbot", participant: "alice" }, { bot: "Steve", participant: "bob" } ] } ).split("\n") end PaintSamples.register("mircruby") do Mircruby.format_list_reply( bridges: { "lab" => { "owner" => "alice", "last_ping" => "42ms" } } ).split("\n") end PaintSamples.register("recipe") do Recipe.format_show_report( { id: 1, nick: "alice", title: "Pavlova", source: "nan", ingredients: ["4 egg whites", "1 cup sugar"], instructions: ["Beat egg whites.", "Bake until crisp."] } ).split("\n") end PaintSamples.register("draw") do DrawCore.format_reply( entry: { "filename" => "sunset.png", "nick" => "alice", "prompt" => "sunset over Brisbane" }, art_lines: [" .-'\"'-.", " / \\o/ \\"], model: "dall-e", duration_s: 8.4 ).split("\n") end PaintSamples.register("urban") do Urban.format_miss("lel").split("\n") end end