Skip to content

Instantly share code, notes, and snippets.

@atgmello
Created April 16, 2020 01:00
Show Gist options
  • Save atgmello/e57feaccd69a9062c603609565fd392e to your computer and use it in GitHub Desktop.
Save atgmello/e57feaccd69a9062c603609565fd392e to your computer and use it in GitHub Desktop.
Dracula says... 🧛
module Dracula
function says(s::String)::Nothing
dracula_ascii = "
_..._
.' '.
; __ __ ;
|/ \\ / \\|
|\\| -- ' -- |/|
|(| \\o| |o/ |)|
_\\| > |/_
.-' | ,.___., | '-.
\\ ; V'-'V ; /
`\\ \\ / /`
`\\ '-...-' /`
`\\ / \\ /`
jgs `\\\\_//`"
# Credits:
# https://www.oocities.org/spunk1111/haloween.htm?202015#vampire
upper_bubble = repeat("-",length(s)+1)
lower_bubble = repeat("-",length(s)+1)
v = repeat(" ",round(Int8,length(s)/2))
println(" $upper_bubble ")
println("| $(s) |")
println(" $lower_bubble ")
print("$(v)V")
println(dracula_ascii)
nothing
end
end
using .Dracula
function main(args::Vector{String})::Nothing
Dracula.says(args[1])
nothing
end
main(ARGS)
@atgmello
Copy link
Author

A simple Julia script to display an ASCII art of Dracula (credits for the art goes to https://www.oocities.org/spunk1111/haloween.htm?202015#vampire) saying whatever you'd like. Inpired by cowsay (for an even more awesome cowsay, check https://github.com/Code-Hex/Neo-cowsay).

Just run the script from the terminal passing a string as the first argument, as so:

$ julia ./dracula.jl "Bwahaha..."

For a cooler looking dracula, pipe the output to lolcat.

Usage example can be found at:
https://github.com/atgmello/dracula.omt

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment