aka freamon

Codeberg: https://codeberg.org/freamon?tab=activity

Anything from https://lemmon.website/ is me too.

  • 0 Posts
  • 92 Comments
Joined 2 years ago
cake
Cake day: March 27th, 2024

help-circle


  • The only way I can think of is to use the API to get all communities, and then filter out the ones without local subs. So a basic BASH script would be:

    #!/bin/bash  
    
    echo -n '' > /tmp/allcomms.txt  
    
    page=1  
    while true  
    do  
      communities=$(curl --request GET --url "https://walledgarden.xyz/api/v3/community/list?type_=All&page=%24%7Bpage%7D&limit=50" --header 'accept: application/json' | jq .communities[])  
      if [ "${communities}" == "" ]  
      then  
        break  
      fi  
      jq -r '[.community.id, .counts.subscribers_local] | @sh' <<<$communities >> /tmp/allcomms.txt  
      page=$(( page + 1 ))  
      sleep .5  
    done  
    
    while read id count  
    do  
      if [ $count -eq 0 ]  
      then  
        echo "$id has no local subs"  
      fi  
    done < /tmp/allcomms.txt  
    

    (It’ll take a few minutes to run)

    After that, how you purge the communities with those IDs I’m less sure of. My guess would be:

    Get a login tokin:
    JWT=$(curl --request POST --url https://walledgarden.xyz/api/v3/user/login --header 'accept: application/json' --header 'content-type: application/json' --data '{"username_or_email": "YOUR_USERNAME","password": "YOUR_PASSWORD"}' | jq -r .jwt)

    Use Admin/Purge from the API:

    curl --request POST --url https://walledgarden.xyz/api/v3/admin/purge/community --header "authorization: Bearer $JWT" --header 'content-type: application/json' --data "{"community_id": ${id}, "reason": "no local subs"}"  
    

    As long as purge lets the community be recreated again (which it should do), then that should be okay.

    Don’t take my word for any of this for an in-production Lemmy server, though. Test first!




  • I think they still need a separate user account. For one thing, a PeerTube channel is ‘attributedTo’ the user account, in the same way that Lemmy communities are ‘attributedTo’ the moderators. A Group belongs to at least one Person, it can’t belong to itself. Another is that it allows for creators to comment on videos, and either be recognised as the ‘OP’, or as a fellow content creator.

    In terms of rendering things like Likes and Dislikes, it has the info in the backend, so it may as well. They don’t Announce votes like Lemmy does, you have to activitely fetch them, so the channel as it exists on PeerTube provides a definitive source. Likewise, there’s all sorts of reasons why comments get out of sync, so the channel provides an authoritative place where you should be able to see them all.

    There is a friction though. I like the idea of a place that only open to people willing to create content, and isn’t interested in signups from ‘lurkers’, but providing a mobile app doesn’t seem compatible with that.


  • they seem to only give accounts to creators

    That doesn’t seem unreasonable to me. I’ll get in trouble for saying it, but I think that PeerTube is for video channels what Lemmy should be for communities. It should be that if you want to start or moderate a community, then you sign up to Lemmy, but if you just want to interact with one, you use a user account provided by software that’s fully geared up around users (e.g. Mastodon).

    Ignoring for the moment that Lemmy’s federation model hasn’t been widely adopted, and that comments from Mastodon that appear in Lemmy often have annoying Hashtag / Mention spam, my fantasy version of a post in a Lemmy community would look something like https://tilvids.com/w/wjTD7fp9qy4KmTkBdSoWyc, which was created by a PeerTube user, but has been commented on and voted for by users from Mastodon, Sharkey, PieFed, other PeerTube instances, and MBIN.

    Amongst those subscribers, commenters, and voters should be Lemmy users, of course. In this thread, it feels like PeerTube is being criticised by people who want to use it in a way that it’s not designed for, because they can’t interact with it from their Lemmy account. If inter-op was better, there’d be no need to create a new account anywhere, and it would have a network effect - the channels that people are trying to discover would already have been brought in by other users, and findable through a conventional Lemmy search. Also, the votes and comments from Lemmy users that are currently going to whoever takes a PeerTube video and posts it in the likes of !videos@lemmy.world, would instead be going to original creator. This would also aid discovery (since people would be more likely to see the channel in ‘all’), and might have also some incentivising influence on the creator.

    Basically, I blame Lemmy.




  • You and db0 are doing different things - he has blog that Lemmy users can interact with as if it was another Lemmy community, whereas you have a blog that you want to use to post articles into a different Lemmy community.

    A reply is sent from Lemmy twice - once to the community to Announce out to its followers, and once to the person being replied to. A top-level reply will appear on the WordPress blog because it is a reply to the author. A reply to a reply won’t, because the blog is not following the Lemmy community (so won’t get the Announce), and the author isn’t the person being replied to.

    If you want a reply to a reply to also appear on WordPress, you need to treat it like Mastodon, and also Mention the original author. Here is an example that also appeared on the blog: https://lemmy.world/comment/14897939 (the reply from ‘freamon’)








  • I see this has already been answered, but I’ll post what I was typing out anyway.

    It’s not enough to just provide your auth token if you want to fetch the details for yourself (even though the JWT decodes to identify you). You have to use /user like you would for fetching anyone else, e.g.:

    curl --header 'accept: application/json' --header 'authorization: Bearer xyzyzyz' --location https://lemmy.world/api/v3/user?username=okelote360 | jq .


  • It uses postgres for the DB - I think that and redis are designed to operate at very large scales, so it wouldn’t be them.

    My guess would be that it’s something in the interpreted nature of Python - this seems to be why a familiar dismissal of PieFed is a concern about how it will scale.

    That said, this site shows that Python is the most popular language for Fediverse apps (just), the likes of Mastodon are written in another interpreted language (Ruby), and I think there are more big websites running Python (with Django or Flask) than people realise. So I don’t know, really, I’m just following other people’s lead on this. I don’t imagine that any problems would be insurmountable though: an admin could restrict the amount of signups, or if new users mean a few more donations, they could just throw money at the problem (more cycles for one server, or splitting up tasks across multiple servers).