Hi lemmy; I’ve made a program that will download all the post and images for a lemmy community. It downloads them into a html file. This way users don’t have to worry about losing all their post because they can download the whole community themselves.

Demo https://files.catbox.moe/8wgbm4.mp4

I hope someone finds this useful. Someone asked me for it so I provided it.

    • MasterofballsOP
      link
      fedilink
      12 years ago

      I put paging back so large communities won’t use up to much memory. I made limit optional and it default at 10 so it will download 10 at a time. I like how you changed it to download all images. It’s all merged. Gonna try to add a basic license tonight too.

      • Leslie(she/her)
        link
        fedilink
        22 years ago

        I put paging back so large communities won’t use up to much memory.

        i don’t see how that helps since the user has no control over the paging. you’re making a lot of additional requests to get the same data

        • MasterofballsOP
          link
          fedilink
          1
          edit-2
          2 years ago

          You dont want to get 1,000 post in one request. Im not even sure lemmy would allow that. Im not sure what you mean by no control. It’s downloading an entire community.

          And yes you want to make additional request so it doesn’t timeout.

            • MasterofballsOP
              link
              fedilink
              1
              edit-2
              2 years ago

              I still don’t think it’s a great idea to get an entire large community at once. Ill play with trying an entire large community like memes later when I get a minute. Either way the way I have it you can still specify a really large limit. Pass in 700 and it will attempt 700 at once. Pass in 50 and it will do it in chunks of 50. In either case it will get the entire community and not stop at the number provided .

              edit: Manages to get all 601 post from /c/memes in a few seconds. Which is cool. I’m just gonna make the default page size at like 100 instead of 10.

    • Masterofballs
      link
      fedilink
      02 years ago

      Just refactored it a good bit. Should be easier to read through the logic now. Error handling is better

      • Leslie(she/her)
        link
        fedilink
        22 years ago

        nice. i’m a bit busy irl with family and work, will have a go at implementing comment backup once i get back.

        • Masterofballs
          link
          fedilink
          12 years ago

          That would be a lot of CSS so I have been avoiding it. Would be awesome if you get it to work though.

          • Leslie(she/her)
            link
            fedilink
            12 years ago

            lol, you’re right i have to build the comment tree myself too, looks like a lot of work i think i’ll pass too

            • Masterofballs
              link
              fedilink
              02 years ago

              imo comments aren’t that important. Maybe for tech subs. Feel like lemmy needs moderation tools the most. I might look at one of those to build out. Playing with the dev environment today.