Add tweetshot.py, the X composer renderer for the #tweets automation - #28
Open
helloworld wants to merge 1 commit into
Open
Add tweetshot.py, the X composer renderer for the #tweets automation#28helloworld wants to merge 1 commit into
helloworld wants to merge 1 commit into
Conversation
The Tweet mockups automation curls this at run time and pipes each Slack message through it, so it lives here rather than inside the automation's instructions, which are capped at 8 KB.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds
tweetshot.py, which renders a line of text as a screenshot of the X (Twitter) composer:It lives here because the new Tweet mockups automation curls it at run time to reply to every message in #tweets: automation instructions are capped at 8 KB and the script is 12 KB. Until this merges the automation falls back to the raw URL on this branch.
Geometry, type and colours were matched pixel for pixel against the mockup Sashank posted: 642 css px wide at 2x device scale, 40 px avatar, Inter Tight at 16.7 px on a 20 px line, the composer icon strip embedded as a base64 PNG. Fonts come from Google Fonts at render time (Liberation Sans as fallback), emoji from Noto Color Emoji subset to the characters in the message, avatars from unavatar with a generated initial circle as last resort.
Tag
@indentto continue the conversation here.