Skip to content

Piero Bosio Social Web Site Personale Logo Fediverso

Social Forum federato con il resto del mondo. Non contano le istanze, contano le persone
  • 0 Votes
    1 Posts
    12 Views
    Non tutti sanno che... E' semplicissimo fare un post (toot) sul proprio profilo #mastodon con un semplice comando, ad esempio utilizzando #curl. Vediamo come fare. Abilitazione e creazione token Accedere, con il vostro account, al l'istanza mastodon di riferimento. Andare su Preferenze (menù a destra) Andare su Sviluppo (menù a sinistra) Fare click su Nuova applòicazione Compilare tutti i campi e concedere almeno i permessi di scrittura post. Salvare in un luogo sicuro (password manager) quanto generato. Comando curl di esempio curl -s -X POST https://mastodon.uno/api/v1/statuses \ -H "Authorization: Bearer TOKEN_DI_ACCESSO" \ -d "status=Ciao mondo" \ -d "visibility=public" \ Semplice Script di invio A questo punto possiamo farci un semplice script che prende in input, come parametro, del testo e lo invia per noi. cat toot.sh #!/bin/bash # Verifica che sia stato passato almeno un argomento if [ -z "$1" ]; then echo "Errore: devi passare il testo del toot come parametro." echo "Uso: $0 \"Testo del toot\"" exit 1 fi # Salva il parametro in una variabile TOOT="$1" # Esegui la richiesta POST curl -s -X POST https://mastodon.uno/api/v1/statuses \ -H "Authorization: Bearer TOKEN_DI_ACCESSO" \ -d "status=$TOOT" \ -d "visibility=public" \ -H "Authorization: Bearer TOKEN_DI_ACCESSO" \ | jq '.uri' Ho inserito #jq in fondo con un filtro (che possiamo modificare a nostro piacimento), perché l'output in formato json è abbastanza prolisso Perché? A parte che è bello fare il nerd è usare #mastodon da command line, ma la cosa può essere molto utile se la usiamo in abbinata ad altre azioni/comandi. Pensiamo ad esempio ad un integraszione con #forgejo, ad esempio potremmo fare un post (tramite #webook) al termine del nostro workflow. Un altro esempio è il collegare l'account ad un servizio di monitoraggio come #uptimekuma in questo modo si avrà una pagina che indica ai follower lo stato dei nostri servizi. Oppure usarlo al termine di un nostro script che preleva i prossimi appuntamenti da un caledario ics. Insomma, potete integrare l'invio di un toot alla fine di un vostro script custom, il limite a questo punto è solo la fantasia! E voi come lo usate? Seguimi su mastodon: @magostinelli@mastodon.uno Articolo pubblicato con licenza CC BY-NC-SA

Gli ultimi otto messaggi ricevuti dalla Federazione
  • @elettrona @fediverso @evan I guess I mean ragebait? Like it can be a good resource talking about bad stuff but I won't usually share someone saying bullshit to say "this is bullshit"

    read more

  • @maj @fediverso @evan It depends on what "negative" means. Real images of ICE-related violence when official accounts boost fake videos, are important to boost; but if you HAVE FUN boosting "man has shot little dog" randomly, or those justice-hungry articles, well, that's ragebait and propaganda. Here in Italy we have a justice-related vote within less than 2 months and "yes" side and "no" side, are sending lots of polarizing info. Including that rubbish "migrant stole a blind man's phone, thankfully a group of harley davidson bikers was there" (ending with the thief giving the phone back and promising to work in blind-related association) those rubbish AI-made stories whose purpose is to teach "self-justice is better than institutions". [talking emoji: pull the handle, toilet flushes, shit goes down]

    read more

  • @elettrona @fediverso @evan I generally avoid boosting anything that's negative.

    I just block or scroll away. Having just spent some time on Xitter (unfortunately) I realize I might be in the minority.

    read more

  • @maj @fediverso @evan Yes, if the screenshot is a quote, a text, it's useful. But sometimes it happens that the post directs you to a link where reading on, you end up supporting an unpleasant person or space. In that case, anonymous shorteners could be used to reproduce the link - very difficult to copy/paste a link from an alt-text

    read more

  • @johnefrancis great use of filters to manage your experience!

    read more

  • @elettrona @fediverso @evan thanks for sharing!
    Does it help at all if the post and/or alt text describe the screenshot?

    read more

  • @maj @evan no, I definitely do not, and I have filters configured to hide content links to non-fediverse commercial platforms. I left those places for reasons. I'll share direct links to websites, many discovered via my RSS reader.

    read more

  • @maj @fediverso @evan I usually post comments coming from other social networks only if it's a YouTube video. I dislike screenshots because I'm totally blind and a screenshot-only post, is impossible to produce, and to READ, for me. And, not being on Facebook and Instagram or Tiktok, I don't read those posts at all. Youtube anyways, is still full of interesting contents and I've posted some contents there.

    read more
Post suggeriti