module PaintSamplesRealS11
PaintSamples — real formatter output for S11 plugins.
Public Instance Methods
Source
# File lib/paint_samples/register_real_s11.rb, line 41 def register_all PaintSamples.register("msg") do Msg.format_delivery(target: "bob", from: "alice", message: "meet at the pub").split("\n") end PaintSamples.register("sms") do Sms.format_success_reply(phone: "+61400111222", quota_remaining: 8, text_id: "abc123").split("\n") end PaintSamples.register("dcc") do Dcc.format_list_report( files: [{ "filename" => "readme.txt", "size" => 1024, "nick" => "alice" }] ).split("\n") end PaintSamples.register("huggingface") do sections = { popular: [{ id: "meta-llama/Llama-3.1-8B-GGUF", downloads: 120_000, pipeline_tag: "text-generation" }], recent: [{ id: "mistralai/Mistral-7B-GGUF", downloads: 42_000, pipeline_tag: "text-generation" }], trending: [{ id: "Qwen/Qwen2.5-7B-GGUF", downloads: 80_000, pipeline_tag: "text-generation" }] } hardware = { primary_name: "RTX 4090", primary_memory_gb: 24, device_count: 1 } Huggingface.format_recommend_reply(sections, hardware: hardware).split("\n") end PaintSamples.register("logbook") do BotLogStore.format_recent_report( bot_id: "rabbot", entries: [{ "at" => Time.utc(2026, 6, 21, 10, 0, 0).iso8601, "kind" => "message", "channel" => "#redbackhooters", "nick" => "alice", "text" => "plugin reload: bom" }], lines: 5 ).split("\n") end PaintSamples.register("man") do parsed = { name: "ls", section: "1", synopsis: "list directory contents" } ManLookup.format_reply(parsed, command: "ls", section: "1", source: "coreutils").split("\n") end PaintSamples.register("wine") do results = [{ name: "Steam", rating: "Platinum", id: 0 }] WinehqSearch.format_search_reply("steam", results).split("\n") end PaintSamples.register("define") do fetch_json = lambda do |_url| { "en" => [{ "definitions" => [{ "definition" => "An exclamation of amusement." }] }] } end Define.lookup("lel", fetch_json: fetch_json).split("\n") end PaintSamples.register("pubcrawl") do Pubcrawl.lookup("brisbane", fetch: ->(_url) { "<html><body>No results</body></html>" }).split("\n") end PaintSamples.register("lotto") do Lotto.lookup(fetch: ->(_url) { "<html><body>Draw 1234</body></html>" }).split("\n") end PaintSamples.register("surf") do Surf.lookup("gold coast", fetch: ->(_url) { "<html><body>2-3ft</body></html>" }).split("\n") end PaintSamples.register("king") do [ IrcFormat.report_header(tag: "KING", title: "daily crown", style: King::STYLE_TITLE), "alice rules today with 120 messages", IrcFormat.report_footer("2026-06-21") ].join("\n").split("\n") end PaintSamples.register("quote") do Quote.format_quote({ nick: "alice", text: "To iterate is human, to recurse divine." }).split("\n") end PaintSamples.register("ozb") do Ozb.build_report([ { title: "Half-price coffee machine", url: "https://www.ozbargain.com.au/deals/123" } ]).split("\n") end PaintSamples.register("kfc") do KfcMenu.format_report( store: { name: "KFC Brisbane City", address: "Queen St", id: "store-42" }, promo_items: [{ name: "Zinger Box", price: "$12.95" }], menu_items: [{ name: "Original Recipe", price: "$3.50" }] ).split("\n") end PaintSamples.register("redrooster") do RedRoosterAuth.format_login_reply( profile: { name: "alice", points: 420, tier: "Gold" } ).split("\n") end PaintSamples.register("animal") do items = [{ title: "Koala rescued from highway", paragraph: "Wildlife officers moved the koala to safer habitat.", source: "Google News" }] AnimalNews.format_report("koala", items, emoji: "🐨").split("\n") end PaintSamples.register("taboo") do game = { "stage" => "active", "word" => "kangaroo", "taboo" => %w[australia marsupial hop], "scores" => { "alice" => 2, "bob" => 1 } } TabooGame.format_status(game).split("\n") end PaintSamples.register("chain") do game = { "stage" => "active", "chain" => %w[apple eagle engine], "turn" => "alice" } ChainGame.format_status(game).split("\n") end PaintSamples.register("pitch") do game = { "stage" => "active", "ideas" => ["weather plugin", "trivia bot"], "votes" => { "alice" => 0 } } PitchGame.format_status(game).split("\n") end PaintSamples.register("rpg") do RpgGame.format_room(RpgGame.new_game).split("\n") end PaintSamples.register("google") do IrcReply.card( tag: "GOOGLE", title: "rabbot irc bot", body_lines: ["https://github.com/example/rabbot"], footer_parts: ["Google search"] ).split("\n") end end