├── 09_hellomotoot ├── .gitignore ├── favicon.ico ├── audio │ ├── beep.mp3 │ ├── boop.mp3 │ ├── error.mp3 │ ├── intro.mp3 │ ├── 2_mentions.mp3 │ ├── 3_boopsound.mp3 │ ├── pleasehold.mp3 │ ├── pleaserate.mp3 │ ├── wrongrating.mp3 │ ├── correctrating.mp3 │ ├── pleaseregister.mp3 │ └── 1_recordmessage.mp3 ├── templates │ ├── index.html │ ├── manage.html │ ├── footer.html │ └── header.html └── hellomotoot.py ├── README.md ├── requirements.txt ├── 07_florps ├── templates │ ├── form_post.htm │ ├── post_content.htm │ ├── post_list.htm │ ├── button_boost.htm │ ├── post_actions.htm │ ├── button_fav.htm │ ├── post.htm │ ├── login.htm │ └── authed.htm ├── ui_data.json └── florps.py ├── 06_mastomash ├── templates │ ├── post_content.htm │ ├── post_actions.htm │ ├── login.htm │ └── authed.htm ├── mastomash.py └── ui_data.json ├── 08_trunkshow ├── templates │ ├── post_list.htm │ ├── enter.htm │ └── gallery.htm └── trunkshow.py ├── tooling ├── app_data_registry.py ├── login_oauth.py └── secret_registry.py ├── .gitignore ├── 01_latency_observatory ├── latency_web.py └── latencies.py ├── 03_clippy ├── templates │ ├── authed.htm │ └── login.htm └── clippy.py ├── 04_alphant ├── templates │ ├── login.htm │ └── authed.htm └── alphant.py ├── 02_nicer_latency_observatory ├── latency_web.py └── latencies.py └── 05_toot_it_forward ├── templates └── login.htm └── tootitforward.py /09_hellomotoot/.gitignore: -------------------------------------------------------------------------------- 1 | *.db 2 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Mastodon.py Examples 2 | -------------------------------------------------------------------------------- /09_hellomotoot/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/halcy/MastodonpyExamples/HEAD/09_hellomotoot/favicon.ico -------------------------------------------------------------------------------- /09_hellomotoot/audio/beep.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/halcy/MastodonpyExamples/HEAD/09_hellomotoot/audio/beep.mp3 -------------------------------------------------------------------------------- /09_hellomotoot/audio/boop.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/halcy/MastodonpyExamples/HEAD/09_hellomotoot/audio/boop.mp3 -------------------------------------------------------------------------------- /09_hellomotoot/audio/error.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/halcy/MastodonpyExamples/HEAD/09_hellomotoot/audio/error.mp3 -------------------------------------------------------------------------------- /09_hellomotoot/audio/intro.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/halcy/MastodonpyExamples/HEAD/09_hellomotoot/audio/intro.mp3 -------------------------------------------------------------------------------- /09_hellomotoot/audio/2_mentions.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/halcy/MastodonpyExamples/HEAD/09_hellomotoot/audio/2_mentions.mp3 -------------------------------------------------------------------------------- /09_hellomotoot/audio/3_boopsound.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/halcy/MastodonpyExamples/HEAD/09_hellomotoot/audio/3_boopsound.mp3 -------------------------------------------------------------------------------- /09_hellomotoot/audio/pleasehold.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/halcy/MastodonpyExamples/HEAD/09_hellomotoot/audio/pleasehold.mp3 -------------------------------------------------------------------------------- /09_hellomotoot/audio/pleaserate.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/halcy/MastodonpyExamples/HEAD/09_hellomotoot/audio/pleaserate.mp3 -------------------------------------------------------------------------------- /09_hellomotoot/audio/wrongrating.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/halcy/MastodonpyExamples/HEAD/09_hellomotoot/audio/wrongrating.mp3 -------------------------------------------------------------------------------- /09_hellomotoot/audio/correctrating.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/halcy/MastodonpyExamples/HEAD/09_hellomotoot/audio/correctrating.mp3 -------------------------------------------------------------------------------- /09_hellomotoot/audio/pleaseregister.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/halcy/MastodonpyExamples/HEAD/09_hellomotoot/audio/pleaseregister.mp3 -------------------------------------------------------------------------------- /09_hellomotoot/audio/1_recordmessage.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/halcy/MastodonpyExamples/HEAD/09_hellomotoot/audio/1_recordmessage.mp3 -------------------------------------------------------------------------------- /requirements.txt: -------------------------------------------------------------------------------- 1 | locket 2 | flask 3 | mastodon.py 4 | numpy 5 | matplotlib 6 | validators 7 | torch 8 | torchvision 9 | torchaudio 10 | transformers 11 | fast-pytorch-kmeans 12 | htmx 13 | twilio 14 | qrcode 15 | -------------------------------------------------------------------------------- /07_florps/templates/form_post.htm: -------------------------------------------------------------------------------- 1 |
-------------------------------------------------------------------------------- /07_florps/templates/post_content.htm: -------------------------------------------------------------------------------- 1 | {{ process_emoji(post.content, post.emojis)|safe }} 2 | {% if post.poll %} 3 | (Polls unsupported) 4 | {% endif %} 5 | {% for attachment in post.media_attachments %} 6 | 7 |This app allows you to post toots to Mastodon using SMS messages or by calling! It's like twitter back in the day, except better, because it's not twitter!
4 |Enter your full Mastodon username (user@domain.com) to begin:
5 |You're logged in as: {{ masto_user_full }}
4 | {% if phone_number != "" %} 5 |Current phone number: {{ phone_number }}. You're set up for posting, just send your messages or give a call to {{ phone_reg_number }}!
6 | {% endif %} 7 |To set a phone number, send a SMS with text --register-{{ phone_reg_code }} to {{ phone_reg_number }} or scan the following QR code if you're too lazy to type:
8 |(boring qr code for bad phones)
11 | 12 | {% include 'footer.html' %} 13 | -------------------------------------------------------------------------------- /07_florps/ui_data.json: -------------------------------------------------------------------------------- 1 | { 2 | "post_verbs": ["bop"], 3 | "post_verbs_past": ["bopped"], 4 | "emoji_left": ["ᐊ"], 5 | "emoji_right": ["ᐅ"], 6 | "client_name": ["Florps"], 7 | "boost_verbs": ["amplify"], 8 | "boost_verbs_past": ["amplified"], 9 | "fav_verbs": ["florp"], 10 | "reply_verbs": ["respond"], 11 | "logged_in_phrases": ["you are:"], 12 | "log_out_phrases": ["Revoke"], 13 | "open_verbs": ["Show"], 14 | "other_stuff_phrases": ["Other Mastodon experiments"], 15 | "next_page_phrases": ["Next page"], 16 | "prev_page_phrases": ["Previous page"], 17 | "home_page_phrases": ["Home"], 18 | "login_verbs": ["Log in"], 19 | "blurbs": ["is... honestly, you already know, right?"], 20 | "enter_url_phrases": ["Enter the address of your instance to start"], 21 | "time_formats": ["SEPTEMBER"], 22 | "unboost_verbs": ["deamplify"], 23 | "unfav_verbs": ["unflorp"] 24 | } 25 | -------------------------------------------------------------------------------- /09_hellomotoot/templates/footer.html: -------------------------------------------------------------------------------- 1 |Made quite quickly by @halcy using Mastodon.py, a library I (still @halcy) maintain · If you actually use this and want it to not shut down because twilio trial account cash ran out, consider throwing some money at me: ko-fi.com/h4lcy.
2 |privacy statement: I store the data I need to store to provide the service, and none besides. Data goes through twilio for SMS processing where needed, and their processing of the data is subject to their privacy statement. This app is quite hacky - don't expect security best practices. Service is best-effort. Please don't break it - I