GNU social JP
  • FAQ
  • Login
GNU social JPは日本のGNU socialサーバーです。
Usage/ToS/admin/test/Pleroma FE
  • Public

    • Public
    • Network
    • Groups
    • Featured
    • Popular
    • People

Untitled attachment

Download link

Notices where this attachment appears

  1. Embed this notice
    Flanker (flanker@decayable.ink)'s status on Friday, 04-Apr-2025 20:08:16 JST Flanker Flanker
    in reply to
    that would require me to know what programming is, unfortunately.

    That said, with the way mastodon.py deals with fetching statuses (20 item "pages" all the time every time (unless theres a way to reduce the size or something i haven't seen)), comparing it to like the 40 newest lines in the corpus should hopefully be enough to reduce un-necessary fetches to at most like 2 in the worst case scenario. fwiw i'm only planning to update it like once a month and im def gonna do it manually least i fucked something up lol
    In conversation about 2 months ago from decayable.ink permalink
  2. Embed this notice
    anime graf mays ?️? (graf@poa.st)'s status on Wednesday, 24-Jan-2024 04:09:27 JST anime graf mays ?️? anime graf mays ?️?
    in reply to

    @Moon @raccoon easy couple liner in python utilizing the mastodon.py library

    script.py:

    !/usr/bin/env python3 import os import sys import toml from mastodon import Mastodon basepath = os.path.dirname(os.path.abspath(__file__)) settings = toml.load(os.path.join(basepath,'settings.toml')) mastodon = Mastodon( access_token = os.path.join(basepath,'usercred.secret'), api_base_url = settings.get("mastodon_url") ) media = mastodon.media_post("image.png") mastodon.status_post("", None, media_ids=[media], sensitive=False, visibility='public')

    settings.toml:

    mastodon_url="" mastodon_user=""

    usercred.secret is just your bot's token generated from https://tools.splat.soy/pleroma-access-token/

    then you can just chmod a+x script.py and run ./script.py $filename

    this will require that you have a library of images tho not pulling them directly

    In conversation Wednesday, 24-Jan-2024 04:09:27 JST from poa.st permalink
  3. Embed this notice
    Thomas Kahle (tomkalei@machteburch.social)'s status on Monday, 23-Oct-2023 04:07:01 JST Thomas Kahle Thomas Kahle
    in reply to

    @feditips mastodon.py can also easily do this since it is built into mastodon. It’s just an option of a normal post, nothing magical.

    In conversation Monday, 23-Oct-2023 04:07:01 JST from machteburch.social permalink
  4. Embed this notice
    Luna :neofox_snug: (lunareclipse@snug.moe)'s status on Monday, 18-Sep-2023 19:38:30 JST Luna :neofox_snug: Luna :neofox_snug:

    using mastodon.py to access firefish because it's own API is a horror beyond my comprehension :woozy_2x:

    In conversation Monday, 18-Sep-2023 19:38:30 JST from snug.moe permalink
  5. Embed this notice
    Reasonable Man (r000t@ligma.pro)'s status on Monday, 10-Jul-2023 13:37:58 JST Reasonable Man Reasonable Man
    in reply to

    @bot
    Did you really think I got that number?

    Nah but I'm really thinking about making a quick and dirty twilio <--> mastodon.py conduit
    @pwm

    In conversation Monday, 10-Jul-2023 13:37:58 JST from ligma.pro permalink
  6. Embed this notice
    aeva (aeva@mastodon.gamedev.place)'s status on Friday, 21-Apr-2023 05:17:23 JST aeva aeva
    in reply to

    I was looking through the API docs for mastodon.py last night, and now I'm fantasizing about writing my own perfect half-finished mastodon client in python.

    In conversation Friday, 21-Apr-2023 05:17:23 JST from mastodon.gamedev.place permalink
  • Help
  • About
  • FAQ
  • TOS
  • Privacy
  • Source
  • Version
  • Contact

GNU social JP is a social network, courtesy of GNU social JP管理人. It runs on GNU social, version 2.0.2-dev, available under the GNU Affero General Public License.

Creative Commons Attribution 3.0 All GNU social JP content and data are available under the Creative Commons Attribution 3.0 license.