Masto posts with n+1 hashtags are downloaded n+1 times #28

Closed
opened 2022-01-25 21:03:30 +00:00 by decentral1se · 5 comments
Owner

tagging a post with #hash1, #hash2 means it is downloaded twice into hash1/ and hash2/ which means it will be shown twice on lumbung.space. we should only download it once for one hashtag? or somehow we should handle duplicates, I guess it should be downloaded but not shown twice on the listing (i.e. if you click #hash1 you should still see it and if you click #hash2 you should still see it...)

tagging a post with `#hash1`, `#hash2` means it is downloaded twice into `hash1/` and `hash2/` which means it will be shown twice on lumbung.space. we should only download it once for one hashtag? or somehow we should handle duplicates, I guess it should be downloaded but not shown twice on the listing (i.e. if you click `#hash1` you should still see it and if you click `#hash2` you should still see it...)
decentral1se changed title from masto posts with n+1 hashtags are downloaded n+1 times to Masto posts with n+1 hashtags are downloaded n+1 times 2022-01-26 08:47:02 +00:00
decentral1se added this to the (deleted) project 2022-01-26 08:48:26 +00:00
Member

I think at the root it has to do with how the data is pulled in and checked for existence. Probably two seperate posts are now made. However, posts can have multiple categories (tag a, tag b) and a single post can thusly be shown in different category pages. So the issue should be with https://git.autonomic.zone/ruangrupa/lumbunglib/src/branch/master/lumbunglib/hashtag.py rather than the hugo theme.

The solution is to add a logic to check whether:

  • there are multiple hashtags in the post
  • then whether multiple of those are in the allowlist
  • if multiple are in the allow list
  • check for existence of same post with different tag
  • if it exits, skip.
I think at the root it has to do with how the data is pulled in and checked for existence. Probably two seperate posts are now made. However, posts can have multiple categories (tag a, tag b) and a single post can thusly be shown in different category pages. So the issue should be with https://git.autonomic.zone/ruangrupa/lumbunglib/src/branch/master/lumbunglib/hashtag.py rather than the hugo theme. The solution is to add a logic to check whether: * there are multiple hashtags in the post * then whether multiple of those are in the allowlist * if multiple are in the allow list * check for existence of same post with different tag * if it exits, skip.
knoflook self-assigned this 2022-01-27 10:22:42 +00:00
Author
Owner

Hmmm, nice. If we skip downloading the post tho, then the link on the hugo theme side will 404, so I think we still need to download them? Perhaps just filtering on the theming side could also be a fix? Investigating...

Hmmm, nice. If we skip downloading the post tho, then the link on the hugo theme side will 404, so I think we still need to download them? Perhaps just filtering on the theming side could also be a fix? Investigating...
Owner
see https://git.autonomic.zone/ruangrupa/lumbunglib/pulls/19
Author
Owner

We tried to fix this today but there are still issues in the implementation of lumbunglib, so, for now, we've disabled the socials contente generation in 5ad74ef1cc and removed the duplicates manually. the fix is Coming Soon ™️

We tried to fix this today but there are still issues in the implementation of lumbunglib, so, for now, we've disabled the socials contente generation in https://git.autonomic.zone/ruangrupa/lumbung.space/commit/5ad74ef1cc3b7a86900f6573baf2079a5c495359 and removed the duplicates manually. the fix is Coming Soon ™️
Owner
closed in https://git.autonomic.zone/ruangrupa/lumbunglib/pulls/22
Sign in to join this conversation.
No Milestone
No project
No Assignees
3 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: ruangrupa/lumbung.space#28
No description provided.