Skip to content

Instantly share code, notes, and snippets.

View sigilante's full-sized avatar
☢️

Sigilante sigilante

☢️
View GitHub Profile
@crides
crides / sigil.jq
Last active August 31, 2020 21:12
def get_sigil($pos):
map(
if .name == "circle" or .name == "path" or .name == "line" then .attributes."stroke-width" = 3 else . end
| "<\(.name) \(.attributes | to_entries | map("\(.key)=\"\(.value)\"") | join(" "))></\(.name)>")
| join("\n")
| "<g transform=\"translate(\($pos % 2 * 128),\($pos / 2 | floor * 128))\">\(.)</g>";
# "matrix(0.65544921875,0,0,0.65544921875,\([35, 121.10249999999999] | "\(.[$pos % 2]),\(.[$pos / 2 | floor])"))" as $trans
def get_sigil_word($name):
. as $map