• wjs018
    link
    fedilink
    English
    arrow-up
    1
    ·
    4 months ago

    It was my first time hosting a bot as well, so I get it. Feel free to hit me up on matrix or I am on the discord server linked in the sidebar of !lightnovels@ani.social as well if anything comes up. I am thinking now that I didn’t really design things with multiple languages in mind, so there could be some issues that come up with that I could try to address (like text written in English that isn’t user-customizable without digging into the source). Let me know!

    • WTreeM
      link
      fedilink
      English
      arrow-up
      1
      ·
      4 months ago

      I hope you don’t mind continuing here. So that other mods of this sub can see and discuss what they think.

      For language setting, I went and looked around Lemmy API. You can easily post as other language with just language_id. With a few modification to src/lemmy.py, added language_id to line 67 and 73 under submit_text_post, I went ahead and tested out.

      This is the post. This problem is Lemmy thinks that new post is the same as this post. So the new post is not showing up in the community, weirdly showing as cross-posted to the same community in this post.

      Also can you guide me how to get language_id of certain language? For this test, I went and curl "https://ani.social/api/v3/resolve_object?q=https://ani.social/post/4225708" curl the post using the language I want.

      • wjs018
        link
        fedilink
        English
        arrow-up
        1
        ·
        edit-2
        4 months ago

        The cross posting issue is due to the fact that any two lemmy posts that point to the same url are automatically collapsed into a crosspost. This is the main reason that I have rikka set to not have any links pointing to the images. I thought it would be a nice feature, but the crosspost thing prevented it.

        To disable having an image link when the bot makes posts, you want to set submit_image = none in the [options] section of your config file.

        Now that 0.19.4 is live on this instance, I wonder if the thumbnail links are handled differently. I will have to do some testing around that.


        As for language id, here is the page where pythorhead has all the language ids listed out.

        edit: as of now, pythorhead doesn’t support setting a thumbnail url separately, so that won’t be possible yet.

        • WTreeM
          link
          fedilink
          English
          arrow-up
          2
          ·
          4 months ago

          As for language id, here is the page where pythorhead has all the language ids listed out.

          Thanks. This helps a lot.

      • wjs018
        link
        fedilink
        English
        arrow-up
        1
        ·
        4 months ago

        Just wanted to follow up and let you know that I just added the language_id setting to the config file. It works for posts as well as comments that the bot creates or edits.

        • WTreeM
          link
          fedilink
          English
          arrow-up
          2
          ·
          4 months ago

          I just added the language_id setting to the config file

          Thank you for language implementation. Just tested and it works.

          cross posting issue is due to the fact that any two lemmy posts that point to the same url are automatically collapsed into a crosspost

          That is what I thought.

          edit: as of now, pythorhead doesn’t support setting a thumbnail url separately

          For now, I have disabled posting cover photos.