fnic-lemmy / bestofbot

A bot posting weekly "best of" posts to Lemmy
https://lemmy.dbzer0.com/c/lemmydirectory
1 stars 0 forks source link

Extract descriptions from directory #14

Open chris-y opened 5 months ago

chris-y commented 5 months ago

Maybe scrape the communities and descriptions from the directory posts, rather than the community descriptions and a separately maintained file.

Even if we convert to a useful format locally that will be better then having to maintain two things.

M4rtineski commented 5 months ago

Maybe a github script that automatically merges the directory parts into one full directory github file and then scrape the communities and descriptions from there? Not sure if it would be less or more work. lmao

chris-y commented 5 months ago

I've created an action in lemmy-directory which extracts the communities into the individual JSON files that this bot reads. It updates them when you push to that repo and creates a PR here (so we can check nothing has broken before merging). (it all shows up under my name which is annoying but the only way I could give it enough access)

In future this can be expanded to extract the descriptions too.

chris-y commented 5 months ago

I've fixed the action so it has a bot account rather than masquerading as me.