elbkr / bad-websites

A collection of bad URLs to use for moderation purposes
MIT License
58 stars 23 forks source link

Use a GitHub action to make Websites.json #10

Open SpiderMath opened 3 years ago

SpiderMath commented 3 years ago

The websites.json file needs to be autogenerated, now that it has been separated into categories. And as far as I can see on the website, there is nothing to automate the process, which leaves room for human errors. So I'd request using a GitHub action to automate the process of making Websites.json.

elbkr commented 3 years ago

Could you explain me a little bit how does it work? I don’t usually use github actions

SpiderMath commented 3 years ago

Its possible to make Workflows using JavaScript.

You can basically loop through all the directories and read their jsons. And then take all the arrays and merge them into a single one, which is written into websites.json & committed (so that websites.json is actually changed for all of us, else it won't be useful)

elbkr commented 3 years ago

So only change the files that are inside separated folder?

elbkr commented 3 years ago

Could you make it an open a pull request?

SpiderMath commented 3 years ago

That's possible too There's already stuff doing that in the github action marketplace

SpiderMath commented 3 years ago

And about changing stuff in separated folder, its up to you how to want to use it You could also go through the content in separated folders and combine all those arrays into websites.json as well :shrug:

elbkr commented 3 years ago

I was trying to make an action, but it didn't work :/

SpiderMath commented 3 years ago

Then may I try to make an Action? (I will do it on a separate repo and if I fail I'll let you know)

elbkr commented 3 years ago

Oh ok! you can also fork the repo and make your tests, so you can see if it works with the files structure

r-rajaneesh commented 3 years ago

@elbkr why don't you make a ML that recognises bad links and makes a PR or just pushes stuff into the files so you don't need to update manually I can make a discord bot if you like it

elbkr commented 3 years ago

but how would it recognize bad links that aren't in this list? I mean, I used it for a bot who recognizes bad url in messages, but only from this list

elbkr commented 3 years ago

add me in discord so we can talk better: https://discord.com/users/521311050193436682

techguy16 commented 7 months ago

25 adds GitHub Action