Created
November 22, 2024 00:21
-
-
Save tomcook/25e64df1f72597cbad4b63eae3760c1a to your computer and use it in GitHub Desktop.
atproto / python rich text length checker
This file contains 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
import random | |
import string | |
import regex | |
from atproto import Client, client_utils | |
client = Client() | |
client.login('username', 'pass') | |
characters = string.ascii_letters | |
random_string = ''.join(random.choices(characters, k=295)) | |
print(random_string) | |
post_content = client_utils.TextBuilder().text(random_string).link('Zombo', "https://www.zombo.com") | |
skeet_graphemes = regex.findall(r'\X', post_content.build_text()) | |
print(len(skeet_graphemes)) | |
post = client.send_post(post_content) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment