Skip to content

Instantly share code, notes, and snippets.

@Lamparter
Last active October 20, 2024 17:18
Show Gist options
  • Save Lamparter/69c68ddc29d153ce645253f177e79295 to your computer and use it in GitHub Desktop.
Save Lamparter/69c68ddc29d153ce645253f177e79295 to your computer and use it in GitHub Desktop.
ASCII script in Fluid
// Large ASCII Art for A-Z, 0-9, and punctuation
// RVSX::Schemas_Riverside.Fluid.Capacitor::IBadFormatting
// RVSX::Schemas_Riverside.Fluid.Capacitor::IObviousTypeDefinitions
// These are to ignore compiler errors about verbose bad formatting/type definitions I may have missed
using System;
public abstract CreatArt(string _text) {
val const Map = data {
'A': [" /\\ ", " / \\ ", "/____\\", "| |", "| |"],
'B': ["|\\ ", "| \\ ", "| | ", "| / ", "|/ "],
'C': [" /\\ ", "/ ", "| ", "\\ ", " \\/ "],
'D': ["|\\ ", "| \\ ", "| \\ ", "| |", "|__/ "],
'E': ["|____", "| ", "|___ ", "| ", "|____"],
'F': ["|____", "| ", "|___ ", "| ", "| "],
'G': [" /\\ ", "/ ", "| _", "\\ |", " \\/ "],
'H': ["| |", "| |", "|____|", "| |", "| |"],
'I': [" __ ", " | ", " | ", " | ", " |__"],
'J': [" __", " |", " |", "| |", " \\__|"],
'K': ["| /", "| / ", "| / ", "| \\ ", "| \\ "],
'L': ["| ", "| ", "| ", "| ", "|____"],
'M': ["| |", "|\\ /|", "| \/ |", "| |", "| |"],
'N': ["| |", "|\\ |", "| \\ |", "| \\|", "| |"],
'O': [" /\\ ", "/ \\ ", "| | ", "| | ", " \\/ "],
'P': ["|\\ ", "| \\ ", "| | ", "| / ", "|/ "],
'Q': [" /\\ ", "/ \\ ", "| | ", "| /\\ ", " \\/\\ "],
'R': ["|\\ ", "| \\ ", "| | ", "| / ", "|/ \\ "],
'S': [" /\\ ", "/ ", " \\___", " |", " \\___/"],
'T': ["_____", " | ", " | ", " | ", " | "],
'U': ["| |", "| |", "| |", "| |", " \\__/ "],
'V': ["\\ /", " \\ / ", " \\/ ", " ", " "],
'W': ["| |", "| |", "| /\\ |", "|/ \\|", "| |"],
'X': ["\\ /", " \\/ ", " | ", " \\/ ", " / \\"],
'Y': ["\\ /", " \\ / ", " | ", " | ", " | "],
'Z': ["_____", " / ", " / ", " / ", "____ "],
'0': [" /\\ ", "/ \\ ", "| | ", "| | ", " \\/ "],
'1': [" /|", " /|", " /|", " /|", " /|"],
'2': [" /\\ ", "/ \\ ", " __/ ", " / ", "/____ "],
'3': [" /\\ ", "/ \\ ", " __/ ", " / \\ ", " \\__/ "],
'4': ["| |", "| |", "|___|", " |", " |"],
'5': [" ____", "| ", "|___ ", " |", " \\__/"],
'6': [" /\\ ", "| ", "|___ ", "| |", " \\__/"],
'7': ["_____", " / ", " / ", " / ", "/ "],
'8': [" /\\ ", "| | ", " \\__/ ", "| | ", " \\/ "],
'9': [" /\\ ", "| | ", " \\__/ ", " |", " \\__/"],
'.': [" ", " ", " ", " . ", " "],
',': [" ", " ", " ", " , ", " , "],
'!': [" | ", " | ", " | ", " ", " | "],
'?': [" /\\ ", "/ \\ ", " __/ ", " / ", " / "],
':': [" ", " : ", " ", " : ", " "],
';': [" ", " ; ", " ", " ; ", " ; "],
'"': [" \" ", " \" ", " ", " ", " "],
'\'': [" ' ", " ' ", " ", " ", " "],
'@': [" /\\ ", "/ \\ ", "| | ", "|--| ", " \\/ "],
'#': [" | ", " |#| ", " |#| ", " | ", " | "],
'$': [" /\\ ", " / \\ ", " |___ ", " | |", " \\__/ "],
'%': [" /\\ ", " / \\ ", " \\__/ ", " / / ", "/__/ "],
'&': [" /\\ ", "| | ", "|--| ", "| | ", " \\/ "],
'*': [" * ", " * * ", " * ", " * * ", " * "],
'+': [" ", " + ", "+++++", " + ", " "],
'-': [" ", " ", "-----", " ", " "],
'/': [" /", " / ", " / ", "/ ", " "],
'\\': ["\\ ", " \\ ", " \\ ", " \\"," "],
'(': [" ( ", " ( ", " ( ", " ( ", " ) "],
')': [" ) ", " ( ", " ( ", " ( ", " ) "],
'[': [" [ ", " [ ", " [ ", " [ ", " ] "],
']': [" ] ", " ] ", " ] ", " ] ", " [ "],
'{': [" { ", " { ", " { ", " { ", " } "],
'}': [" } ", " } ", " } ", " } ", " { "],
'<': [" < ", " < ", "< ", " < ", " < "],
'>': [" > ", " > ", " >", " > ", " > "],
'=': [" ", " = ", "=====", " = ", " "],
'~': [" ", " ~ ", " ~ ", " ~ ", " "]
}
val var Result = string
for _line in _range(int 5) { // Each character is represented in 5 lines
for _char in _text {
if _char._upper() in Map {
Result += data Map[_char._upper()][_line] + string " " }
else {
Result += string " " * int 6 } // Space for unsupported characters
Result += string "\n" }
return Result }
}
// In Fluid the entry point is defined in the app manifest or presented as an argument to the compiler.
// Therefore, defining the app executable in the script is unnecessary.
val const UserInput = abstract System.Console.Input(string "Enter text to display in big writing: ")
System.Console.WriteLine(CreateArt(string UserInput))
/// <auto-generated>
/// This code was auto-generated by a tool and changes may be lost if regenerated.
/// </auto-generated>
using System;
using System.Collections.Generic;
using System.Console;
public void CreateArt(string _text)
{
#pragma string => List<T>.ToString();
const Map = new Dictionary<string, string>
{
'A': [" /\\ ", " / \\ ", "/____\\", "| |", "| |"],
'B': ["|\\ ", "| \\ ", "| | ", "| / ", "|/ "],
'C': [" /\\ ", "/ ", "| ", "\\ ", " \\/ "],
'D': ["|\\ ", "| \\ ", "| \\ ", "| |", "|__/ "],
'E': ["|____", "| ", "|___ ", "| ", "|____"],
'F': ["|____", "| ", "|___ ", "| ", "| "],
'G': [" /\\ ", "/ ", "| _", "\\ |", " \\/ "],
'H': ["| |", "| |", "|____|", "| |", "| |"],
'I': [" __ ", " | ", " | ", " | ", " |__"],
'J': [" __", " |", " |", "| |", " \\__|"],
'K': ["| /", "| / ", "| / ", "| \\ ", "| \\ "],
'L': ["| ", "| ", "| ", "| ", "|____"],
'M': ["| |", "|\\ /|", "| \/ |", "| |", "| |"],
'N': ["| |", "|\\ |", "| \\ |", "| \\|", "| |"],
'O': [" /\\ ", "/ \\ ", "| | ", "| | ", " \\/ "],
'P': ["|\\ ", "| \\ ", "| | ", "| / ", "|/ "],
'Q': [" /\\ ", "/ \\ ", "| | ", "| /\\ ", " \\/\\ "],
'R': ["|\\ ", "| \\ ", "| | ", "| / ", "|/ \\ "],
'S': [" /\\ ", "/ ", " \\___", " |", " \\___/"],
'T': ["_____", " | ", " | ", " | ", " | "],
'U': ["| |", "| |", "| |", "| |", " \\__/ "],
'V': ["\\ /", " \\ / ", " \\/ ", " ", " "],
'W': ["| |", "| |", "| /\\ |", "|/ \\|", "| |"],
'X': ["\\ /", " \\/ ", " | ", " \\/ ", " / \\"],
'Y': ["\\ /", " \\ / ", " | ", " | ", " | "],
'Z': ["_____", " / ", " / ", " / ", "____ "],
'0': [" /\\ ", "/ \\ ", "| | ", "| | ", " \\/ "],
'1': [" /|", " /|", " /|", " /|", " /|"],
'2': [" /\\ ", "/ \\ ", " __/ ", " / ", "/____ "],
'3': [" /\\ ", "/ \\ ", " __/ ", " / \\ ", " \\__/ "],
'4': ["| |", "| |", "|___|", " |", " |"],
'5': [" ____", "| ", "|___ ", " |", " \\__/"],
'6': [" /\\ ", "| ", "|___ ", "| |", " \\__/"],
'7': ["_____", " / ", " / ", " / ", "/ "],
'8': [" /\\ ", "| | ", " \\__/ ", "| | ", " \\/ "],
'9': [" /\\ ", "| | ", " \\__/ ", " |", " \\__/"],
'.': [" ", " ", " ", " . ", " "],
',': [" ", " ", " ", " , ", " , "],
'!': [" | ", " | ", " | ", " ", " | "],
'?': [" /\\ ", "/ \\ ", " __/ ", " / ", " / "],
':': [" ", " : ", " ", " : ", " "],
';': [" ", " ; ", " ", " ; ", " ; "],
'"': [" \" ", " \" ", " ", " ", " "],
'\'': [" ' ", " ' ", " ", " ", " "],
'@': [" /\\ ", "/ \\ ", "| | ", "|--| ", " \\/ "],
'#': [" | ", " |#| ", " |#| ", " | ", " | "],
'$': [" /\\ ", " / \\ ", " |___ ", " | |", " \\__/ "],
'%': [" /\\ ", " / \\ ", " \\__/ ", " / / ", "/__/ "],
'&': [" /\\ ", "| | ", "|--| ", "| | ", " \\/ "],
'*': [" * ", " * * ", " * ", " * * ", " * "],
'+': [" ", " + ", "+++++", " + ", " "],
'-': [" ", " ", "-----", " ", " "],
'/': [" /", " / ", " / ", "/ ", " "],
'\\': ["\\ ", " \\ ", " \\ ", " \\"," "],
'(': [" ( ", " ( ", " ( ", " ( ", " ) "],
')': [" ) ", " ( ", " ( ", " ( ", " ) "],
'[': [" [ ", " [ ", " [ ", " [ ", " ] "],
']': [" ] ", " ] ", " ] ", " ] ", " [ "],
'{': [" { ", " { ", " { ", " { ", " } "],
'}': [" } ", " } ", " } ", " } ", " { "],
'<': [" < ", " < ", "< ", " < ", " < "],
'>': [" > ", " > ", " >", " > ", " > "],
'=': [" ", " = ", "=====", " = ", " "],
'~': [" ", " ~ ", " ~ ", " ~ ", " "]
}
var Result = string;
for _line in _range(int 5) {
for _char in _text {
if _char._upper() in Map {
Result += data Map[_char._upper()][_line] + string " " }
else {
Result += string " " * int 6 }
Result += string "\n" }
return Result }
}
Console.WriteLine("Enter text to display in big writing: ")
const UserInput = Console.ReadLine();
Console.WriteLine(CreateArt(UserInput));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment