• 1 Post
  • 27 Comments
Joined 1 year ago
cake
Cake day: October 1st, 2023

help-circle

  • I got it working in shell as well:

    #!/bin/bash
    
    read -p "Username: " user
    read -p "Password: " -s pass
    read -p "TOTP: " totp
    
    res=$(curl \
        --request POST \
        --url "https://feddit.ch/api/v3/user/login" \
        --header 'accept: application/json' \
        --header 'content-type: application/json' \
        --data '{"username_or_email":"'$user'","password":"'$pass'","totp_2fa_token":"'$totp'"}')
    
    jwt=$(echo $res | sed -re 's/^.*"jwt":"([^"]*)".*$/\1/')
    
    curl \
        --request GET \
        --url "https://feddit.ch/api/v3/user/export_settings" \
        --header 'accept: application/json' \
        --cookie "jwt=$jwt" \
        -o "export.json"
    

    I’d recommend echoing $res and $jwt before processing them further

    Edit: if you don’t have TOTP enabled, don’t forget to remove it from the request

    Docs: https://lemmy.readme.io/reference/post_user-login

    Edit 2: added spacing





  • PARIS, Feb 26 (Reuters) - France’s President Emmanuel Macron said on Monday there was no consensus on sending troops to Ukraine, but the subject could not be ruled out.

    “There is no consensus at this stage… to send troops on the ground,” Macron said after hosting some 20 countries allied to Ukraine.

    “Nothing should be excluded. We will do everything that we must so that Russia does not win.”


    Saved you a click. Yes, that’s it. That’s the entire “article”. A total of 4 sentences. What exactly was the point of writing such a short article?

    Edit: pulled my head out of my ass.





  • Piggybacking onto this to mention my go-to online RegEx editor: RegExr. It lets you test the regex as you type, explains the particular symbols used, as well as has a sidebar where you can see different pattern types categorically. I’ve been using it for almost 2 years now, and haven’t had any reason to use much else (after I discovered this).




  • I agree with this completely! I am also not generally a fan of such gatekeeping, but in cases like these I feel that it is not just justified, but rather necessary.

    I once asked the admin and … a defederation of such instances is not seen as an action to take.

    Could you please rephrase? Not sure I understand this properly. What I think I understand is that the instance admin is not a big fan of defederation. Is that correct?



  • I also use Feeder, and have been using it for about a year now. There is no way to delete a single post without deleting the entire feed. What is probably happening is that you have disabled “Read” articles in the filter:

    Image

    <details><summary>Alt Text</summary>Screenshot of Feeder main screen. Shows filter menu opened displaying checkboxes “Unread”, “Saved”, “Recently Read”, and “Read”. All options are checked.</details>