It's such a simple thing to foget, but I don't think I've ever showed anybody how my website's cross-poster actually works. So let's record a video of the actual process, warts and all.
#Webdev #Video #Tutorials #Rss #Programming #Metadata #Mastodon #HashTags #MetaData #GUI #UI #Finished #Experiments #LevelEditor #Software #GameDesign #GameDev #Design #project_MastodonCrossPoster
#webdev #video #tutorials #rss #programming #metadata #mastodon #hashtags #gui #ui #finished #experiments #leveleditor #software #gamedesign #gamedev #design #project_mastodoncrossposter
I finally added alt-text to my website's update-feed editor.
The point of this editor was to make it easy for me to keep people informed with minimal effort.
I added pictures to make the text look interesting enough to read. But... sometimes they also show something relevant, and encouraging people to include alt-text seems noble, so I decided to at least add the option. I do write stories sometimes. It's reasonable that a blind person might want to know about them.
Now it's working.
I could either live dangrously and not sanitize anything, or... be only slightly less reckless and make an exception for escape codes. It's probably fine.
Well... no. But it's probably working. My website's just sanitizing the update posts.
Okay, now for the real test!
This post is being uploaded by my cross-posted to both Mastodon and my website. Will these look correct on both?
🎮 Game
📖 Story / Comic
📽 Video
✏️ Pencil
✍ Writing Hand
💾 Software
🎓 Tutorial
💡 Idea
❓ Question (already works)
🔗 Link
↘ Arrow (escaped)
↘ Arrow (literal)
#x1f3ae #x1f4d6 #x1f4fd #x1f4be #x1f393 #x1f4a1 #x1f517 #x2198 #project_mastodoncrossposter
Also multi-codepoint does NOT mean multi-byte. Apparently the emoji's that are immune to escape codes are the ones that combine multiple emoji's together, like: brown-family-of-four-women... with antennas.
Apparently the answer to my technical problem is just... look up the codes on emojipedia.
... and just pray that website never ever goes down during my lifetime.
https://emojipedia.org/
Well okay, these are standard codes so there will probably be other places to look them up. You know, like ASCii codes.
... except for the ones that don't.
↘
Fuck it, let's just pretend it's part of the code we see on Emojipedia and not worry about it.
#x2198 #project_mastodoncrossposter
Success!
Also, you ARE supposed to include the 1. It's just not techically part of the code, it's part of the (extremely long) escape prefix.
& # x 1
All of that is just the prefix! An overly elaborate warning to tell the browser that you're about to enter a code. And every code will needs this...
Apparently the 1 in that code is purely decorative. (why?!)
So the controller's code is F3AE not 1F3AE
... Something that doesn't work. That's what.
That's strange. Emojipedia says the game controller DOES have a HEX code... a 5-digit hex code?? Also, this doesn't match what the HEX editor says. Where are they getting these codes from?
Hmm... what's a "shortcode?"
Well that sucks. Apparently multi-codepoint emoji's don't work with escape codes.
https://www.webnots.com/how-to-insert-emoji-in-html/
Is it because I'm using HEX?
... No the hex code for the lion works.
Well that didn't work.
Now... how do I look up the emoji's I want?
... How do I look up the hexadecimal codes of the... oh wait... I already did.
It looks like this will work! Escape codes don't care about encoding. They just use basic numbers and characters within the ancient ASCii character-space, which every encoding supports.
Maybe there's a way to tell NodeJS to open the JSON files with a different UTF? I'd have to guess until I found one that worked.
But maybe I don't have to. I might be able to get away with using HTML escape codes instead. It would look ugly in my Flash cross-poster, but who cares? All the outputs go to websites, and all websites use HTML.